systemverilog参数传递值如何工作?

时间:2018-10-03 04:52:07

标签: system-verilog uvm

现在我正在分析UVM代码,如下所示。

 // UVM run_phase()
task run_phase(uvm_phase phase);
  forever begin
    // send the item to the DUT
    send_to_dut(req);
  end
endtask : run_phase

task send_to_dut(uart_frame frame);


endtask : send_to_dut

enter image description here 但是我很困惑send_to_dut(req)的req参数如何传递给send_to_dut(uart_frame frame)的{​​{1}}?真是令人困惑。

  

req-> uart_frame框架

1 个答案:

答案 0 :(得分:0)

之所以起作用,是因为在这种情况下, value 是一个 handle 类。句柄是对类对象的引用。因此,您正在按值传递参考。有关更多详细信息,请参见this link