System Verilog 中component组件和object之间数据传输

之前一直对seq和driver或者monitor等component组件的数据传输不太清楚,在学习了大佬的写法之后,记录一下整体的结构,后续学习使用

 以从monitor向sequence中传输数据为例:

在monitor和sequencer中使用uvm_blocking_peek端口

//monitor 组件,声明peek_export端口
class task_monitor extends uvm_monitor;
  uvm_blocking_peek_imp#(task_item, task_monitor) peek_export;
  
  function new(string name = “task_monito”, uvm_component parent=null);
    super.new(name, parent);
    peek_export = new("peek_export",this);
  endfunction

  ......

endtask


//sequencer ,声明peek_port端口
class task_sqr extends uvm_sequencer#(task_item);
  uvm_blocking_peek_port#(task_item) peek_port;
  
  ......
endtask

在agent中连接

class task_agent extends uvm_agent;
  task_minotor monitor;
  task_driver  driver;
  task_sequencer sqr;
  
  .......
  function viod connect_phase();
    super.connect_phase(phase);
    if(is_active == UVM_ACTIVE)begin
      driver.seq_item_port.connect(sqr.seq_item_expor
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值