Page 244 - DCAP601_SIMULATION_AND_MODELING
P. 244
Simulation and Modelling
Notes 13.1.1 CODIS Framework
Synchronisation and Generic Architecture for C/D Simulation in CODIS
For an accurate synchronisation, each simulator involved in a C/D co-simulation must consider
the events coming from the external world and it must reach accurately the time stamps of these
events. We refer to this as events detection. These time stamps are the synchronization and
communication points between the simulators involved in the co-simulation. Therefore, the
continuous simulator, Simulink, must detect the next discrete event (timed event) scheduled by
the discrete simulator, once the latter has completed the processing corresponding to the current
time. In case of SystemC, these events are: clock events, timed notified events, events due to the
wait function. This detection requires the adjustment of integration steps in Simulink. The
discrete simulator, SystemC, must detect the state events. A state event is an unpredictable
event, generated by the continuous simulator, whose time stamp depends on the values of the
state variables (ex: a zero-crossing event, a threshold overtaking event, etc.). This implies the
control of the discrete simulator advancement in time: in stead of advancing with a normal
simulation step, the simulator has to advance precisely until the time stamp of the state event
(see Figure 13.1).
Figure 13.1: C/D Synchronisation in CODIS
Figure 13.2 illustrates the generic architecture used in CODIS for the C/D simulation. CM and
DM communicate through a co-simulation bus via simulation interfaces. Each simulation interface
presents two main layers:
1. The synchronization layer provides the synchronisation requirements discussed above
for both CM and DM; this layer is composed of three sub-layers, each of them achieving an
elementary functionality for synchronisation.
2. The communication layer is in charge of sending/receiving data between CM and DM.
More details on synchronization and CODIS simulation architecture may be found in
Bouchimma et al., 2005.
238 LOVELY PROFESSIONAL UNIVERSITY