default item in Case expression

Status
Not open for further replies.

sun_ray

Advanced Member level 3
Joined
Oct 3, 2011
Messages
772
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,298
Activity points
6,828
What should we provide as the input to the default statement for a case expression in RTLs? Please provide the reasoning also for that.
 

What do you mean with "input to the default statement"?
 

That depends on whether you a re talking about combinatorial or sequential logic, and how complete your non-default case branch statements are. For combinatorial logic, you need to make sure that variables you are writing to are assigned at least once given every possible path through your process. If there are unspecified case branches, and the case statement is the only place you write to a variable, you need a default statement to make assignments to all variables to insure they do not turn into a latch.

Search for full case versus parallel case topics in Verilog or VHDL.

If you are writing in Verilog, you might want to read http://www.sunburst-design.com/papers/CummingsSNUG1999Boston_FullParallelCase.pdf
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…