Home / Learn Verilog / casez and casex
casez and casex
Wildcard matching.
In shortWildcard matching.
What's actually going on
In plain terms
In casez, z and ? bits in a label are wildcards; casex also ignores x.
Why we use it
Priority encoders and instruction decoding.
Under the hood
Prefer casez; avoid casex (it hides x bugs).
Real-world use
- Everyday RTL design
- FPGA and ASIC projects
- Testbenches and debugging
Try it
casez priorityVerilog: edit and run
? matches any bit.
Quick quiz
1. In casez ? means...
Wildcard.