I have the following task that makes use of the ‘force’ statement to set some signals to a constant.
In the testbench, this task is invoked multiple times, each time with a different RTL signal.
As I found out, this task would not work because the input is passed by value; the RTL signal itself is never affected by the ‘force’ statement in the task.
Any suggestions?
Thanks
task force_task;
input [4:0] force_numbytes;
force force_numbytes = 5'b0;
release force_numbytes;
#10;
// some checking procedure is removed for conciseness.
force force_numbytes = 5'b11111;
#10;
// some checking procedure is removed for conciseness.
release force_numbytes;
endtask