1 Star 0 Fork 0

大浪淘沙/uvm_practive_first

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
my_agent.sv 1.02 KB
一键复制 编辑 原始数据 按行查看 历史
大浪淘沙 提交于 2022-02-12 21:57 +08:00 . init
`ifndef MY_AGENT_SV
`define MY_AGENT_SV
class my_agent extends uvm_agent;
// data or class properties
`uvm_component_utils(my_agent)
my_driver drv;
my_monitor mon;
my_sequencer sqr;
uvm_analysis_port#(my_transation) ap;
function new(string name="my_agent", uvm_component parent);
super.new(name, parent);
endfunction : new
extern virtual function void build_phase(uvm_phase phase);
extern virtual function void connect_phase(uvm_phase phase);
endclass : my_agent
function void my_agent::build_phase(uvm_phase phase);
super.build_phase(phase);
if(is_active==UVM_ACTIVE) begin
drv=my_driver::type_id::create("drv", this);
sqr=my_sequencer::type_id::create("sqr", this);
end
mon=my_monitor::type_id::create("mon", this);
endfunction
function void my_agent::connect_phase(uvm_phase phase);
super.connect_phase(phase);
if(is_active==UVM_ACTIVE) begin
drv.seq_item_port.connect(sqr.seq_item_export);
end
ap = mon.ap;
endfunction
`endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bai-mengwei/uvm_practive_first.git
git@gitee.com:bai-mengwei/uvm_practive_first.git
bai-mengwei
uvm_practive_first
uvm_practive_first
master

搜索帮助