V
Valentin Tihomirov
Guest
this code causes 100% simulation failure.
Rx <= '1'; wait for 1 * BIT_TIME; -- initialize a bit value
assert (Rx = '0') -- fail if bit = '1'
report "Invalid data received1!"
severity failure;
assert (Rx = '1') -- fail if bit = '0'
report "Invalid data received2!"
severity failure;
wait until AVAIL = '1';
wait; -- will wait forever
I need to check a vaue after AVAIL rises to '1'. But the following test
shows that simulator ignores ASSERT clauses placed between WAIT forever
statement.
Rx <= '1'; wait for 1 * BIT_TIME; -- initialize a bit value
wait until AVAIL = '1'; -- wait for condition
-- these assertions are ignored by simulator!
assert (Rx = '0') -- fail if bit = '1'
report "Invalid data received1!"
severity failure;
assert (Rx = '1') -- fail if bit = '0'
report "Invalid data received2!"
severity failure;
wait; -- will wait forever
Does ModelSim behaves properly?
Rx <= '1'; wait for 1 * BIT_TIME; -- initialize a bit value
assert (Rx = '0') -- fail if bit = '1'
report "Invalid data received1!"
severity failure;
assert (Rx = '1') -- fail if bit = '0'
report "Invalid data received2!"
severity failure;
wait until AVAIL = '1';
wait; -- will wait forever
I need to check a vaue after AVAIL rises to '1'. But the following test
shows that simulator ignores ASSERT clauses placed between WAIT forever
statement.
Rx <= '1'; wait for 1 * BIT_TIME; -- initialize a bit value
wait until AVAIL = '1'; -- wait for condition
-- these assertions are ignored by simulator!
assert (Rx = '0') -- fail if bit = '1'
report "Invalid data received1!"
severity failure;
assert (Rx = '1') -- fail if bit = '0'
report "Invalid data received2!"
severity failure;
wait; -- will wait forever
Does ModelSim behaves properly?