Hi,
The assertion below is not working as intended.
Spec: When ‘rst_b’ goes high, signal ‘valid’ should also go high and stay high as long as ‘rst_b’ is high. ‘Valid’ should go low in the same cycle that ‘rst_b’ goes low.
Here, the assertion passes in the second cycle and does not fail if valid goes low while rst_b is1.
Can someone help me understand why the ‘throught’ operator isn’t working in the assertion i wrote.
The syntax for this sequence is: expression_or_dist throughout sequence_expr. The throughout operator specifies that a signal (expression) must hold throughout a sequence
( b throughout R_sequence ) is equivalent to
( b [*0:$] intersect R_sequence )
// You need one of these 2 identical options
$rose(rst_b) |-> (valid [*1:$] ##1 !valid)] intersect (rst_b[*1:$]) ##1 !rst_b;
$rose(rst_b) |-> !valid [->1] intersect (!rst_b[->1]) ;
rst_b 0 1 1 1 1 0
valid x 1 1 1 1 0
rst_b[->1] 0 0 0 0 0 1
!rst_b[->1] 1 1 1 1 1 0
Read my paper and understand the equivalency of the trhoughtout.
$rose(rst_b) |-> (valid throughout rst_b) ##0 !valid;
Here you are saying that valid must be true throughout the length of the sequence rst_b that is ONE CYCLE long!
My apologies. There are 2 requirements in the original question ::
(1) When ‘rst_b’ goes high, signal ‘valid’ should also go high and stay high as long as ‘rst_b’ is high.
(2) ‘Valid’ should go low in the same cycle that ‘rst_b’ goes low.
I tried the following : edalink
However the assertion fails at T:45