Home / Learn Verilog / Case Equality === and !==
Case Equality === and !==
Compare including x and z.
Quick summaryCompare including x and z.
How to think about this
The basic idea
=== matches x and z literally; == gives x if either side has x.
Why this comes up
Testbenches use it to detect unknown outputs.
The mechanics
Never synthesizable; for checking only.
Where it is used
- Everyday RTL design
- FPGA and ASIC projects
- Testbenches and debugging
Try it
x comparisonVerilog: edit and run
Use !== to catch unexpected x in self-checking tests.
Quick check
1. === treats x as...
Literal match.