The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 4th, 2024, 1:38pm
Pages: 1
Send Topic Print
which one is mostly preferable in between ?: and if else in verilog design (Read 2356 times)
Kotesh
New Member
*
Offline



Posts: 1

which one is mostly preferable in between ?: and if else in verilog design
Oct 21st, 2013, 10:29pm
 
In verilog design, we have ?: operator and if..else statement.

for ex: c = foo ? a:b
for ex: if (foo)
c = a;
else
c = b;

which one of the above code is preferable in verilog design prospective

- - - Updated - - -

and what is the difference between them.

Shall i use ?: operator in design rather than if..else . If Yes, why?
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: which one is mostly preferable in between ?: and if else in verilog design
Reply #1 - Nov 5th, 2013, 8:16am
 
I don't think it matters.  Is there any difference when doing the corresponding operations in C?
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.