Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[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
Junior Member level 3
Joined
Aug 30, 2012
Messages
28
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
ongole
Visit site
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????

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...
thanks a lot
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top