Page 168 - DCAP405_SOFTWARE_ENGINEERING
P. 168
Unit 9: System Engineering
9.5 CODIS Framework Notes
Synchronization 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 (see Figure
9.14). 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 9.12).
Figure 9.12: C/D Synchronisation in CODIS
Figure 9.13 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:
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.
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.
LOVELY PROFESSIONAL UNIVERSITY 161