A
ARH
Guest
Is it true to use mixed Blocking and Nonblocking assignments in the
same always block ?
I have found this verilog code in SystemC 2.0 User's Guide at page
191:
http://www.cse.iitd.ernet.in/~cs5030223/UserGuide20.pdf
//////////////////////////////////////////////////////////////////////////////////////////////
module dffa(clock, reset, din, dout);
input clock, reset, din;
output dout;
reg dout;
always @(posedge clock or reset)
begin
if (reset)
dout <= 1b0; //nonblocking assignment
else
dout = din; // blocking assignment
end
endmodule
/////////////////////////////////////////////////////////////////////////////////////////////////
But one of the Coding style in the famous paper for nonblocking
assigment mentioned as follow:
Guideline #5: Do not mix blocking and nonblocking assignments in the
same always block.
http://csg.csail.mit.edu/6.375/papers/cummings-nonblocking-snug99.pdf
same always block ?
I have found this verilog code in SystemC 2.0 User's Guide at page
191:
http://www.cse.iitd.ernet.in/~cs5030223/UserGuide20.pdf
//////////////////////////////////////////////////////////////////////////////////////////////
module dffa(clock, reset, din, dout);
input clock, reset, din;
output dout;
reg dout;
always @(posedge clock or reset)
begin
if (reset)
dout <= 1b0; //nonblocking assignment
else
dout = din; // blocking assignment
end
endmodule
/////////////////////////////////////////////////////////////////////////////////////////////////
But one of the Coding style in the famous paper for nonblocking
assigment mentioned as follow:
Guideline #5: Do not mix blocking and nonblocking assignments in the
same always block.
http://csg.csail.mit.edu/6.375/papers/cummings-nonblocking-snug99.pdf