Difference between case, casex and casez
Difference between case, casex and casez
Model answer
- case : exact match; $x$ and $z$ are compared literally. No match → default . - casez : $z$ (also written ? ) in either the selector or an item is a don't care. - casex : both $x$ and $z$ are don't cares. {|c|c|c|}\hline Input data & casez item 2'b1? & casex item 2'b1?\\ \hline 10 & match & match\\ \hline 1z & match & match\\ \hline 1x & no match & match\\ \hline x1 & no match & match\\ \hline 0x & no match & no match\\ \hline casez is preferred. casex *is* synthesizable but discouraged: an $x$ on the selector silently matches an item in simulation, hiding X-propagation bugs, and simulation can differ from synthesized hardware.