IMPORTANT VERILOG CODING PROBLEM

Status
Not open for further replies.

choonlle

Full Member level 2
Joined
Jul 18, 2006
Messages
126
Helped
20
Reputation
40
Reaction score
1
Trophy points
1,298
Location
AFRICA
Activity points
2,025
Case A:
always @(ctrl or dataIn0 or dataIn1)
dataOut <= (ctrl) ? dataIn1 : dataIn0;

Case B:
always @(ctrl or dataIn0 or dataIn1)
dataOut = (ctrl) ? dataIn1 : dataIn0;

Which case is correct? WHY?
 

Case A: is correct!
 

    choonlle

    Points: 2
    Helpful Answer Positive Rating
No Case B is correct. Because combinational logic.
 

case B is correct as it is combinational assignment. bcoz for combinational circuit use blocking assignments. h/w in both the cases will be the same.. it only affects simulation

Sachin
 

I make final conclusion :

A is correct !


Finally, i get this answer from Verilog Coding & Synthesis Book.
 

Can you please upload that book
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…