Detect data change in test step
hasChanged(
returns u
)true
if the value of u
changes since the beginning of the test step.
Otherwise, hasChanged
returns false
.
Detect if x
has changed value. This statement returns
true
if x
has changed.
hasChanged(x)
For a bus with two signals, signal_1
and
signal_2
, and data
as the name of the input to the
test sequence, detect when the value of signal_2
has changed.
hasChanged(data.signal2)
hasChanged
statements can be used in the Test Sequence and Test
Assessment blocks and in Stateflow® charts.