5.7.1. Standalone simulation without a debug server

If the simulation is started without a debug server, the scheduler operates as shown in Figure 5.10. This is the default startup mode.

The simulation steps are:

Initializing the simulation

The simulation is started and initialized:

  1. The simulation is started by calling sc_start() from the simulation environment.

  2. A wait() callback is issued. The time parameter is zero and the mode parameter is SG_MODE_INIT.

    The wait() callback is issued only once immediately after the start of simulation.

Running the simulation

After the initial callback, the simulation enters a loop to execute the following simulation steps:

  1. If stopped, the simulation exits.

  2. The start_of_quantum() callback is issued with parameter SG_MODE_RUN if the quantum has not been already been interrupted.

  3. SG-platform is simulated for a time quantum equivalent to the number of simulation steps specified by set_quantum().

  4. A wait() callback is issued with the time parameter equivalent to the actual simulated time in the SG-platform.

    This is typically used to issue a SystemC wait() to hand over control to the SystemC model to simulate the same amount of time and synchronize the two models. This is the default implementation. A custom simulation environment can reimplement this callback.

Figure 5.10. Simulation without a debug server


Copyright © 2007-2009 ARM Limited. All rights reserved.ARM DUI 0370H
Non-Confidential