Skip to content

Instantly share code, notes, and snippets.

@iDoka
Created September 3, 2018 16:46
Show Gist options
  • Save iDoka/df5ebaf7f55bcda62ed7408b96fcf6d9 to your computer and use it in GitHub Desktop.
Save iDoka/df5ebaf7f55bcda62ed7408b96fcf6d9 to your computer and use it in GitHub Desktop.
always @* block with a single non-blocking assignment - good or bad? try it by yoursefl!
`timescale 1ns/1ps
module tb();
reg a;
nonblocking nba(.a(a));
blocking ba(.a(a));
initial begin
a = 1'b0;
#10 a = 1'b1;
#10 a = 1'b0;
#10 $finish;
end
endmodule
module nonblocking (input a);
reg b,c;
always @*
begin
b<=a;
c<=b;
end
endmodule
module blocking (input a);
reg b,c;
always @*
begin
b=a;
c=b;
end
endmodule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment