Created
September 3, 2018 16:46
-
-
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!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`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