task monitorPush();
begin
bit [7:0] data = 0;
while (1) begin
@ (posedge intf.clk);
if (intf.cb.wr_cs== 1 && intf.cb.wr_en== 1) begin
// @ (posedge intf.clk);
data = intf.data_in;
sb.addItem(data);
$write("%dns : Write posting to scoreboard data = %x\n",$time, data);
end
end
end
endtask
How is the above code different from below code? As in how does shifting posedge clock from line 5 to 7 change the code? Thanks in advance
task monitorPush();
begin
bit [7:0] data = 0;
while (1) begin
// @ (posedge intf.clk);
if (intf.cb.wr_cs== 1 && intf.cb.wr_en== 1) begin
@ (posedge intf.clk);
data = intf.data_in;
sb.addItem(data);
$write("%dns : Write posting to scoreboard data = %x\n",$time, data);
end
end
end
endtask