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.

Solution to interview question about coding

Status
Not open for further replies.
Re: interview question

assign c= foo ? a:b;

For above statement, what will be the value of c, when all foo, a and b are "z"?
 

interview question

with the synthesis perspective, the first statement synthesizes to "MUX" and the second one synthesizes to a "PRIORITY ENCODER"
 

interview question

In simulation it will have problem only when selection line is "X". Otherwise there is no difference after synthesis, whether you implement with ternary or if/else?
 

interview question

I think, the differece is

the statemenyt c = foo ? a : b; is a concurent statement that any signal changes in LHS, a new value is assigned to RHS

but for statement if (foo) c = a; else c = b; is procedural statement that must written in always
if we are not include all the signals on LHS in sensitivity list the result will different from first one, otherwise it must same
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top