.. program:: ghdl .. _USING:Simulation: Simulation and runtime ###################### .. _simulation_options: Simulation options ================== In most system environments, it is possible to pass options while invoking a program. Contrary to most programming languages, there is no standard method in VHDL to obtain the arguments or to set the exit status. However, the GHDL runtime behaviour can be modified with some options. For example, it is possible to pass parameters to your design through the generic interfaces of the top entity. It is also possible to stop simulation after a certain time. The exit status of the simulation is ``EXIT_SUCCESS`` (0) if the simulation completes, or ``EXIT_FAILURE`` (1) in case of error (assertion failure, overflow or any constraint error). Here is the list of the most useful options. For further info, see :ref:`DEV:Debugging`. .. option:: -gGENERIC=VALUE Set value `VALUE` to generic with name `GENERIC`. .. WARNING:: This is currently a run option; but in the future it will be deprecated to become an elaboration option only. .. option:: --assert-level= Select the assertion level at which an assertion violation stops the simulation. `LEVEL` is the name from the `severity_level` enumerated type defined in the `standard` package or the ``none`` name. By default, only assertion violation of severity level ``failure`` stops the simulation. For example, if `LEVEL` was ``warning``, any assertion violation with severity level ``warning``, ``error`` or ``failure`` would stop simulation, but the assertion violation at the ``note`` severity level would only display a message. Option :option:`--assert-level=none <--assert-level>` prevents any assertion violation from stopping simulation. .. option:: --ieee-asserts= Select how the assertions from ``ieee`` units are handled. `POLICY` can be ``enable`` (the default), ``disable`` which disables all assertions from ``ieee`` packages and ``disable-at-0`` which disables only at the start of simulation. This option can be useful to avoid assertion messages from ``ieee.numeric_std`` (and other ``ieee`` packages). .. option:: --stop-time=