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.
Here, b will get "0" as the if condition fails here. Generally in the case of failing "if" .... else will get executed."else" doesn't look for any condition..failing of "if" is enough for "else" to get the execution.
If this is for a non-synthesizable code, then it's going to have a value of 0. but if this is a synthesizable code then after synthesis it's still 'X'.
stevepre is correct. Put it in another way: if you're answering your final test, write down 'b = 1' if you're facing real problem in your design, particularly for PL simulation, you will get 'x'.
Hi,
it's definitely 0 because if statement will see only condition is satisfied or not , and X will be treated as condition is not satisfied so b will be always 0.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.