| `timescale 1ns / 1ps |
|
|
| `ifndef __AGENT_H |
|
|
| `define __AGENT_H |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| `include "transactions.sv" |
| `include "sequencers.sv" |
| `include "drivers.sv" |
| `include "monitors.sv" |
|
|
| |
| `ifdef BlkCtrlMstAgt |
| class BlkCtrlMasterAgent #( |
| real out_drive_t = 1 |
| )extends uvm_agent; |
| |
| |
| BlkCtrlSeqr sequencer; |
| BlkCtrlMasterDriver #(.out_drive_t(out_drive_t)) driver; |
| |
| |
| `uvm_component_param_utils(BlkCtrlMasterAgent #(.out_drive_t(out_drive_t))) |
| |
| function new(string name = "BlkCtrlMasterAgent", uvm_component parent = null); |
| super.new(name, parent); |
| endfunction |
| |
| virtual function void build_phase(uvm_phase phase); |
| super.build_phase(phase); |
| |
| this.sequencer = BlkCtrlSeqr::type_id::create("sqr", this); |
| this.driver = BlkCtrlMasterDriver #(.out_drive_t(out_drive_t))::type_id::create("drv", this); |
| |
| `uvm_info("BlkCtrlMasterAgent", "BlkCtrlMasterAgent built!", UVM_LOW) |
| endfunction |
| |
| virtual function void connect_phase(uvm_phase phase); |
| super.connect_phase(phase); |
| |
| this.driver.seq_item_port.connect(this.sequencer.seq_item_export); |
| endfunction |
| |
| endclass |
| `endif |
|
|
| |
| `ifdef AXIMstAgt |
| class AXIMasterAgent #( |
| real out_drive_t = 1, |
| integer addr_width = 32, |
| integer data_width = 32, |
| integer bresp_width = 2, |
| integer rresp_width = 2 |
| )extends uvm_agent; |
| |
| |
| AXISequencer #(.addr_width(addr_width), .data_width(data_width), |
| .bresp_width(bresp_width), .rresp_width(rresp_width)) sequencer; |
| AXIMasterDriver #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width), |
| .bresp_width(bresp_width), .rresp_width(rresp_width)) driver; |
| AXIMonitor #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width), |
| .bresp_width(bresp_width), .rresp_width(rresp_width)) monitor; |
| |
| |
| uvm_analysis_port #(AXITrans #(.addr_width(addr_width), .data_width(data_width), |
| .bresp_width(bresp_width), .rresp_width(rresp_width))) rd_trans_analysis_port; |
| uvm_analysis_port #(AXITrans #(.addr_width(addr_width), .data_width(data_width), |
| .bresp_width(bresp_width), .rresp_width(rresp_width))) wt_trans_analysis_port; |
| |
| |
| `uvm_component_param_utils(AXIMasterAgent #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width), .bresp_width(bresp_width), .rresp_width(rresp_width))) |
| |
| function new(string name = "AXIMasterAgent", uvm_component parent = null); |
| super.new(name, parent); |
| endfunction |
| |
| virtual function void build_phase(uvm_phase phase); |
| super.build_phase(phase); |
| |
| if (this.is_active == UVM_ACTIVE) |
| begin |
| this.sequencer = AXISequencer #(.addr_width(addr_width), .data_width(data_width), |
| .bresp_width(bresp_width), .rresp_width(rresp_width))::type_id::create("sqr", this); |
| this.driver = AXIMasterDriver #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width), |
| .bresp_width(bresp_width), .rresp_width(rresp_width))::type_id::create("drv", this); |
| end |
| |
| this.monitor = AXIMonitor #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width), |
| .bresp_width(bresp_width), .rresp_width(rresp_width))::type_id::create("mon", this); |
| |
| `uvm_info("AXIMasterAgent", "AXIMasterAgent built!", UVM_LOW) |
| endfunction |
| |
| virtual function void connect_phase(uvm_phase phase); |
| super.connect_phase(phase); |
| |
| if(this.is_active == UVM_ACTIVE) |
| this.driver.seq_item_port.connect(this.sequencer.seq_item_export); |
| |
| this.rd_trans_analysis_port = this.monitor.rd_trans_analysis_port; |
| this.wt_trans_analysis_port = this.monitor.wt_trans_analysis_port; |
| endfunction |
| |
| endclass |
| `endif |
|
|
| |
| `ifdef AXISlvAgt |
| class AXISlaveAgent #( |
| real out_drive_t = 1, |
| integer addr_width = 32, |
| integer data_width = 32, |
| integer bresp_width = 2, |
| integer rresp_width = 2 |
| )extends uvm_agent; |
| |
| |
| AXISequencer #(.addr_width(addr_width), .data_width(data_width), |
| .bresp_width(bresp_width), .rresp_width(rresp_width)) sequencer; |
| AXISlaveDriver #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width), |
| .bresp_width(bresp_width), .rresp_width(rresp_width)) driver; |
| AXIMonitor #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width), |
| .bresp_width(bresp_width), .rresp_width(rresp_width)) monitor; |
| |
| |
| uvm_analysis_port #(AXITrans #(.addr_width(addr_width), .data_width(data_width), |
| .bresp_width(bresp_width), .rresp_width(rresp_width))) rd_trans_analysis_port; |
| uvm_analysis_port #(AXITrans #(.addr_width(addr_width), .data_width(data_width), |
| .bresp_width(bresp_width), .rresp_width(rresp_width))) wt_trans_analysis_port; |
| |
| |
| `uvm_component_param_utils(AXISlaveAgent #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width), .bresp_width(bresp_width), .rresp_width(rresp_width))) |
| |
| function new(string name = "AXISlaveAgent", uvm_component parent = null); |
| super.new(name, parent); |
| endfunction |
| |
| virtual function void build_phase(uvm_phase phase); |
| super.build_phase(phase); |
| |
| if (this.is_active == UVM_ACTIVE) |
| begin |
| this.sequencer = AXISequencer #(.addr_width(addr_width), .data_width(data_width), |
| .bresp_width(bresp_width), .rresp_width(rresp_width))::type_id::create("sqr", this); |
| this.driver = AXISlaveDriver #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width), |
| .bresp_width(bresp_width), .rresp_width(rresp_width))::type_id::create("drv", this); |
| end |
| |
| this.monitor = AXIMonitor #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width), |
| .bresp_width(bresp_width), .rresp_width(rresp_width))::type_id::create("mon", this); |
| |
| `uvm_info("AXISlaveAgent", "AXISlaveAgent built!", UVM_LOW) |
| endfunction |
| |
| virtual function void connect_phase(uvm_phase phase); |
| super.connect_phase(phase); |
| |
| if(this.is_active == UVM_ACTIVE) |
| this.driver.seq_item_port.connect(this.sequencer.seq_item_export); |
| |
| this.rd_trans_analysis_port = this.monitor.rd_trans_analysis_port; |
| this.wt_trans_analysis_port = this.monitor.wt_trans_analysis_port; |
| endfunction |
| |
| endclass |
| `endif |
|
|
| |
| `ifdef AXISMstAgt |
| class AXISMasterAgent #( |
| real out_drive_t = 1, |
| integer data_width = 32, |
| integer user_width = 0 |
| )extends uvm_agent; |
| |
| |
| AXISSequencer #(.data_width(data_width), .user_width(user_width)) sequencer; |
| AXISMasterDriver #(.out_drive_t(out_drive_t), .data_width(data_width), .user_width(user_width)) driver; |
| AXISMonitor #(.out_drive_t(out_drive_t), .data_width(data_width), .user_width(user_width)) monitor; |
| |
| |
| uvm_analysis_port #(AXISTrans #(.data_width(data_width), .user_width(user_width))) axis_analysis_port; |
| |
| |
| `uvm_component_param_utils(AXISMasterAgent #(.out_drive_t(out_drive_t), .data_width(data_width), .user_width(user_width))) |
| |
| function new(string name = "AXISMasterAgent", uvm_component parent = null); |
| super.new(name, parent); |
| endfunction |
| |
| virtual function void build_phase(uvm_phase phase); |
| super.build_phase(phase); |
| |
| if (this.is_active == UVM_ACTIVE) |
| begin |
| this.sequencer = AXISSequencer #(.data_width(data_width), .user_width(user_width)):: |
| type_id::create("sqr", this); |
| this.driver = AXISMasterDriver #(.out_drive_t(out_drive_t), .data_width(data_width), .user_width(user_width)):: |
| type_id::create("drv", this); |
| end |
| |
| this.monitor = AXISMonitor #(.out_drive_t(out_drive_t), .data_width(data_width), .user_width(user_width)):: |
| type_id::create("mon", this); |
| |
| `uvm_info("AXISMasterAgent", "AXISMasterAgent built!", UVM_LOW) |
| endfunction |
| |
| virtual function void connect_phase(uvm_phase phase); |
| super.connect_phase(phase); |
| |
| if(this.is_active == UVM_ACTIVE) |
| this.driver.seq_item_port.connect(this.sequencer.seq_item_export); |
| |
| this.axis_analysis_port = this.monitor.in_analysis_port; |
| endfunction |
| |
| endclass |
| `endif |
|
|
| |
| `ifdef AXISSlvAgt |
| class AXISSlaveAgent #( |
| real out_drive_t = 1, |
| integer data_width = 32, |
| integer user_width = 0 |
| )extends uvm_agent; |
| |
| |
| bit use_sqr; |
| |
| |
| AXISSequencer #(.data_width(data_width), .user_width(user_width)) sequencer; |
| AXISSlaveDriver #(.out_drive_t(out_drive_t), .data_width(data_width), .user_width(user_width)) driver; |
| AXISMonitor #(.out_drive_t(out_drive_t), .data_width(data_width), .user_width(user_width)) monitor; |
| |
| |
| uvm_analysis_port #(AXISTrans #(.data_width(data_width), .user_width(user_width))) axis_analysis_port; |
| |
| |
| `uvm_component_param_utils(AXISSlaveAgent #(.out_drive_t(out_drive_t), .data_width(data_width), .user_width(user_width))) |
| |
| function new(string name = "AXISSlaveAgent", uvm_component parent = null); |
| super.new(name, parent); |
| |
| this.use_sqr = 1'b0; |
| endfunction |
| |
| virtual function void build_phase(uvm_phase phase); |
| super.build_phase(phase); |
| |
| if (this.is_active == UVM_ACTIVE) |
| begin |
| if(this.use_sqr) |
| begin |
| this.sequencer = AXISSequencer #(.data_width(data_width), .user_width(user_width)):: |
| type_id::create("sqr", this); |
| end |
| |
| this.driver = AXISSlaveDriver #(.out_drive_t(out_drive_t), .data_width(data_width), .user_width(user_width)):: |
| type_id::create("drv", this); |
| this.driver.set_use_sqr(this.use_sqr); |
| end |
| |
| this.monitor = AXISMonitor #(.out_drive_t(out_drive_t), .data_width(data_width), .user_width(user_width)):: |
| type_id::create("mon", this); |
| |
| `uvm_info("AXISSlaveAgent", "AXISSlaveAgent built!", UVM_LOW) |
| endfunction |
| |
| virtual function void connect_phase(uvm_phase phase); |
| super.connect_phase(phase); |
| |
| if((this.is_active == UVM_ACTIVE) && this.use_sqr) |
| this.driver.seq_item_port.connect(this.sequencer.seq_item_export); |
| |
| this.axis_analysis_port = this.monitor.in_analysis_port; |
| endfunction |
| |
| endclass |
| `endif |
|
|
| |
| `ifdef APBSlvAgt |
| class APBSlaveAgent #( |
| real out_drive_t = 1, |
| integer addr_width = 32, |
| integer data_width = 32 |
| )extends uvm_agent; |
| |
| |
| APBSequencer #(.addr_width(addr_width), .data_width(data_width)) sequencer; |
| APBSlaveDriver #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width)) driver; |
| APBMonitor #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width)) monitor; |
| |
| |
| uvm_analysis_port #(APBTrans #(.addr_width(addr_width), .data_width(data_width))) apb_analysis_port; |
| |
| |
| `uvm_component_param_utils(APBSlaveAgent #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width))) |
| |
| function new(string name = "APBSlaveAgent", uvm_component parent = null); |
| super.new(name, parent); |
| endfunction |
| |
| virtual function void build_phase(uvm_phase phase); |
| super.build_phase(phase); |
| |
| if (this.is_active == UVM_ACTIVE) |
| begin |
| this.sequencer = APBSequencer #(.addr_width(addr_width), .data_width(data_width)):: |
| type_id::create("sqr", this); |
| this.driver = APBSlaveDriver #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width)):: |
| type_id::create("drv", this); |
| end |
| |
| this.monitor = APBMonitor #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width)):: |
| type_id::create("mon", this); |
| |
| `uvm_info("APBSlaveAgent", "APBSlaveAgent built!", UVM_LOW) |
| endfunction |
| |
| virtual function void connect_phase(uvm_phase phase); |
| super.connect_phase(phase); |
| |
| if(this.is_active == UVM_ACTIVE) |
| this.driver.seq_item_port.connect(this.sequencer.seq_item_export); |
| |
| this.apb_analysis_port = this.monitor.in_analysis_port; |
| endfunction |
| |
| endclass |
| `endif |
|
|
| |
| `ifdef APBMstAgt |
| class APBMasterAgent #( |
| real out_drive_t = 1, |
| integer addr_width = 32, |
| integer data_width = 32 |
| )extends uvm_agent; |
| |
| |
| APBSequencer #(.addr_width(addr_width), .data_width(data_width)) sequencer; |
| APBMasterDriver #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width)) driver; |
| APBMonitor #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width)) monitor; |
| |
| |
| uvm_analysis_port #(APBTrans #(.addr_width(addr_width), .data_width(data_width))) apb_analysis_port; |
| |
| |
| `uvm_component_param_utils(APBMasterAgent #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width))) |
| |
| function new(string name = "APBMasterAgent", uvm_component parent = null); |
| super.new(name, parent); |
| endfunction |
| |
| virtual function void build_phase(uvm_phase phase); |
| super.build_phase(phase); |
| |
| if (this.is_active == UVM_ACTIVE) |
| begin |
| this.sequencer = APBSequencer #(.addr_width(addr_width), .data_width(data_width)):: |
| type_id::create("sqr", this); |
| this.driver = APBMasterDriver #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width)):: |
| type_id::create("drv", this); |
| end |
| |
| this.monitor = APBMonitor #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width)):: |
| type_id::create("mon", this); |
| |
| `uvm_info("APBMasterAgent", "APBMasterAgent built!", UVM_LOW) |
| endfunction |
| |
| virtual function void connect_phase(uvm_phase phase); |
| super.connect_phase(phase); |
| |
| if(this.is_active == UVM_ACTIVE) |
| this.driver.seq_item_port.connect(this.sequencer.seq_item_export); |
| |
| this.apb_analysis_port = this.monitor.in_analysis_port; |
| endfunction |
| |
| endclass |
| `endif |
|
|
| |
| `ifdef AHBMstAgt |
| class AHBMasterAgent #( |
| real out_drive_t = 1, |
| integer slave_n = 1, |
| integer addr_width = 32, |
| integer data_width = 32, |
| integer burst_width = 3, |
| integer prot_width = 4, |
| integer master_width = 1 |
| )extends uvm_agent; |
| |
| |
| AHBSequencer #(.addr_width(addr_width), .data_width(data_width), .burst_width(burst_width), |
| .prot_width(prot_width), .master_width(master_width)) sequencer; |
| AHBMasterDriver #(.out_drive_t(out_drive_t), .slave_n(slave_n), .addr_width(addr_width), .data_width(data_width), |
| .burst_width(burst_width), .prot_width(prot_width), .master_width(master_width)) driver; |
| AHBMonitor #(.out_drive_t(out_drive_t), .slave_n(slave_n), .addr_width(addr_width), .data_width(data_width), |
| .burst_width(burst_width), .prot_width(prot_width), .master_width(master_width)) monitor; |
| |
| |
| uvm_analysis_port #(AHBTrans #(.addr_width(addr_width), .data_width(data_width), |
| .burst_width(burst_width), .prot_width(prot_width), .master_width(master_width))) ahb_analysis_port; |
| |
| |
| `uvm_component_param_utils(AHBMasterAgent #(.out_drive_t(out_drive_t), .slave_n(slave_n), .addr_width(addr_width), .data_width(data_width), .burst_width(burst_width), .prot_width(prot_width), .master_width(master_width))) |
| |
| function new(string name = "AHBMasterAgent", uvm_component parent = null); |
| super.new(name, parent); |
| endfunction |
| |
| virtual function void build_phase(uvm_phase phase); |
| super.build_phase(phase); |
| |
| if (this.is_active == UVM_ACTIVE) |
| begin |
| this.sequencer = AHBSequencer #(.addr_width(addr_width), .data_width(data_width), .burst_width(burst_width), |
| .prot_width(prot_width), .master_width(master_width))::type_id::create("sqr", this); |
| this.driver = AHBMasterDriver #(.out_drive_t(out_drive_t), .slave_n(slave_n), .addr_width(addr_width), |
| .data_width(data_width), .burst_width(burst_width), .prot_width(prot_width), |
| .master_width(master_width))::type_id::create("drv", this); |
| end |
| |
| this.monitor = AHBMonitor #(.out_drive_t(out_drive_t), .slave_n(slave_n), .addr_width(addr_width), |
| .data_width(data_width), .burst_width(burst_width), .prot_width(prot_width), .master_width(master_width)):: |
| type_id::create("mon", this); |
| |
| `uvm_info("AHBMasterAgent", "AHBMasterAgent built!", UVM_LOW) |
| endfunction |
| |
| virtual function void connect_phase(uvm_phase phase); |
| super.connect_phase(phase); |
| |
| if(this.is_active == UVM_ACTIVE) |
| this.driver.seq_item_port.connect(this.sequencer.seq_item_export); |
| |
| this.ahb_analysis_port = this.monitor.in_analysis_port; |
| endfunction |
| |
| endclass |
| `endif |
|
|
| |
| `ifdef ReqAckMstAgt |
| class ReqAckMasterAgent #( |
| real out_drive_t = 1, |
| integer req_payload_width = 32, |
| integer resp_payload_width = 32 |
| )extends uvm_agent; |
| |
| |
| ReqAckSequencer #(.req_payload_width(req_payload_width), .resp_payload_width(resp_payload_width)) sequencer; |
| ReqAckMasterDriver #(.out_drive_t(out_drive_t), |
| .req_payload_width(req_payload_width), .resp_payload_width(resp_payload_width)) driver; |
| ReqAckMonitor #(.out_drive_t(out_drive_t), |
| .req_payload_width(req_payload_width), .resp_payload_width(resp_payload_width)) monitor; |
| |
| |
| uvm_analysis_port #(ReqAckTrans #(.req_payload_width(req_payload_width), |
| .resp_payload_width(resp_payload_width))) req_ack_analysis_port; |
| |
| |
| `uvm_component_param_utils(ReqAckMasterAgent #(.out_drive_t(out_drive_t), .req_payload_width(req_payload_width), .resp_payload_width(resp_payload_width))) |
| |
| function new(string name = "ReqAckMasterAgent", uvm_component parent = null); |
| super.new(name, parent); |
| endfunction |
| |
| virtual function void build_phase(uvm_phase phase); |
| super.build_phase(phase); |
| |
| if (this.is_active == UVM_ACTIVE) |
| begin |
| this.sequencer = ReqAckSequencer #(.req_payload_width(req_payload_width), .resp_payload_width(resp_payload_width)) |
| ::type_id::create("sqr", this); |
| this.driver = ReqAckMasterDriver #(.out_drive_t(out_drive_t), |
| .req_payload_width(req_payload_width), .resp_payload_width(resp_payload_width)) |
| ::type_id::create("drv", this); |
| end |
| |
| this.monitor = ReqAckMonitor #(.out_drive_t(out_drive_t), |
| .req_payload_width(req_payload_width), .resp_payload_width(resp_payload_width)) |
| ::type_id::create("mon", this); |
| |
| `uvm_info("ReqAckMasterAgent", "ReqAckMasterAgent built!", UVM_LOW) |
| endfunction |
| |
| virtual function void connect_phase(uvm_phase phase); |
| super.connect_phase(phase); |
| |
| if(this.is_active == UVM_ACTIVE) |
| this.driver.seq_item_port.connect(this.sequencer.seq_item_export); |
| |
| this.req_ack_analysis_port = this.monitor.in_analysis_port; |
| endfunction |
| |
| endclass |
| `endif |
|
|
| |
| `ifdef ICBMstAgt |
| class ICBMasterAgent #( |
| real out_drive_t = 1, |
| integer addr_width = 32, |
| integer data_width = 32 |
| )extends uvm_agent; |
| |
| |
| ICBSequencer #(.addr_width(addr_width), .data_width(data_width)) sequencer; |
| ICBMasterDriver #(.out_drive_t(out_drive_t), |
| .addr_width(addr_width), .data_width(data_width)) driver; |
| ICBMonitor #(.out_drive_t(out_drive_t), |
| .addr_width(addr_width), .data_width(data_width)) monitor; |
| |
| |
| uvm_analysis_port #(ICBTrans #(.addr_width(addr_width), .data_width(data_width))) icb_analysis_port; |
| |
| |
| `uvm_component_param_utils(ICBMasterAgent #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width))) |
| |
| function new(string name = "ICBMasterAgent", uvm_component parent = null); |
| super.new(name, parent); |
| endfunction |
| |
| virtual function void build_phase(uvm_phase phase); |
| super.build_phase(phase); |
| |
| if (this.is_active == UVM_ACTIVE) |
| begin |
| this.sequencer = ICBSequencer #(.addr_width(addr_width), .data_width(data_width)) |
| ::type_id::create("sqr", this); |
| this.driver = ICBMasterDriver #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width)) |
| ::type_id::create("drv", this); |
| end |
| |
| this.monitor = ICBMonitor #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width)) |
| ::type_id::create("mon", this); |
| |
| `uvm_info("ICBMasterAgent", "ICBMasterAgent built!", UVM_LOW) |
| endfunction |
| |
| virtual function void connect_phase(uvm_phase phase); |
| super.connect_phase(phase); |
| |
| if(this.is_active == UVM_ACTIVE) |
| this.driver.seq_item_port.connect(this.sequencer.seq_item_export); |
| |
| this.icb_analysis_port = this.monitor.in_analysis_port; |
| endfunction |
| |
| endclass |
| `endif |
|
|
| |
| `ifdef ICBSlvAgt |
| class ICBSlaveAgent #( |
| real out_drive_t = 1, |
| integer addr_width = 32, |
| integer data_width = 32 |
| )extends uvm_agent; |
| |
| |
| ICBSequencer #(.addr_width(addr_width), .data_width(data_width)) sequencer; |
| ICBSlaveDriver #(.out_drive_t(out_drive_t), |
| .addr_width(addr_width), .data_width(data_width)) driver; |
| ICBMonitor #(.out_drive_t(out_drive_t), |
| .addr_width(addr_width), .data_width(data_width)) monitor; |
| |
| |
| uvm_analysis_port #(ICBTrans #(.addr_width(addr_width), .data_width(data_width))) icb_analysis_port; |
| |
| |
| `uvm_component_param_utils(ICBSlaveAgent #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width))) |
| |
| function new(string name = "ICBSlaveAgent", uvm_component parent = null); |
| super.new(name, parent); |
| endfunction |
| |
| virtual function void build_phase(uvm_phase phase); |
| super.build_phase(phase); |
| |
| if (this.is_active == UVM_ACTIVE) |
| begin |
| this.sequencer = ICBSequencer #(.addr_width(addr_width), .data_width(data_width)) |
| ::type_id::create("sqr", this); |
| this.driver = ICBSlaveDriver #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width)) |
| ::type_id::create("drv", this); |
| end |
| |
| this.monitor = ICBMonitor #(.out_drive_t(out_drive_t), .addr_width(addr_width), .data_width(data_width)) |
| ::type_id::create("mon", this); |
| |
| `uvm_info("ICBSlaveAgent", "ICBSlaveAgent built!", UVM_LOW) |
| endfunction |
| |
| virtual function void connect_phase(uvm_phase phase); |
| super.connect_phase(phase); |
| |
| if(this.is_active == UVM_ACTIVE) |
| this.driver.seq_item_port.connect(this.sequencer.seq_item_export); |
| |
| this.icb_analysis_port = this.monitor.in_analysis_port; |
| endfunction |
| |
| endclass |
| `endif |
|
|
| `endif |
|
|