>Is there a way to check if the value of a register in verilog is
>undefined? If there is then how?
Yes; "if (fooreg === X)"
--
Muzaffer Kal
DSPIA INC.
ASIC/FPGA Design Services
In Verilog, use the exclusive xor reduction operator to produce a
single bit. If the result is 1'bx, at least one bit of the register
was X
if (^myreg === 1'bx) ...
In SystemVerilog, you can use
if ($isunkown(myreg)) ...
If you mean in simulation, then yes, you can check for X, see other
replies. If you mean in actual h/w, ie, synthesized design, then the
answer is no.
John Providenza