I'm relatively new to SV. I'm building a testbench in which I want to monitor a signal and take some action if it value changes @ clock posedge. I’m looking for a compact way to this (I.e. not using a register).
logic [31:0] var_signal
Inizialmente
begin
for(i=0; i<max_cles; i++) begin
@(posedge clk_i);
//check if var_signal changed and do something
end
end
I searched the web and found threads on assertions but it is not what I want to do here. Any hints?