I have a situation: where I assert a val signal when a transaction is driven. It goes through a fixed pipelined design and then I want to trigger a checker module at the output. Initially had input_val and out_val signals, where out_val sig is assigned in the design:
always_ff @(posedge clk) begin
if ( reset ) begin
foreach(valid_pipe[i]) valid_pipe[i] <= '0;
end else begin
valid_pipe[0] <= i_val;
for ( int i = 1; i < PIPE_DELAY; i++ ) begin
valid_pipe[i] <= valid_pipe[i - 1];
end
end
end
assign o_val = valid_pipe[PIPE_DELAY - 1];
But my intention is to not involve the design to calculate the o_val, instead want the testbench to take care of it. Can someone please guide me ?
PS: The testbench is a simple driver/checker/generator model linked with the design using interfaces. No UVM involved