module foo;
// RTL code
// .
// .
// .
// .
// Then there is some SV code to introduce errors
`ifndef SYNTHESIS
error_module em_i0 ();
always @ (posedge some_event) begin
force something;
release something;
end
`endif
endmodule
How do I remove the SV code in this module and do the same thing using UVM bind?
Thank You!
Hi dave_59,
The link to your paper in this thread seems to be broken. I was not able to download it or view it. Can you please post the link again? Many thanks!
We have some discussions in our team regarding the issue of forcing/reading a HDL signal from UVM benches. Does anyone have a good recommendation or coding guideline for this?
My impression is that it’s always not recommended to use hierarchal reference from SV class, but I’d like to hear your opinion on this.
Currently we have 3 methods for this:
(1) Keep the hierarchical reference in the top-level testbench, connect the signal to an interface, and pass the interface to the UVM testbench. Then a test sequence can drive/read that signal thru the virtual interface.
(2) Bind the interface to the module that has the signal we need to drive/read, and pass the interface to the UVM bench. Similar approach as dave_59 addressed in this thread.
(3) Use UVM tasks uvm_hdl_read/force tasks. This may not be recommended since there could be a tool dependent issue that extra switches may need to be specified to make it work properly for a simulator. Also, if the path string pass to the tasks are not correctly, errors may not be reported.