Skip to content

Instantly share code, notes, and snippets.

Created April 16, 2011 02:23
Show Gist options
  • Select an option

  • Save anonymous/922787 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/922787 to your computer and use it in GitHub Desktop.
ding! ding! ding!
/* iverilog output 0.9.2
ding! ding!
ding!
ding! ding!
ding!
*/
/* vcs output
ding!
ding! ding!
*/
/* expected (?)
ding!
ding! ding!
ding!
*/
module m;
wire [3:0] x;
reg [3:0] y;
assign #0 x = y;
always @(y == 4'b1010)
$display("ding!");
always @(x == 4'b1010)
$display("ding! ding!");
initial
begin
#1;
y = 4'b0000;
#1;
y = 4'b1010;
y = 4'b1111;
end
endmodule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment