uvm_reg peek 功能需要很长时间才能 return
uvm_reg peek function takes long time to return
我认为 uvm_reg
的 peek
函数 return 在 0 个模拟时间内编辑了值。由于我需要此功能,因此我实现了所有 HDL 后门访问路径。这是我在记分牌中使用的代码
while (state == DISABLE) begin
uvm_reg_data_t val = 'hDEADBEEF;
uvm_status_e status;
`uvm_info(get_name(), "Start peek", UVM_LOW)
my_reg_block.my_reg.peek(status, val);
`uvm_info(get_name(), "End peek", UVM_LOW)
assert (val == 'h0)
@posedge(my_vif.clk); //Advance clock
end
我的意图是:在每个时钟周期,在零模拟时间内,断言 state==DISABLE
时 my_reg
为 0。
在模拟 运行 中,我注意到这很好,直到 my_reg
发生变化。此时,Start peek -> End peek 大约需要 10 个时钟周期。这一次,我的状态不再是 DISABLE,当然 val != 'h0.为什么 peek 需要这么长时间才能到达 return?
我正在使用 Questasim 10.4a
这可能需要一些时间,因为 peek
是一个 SystemVerilog 任务,而不是一个函数。
Function will be executed in 0 Simulation Time, but Tasks can have the
timing delays as well.
这是它的定义。
virtual task peek( output uvm_status_e status,
output uvm_reg_data_t value,
input string kind = "",
input uvm_sequence_base parent = null,
input uvm_object extension = null,
input string fname = "",
input int lineno = 0 )
我认为 uvm_reg
的 peek
函数 return 在 0 个模拟时间内编辑了值。由于我需要此功能,因此我实现了所有 HDL 后门访问路径。这是我在记分牌中使用的代码
while (state == DISABLE) begin
uvm_reg_data_t val = 'hDEADBEEF;
uvm_status_e status;
`uvm_info(get_name(), "Start peek", UVM_LOW)
my_reg_block.my_reg.peek(status, val);
`uvm_info(get_name(), "End peek", UVM_LOW)
assert (val == 'h0)
@posedge(my_vif.clk); //Advance clock
end
我的意图是:在每个时钟周期,在零模拟时间内,断言 state==DISABLE
时 my_reg
为 0。
在模拟 运行 中,我注意到这很好,直到 my_reg
发生变化。此时,Start peek -> End peek 大约需要 10 个时钟周期。这一次,我的状态不再是 DISABLE,当然 val != 'h0.为什么 peek 需要这么长时间才能到达 return?
我正在使用 Questasim 10.4a
这可能需要一些时间,因为 peek
是一个 SystemVerilog 任务,而不是一个函数。
Function will be executed in 0 Simulation Time, but Tasks can have the timing delays as well.
这是它的定义。
virtual task peek( output uvm_status_e status,
output uvm_reg_data_t value,
input string kind = "",
input uvm_sequence_base parent = null,
input uvm_object extension = null,
input string fname = "",
input int lineno = 0 )