Cyclicity Simulation Engine - Signal Access
Gavin J Stark
v0.01
April 20th 2004
|
|
|
The simulation engine basically is a framework for cycle simulation, with the ability to
interconnect multiple module instantiations. Additionally the simulation engine provides access to data and signals within those
module instantiations, and within the interconnect. This access is exposed in some
exec files, and that access is describe here.
|
|
The simulation environment has some exec file additions to support interrogation of state accessible to
the simulation engine, and to support events and other inter-thread communication mechanisms when
state changes. The 'state' may be a global signal or data made availabl by a module instance.
- global_monitor_display( string global, string format, arguments)
- Set up a monitor of some global state, such that when that state changes
the specified string is displayed. The text displayed comed from a standard
exec file printf-like statement, with format and argments. The arguments are evaluated
at the time the string is generated, not when the monitor is created.
- global_monitor_eventy( string global, event event_name)
-
Set up a monitor of some global state, such that when that state changes the specified event is fired.
The event may be used to trigger some exec file thread to schedule, for example.
- integer global_cycle()
- This function returns the current cycle number of the simulation, starting from 0 at reset
- integer global_signal_value( string global_signal )
- This function returns the integer value of a signal at the current simulation time
- string global_signal_value_string( string global_signal )
- This function returns a textual form of the value of a signal at the current simulation time.
This may be the name of an FSM state, or an enumeration, or it may be digits or a hexdecimal
represenation of a bus value; it works for any size signal (even beyond 32 bits wide)
|
|
|
|