At posedge of clock, if I get reset, I want to check that data is zero one cycle after reset. I am not able to figure out how can I check data one cycle after I get reset. This is what i came up with but i know it is wrong as I am checking for data in the same clock cycle that reset is high. Please can someone let me know how can I do this in verilog?
always @(posedge clk)
if(reset)
if(data == 0)
$display("ok");
else
$display("error");