One of the designer’s on our team wants to write an assertion to check that ‘clk’ on any edge of ‘clk’ has known value:
assert property( @(clk) disable iff (rst) (~$isunknown(clk)))
what are the implications of sampling ‘clk’ itself on any edge of ‘clk’ ?
One of the designer’s on our team wants to write an assertion to check that ‘clk’ on any edge of ‘clk’ has known value:
assert property( @(clk) disable iff (rst) (~$isunknown(clk)))
what are the implications of sampling ‘clk’ itself on any edge of ‘clk’ ?
The sampled value of signal clk is its value at the Preponed region.
Thus, for clk going from X to 1, the sampled value of clk is X.
For clk going from 1 to X, the sampled value of clk is 1
See my paper: Understanding Assertion Processing Within a Time Step (Horizons Feb 27, 2023 issue)
This paper details how evaluation regions should be handled by a simulator as described in the SystemVerilog LRM; this should give you a better understanding of how assertions work.