vhdl_reference_93:assertion

Assertion

[ label : ] assertion ;
  • function_statement_part
  • procedure_statement_part
  • process_statement_part

assert condition

[ report expression ]

[ severity expression ]

boolean _expression

  • relation { and relation }
  • relation { or relation }
  • relation { xor relation }
  • relation [ nand relation ]
  • relation [ nor relation ]
  • relation { xnor relation }

The REPORT expression have to be of type string.

In absence of the REPORT clause the default string “Assertion Violation.” will be used.

The SEVERITY expression have be of type severity_level. Possible values are: note, warning, error, failure.

In absence of the SEVERITY clause the default error will be used.

It is checked whether signal_reset is not equal to 1 .

ASSERT signal_reset = '1' ;

If variable_reset is not equal to 1 the report ``Reset is active`` is given.

ASSERT variable_reset = '1'
REPORT "Reset is active !" ;

If the condition which is to be verified is not fulfilled an error is reported and measures in accordance with the severity level are taken.

ASSERT reset = '1' OR set = '1'
  REPORT "Reset and Set" &
         "simultaneously active !"
  SEVERITY failure ;

If data is not equal to 0 a severity note containing the current value of data is given.

ASSERT data = 0
REPORT "Datum ist gleich " &
      integer_to_string( data ) & " !"
SEVERITY note ;

This assertion automatically (false) stops (severity_level = failure) the simulation at the time evaluated

ASSERT false
REPORT "End of simulation!"
SEVERITY failure ;