[SOLVED] hi whats the meaning of the statement "assign c=(a>b);" in verilog????

Status
Not open for further replies.

me0414013

Junior Member level 3
Joined
Aug 30, 2012
Messages
28
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
ongole
Activity points
1,504
if a>b it assigns a to c,if not it assigns to b. is that all.
is it same as "assign c=(a>b)? a:b;"
can u please suggest a good book on verilog?
 
Last edited:

Re: hi whats the meaning of the statement "assign c=(a>b);" in verilog????

if a>b it assigns a to c,if not it assigns to b. is that all.
can u please suggest a good book on verilog?

Hi friend ,[assign c=(a>b)]; and assign c= (a>b)?a:b; are different

assign c= (a>b)?a:b;
if a greater than b then c=a;
if a less than b then c=b;


and
here
[assign c=(a>b)]; it works like a true or false condition checking

if a greater than b then c=1;
if a less than b then c=0;


Hope this may be helpful to you...
Rest of the friends correct me if i am wrong...
 
Last edited:
Re: hi whats the meaning of the statement "assign c=(a>b);" in verilog????

thanks a lot
 

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