-
Notifications
You must be signed in to change notification settings - Fork 13
ESYNet User Manual : Simulation Engine
ESYNet utilizes an event-driven simulation engine to perform the cycle-accurate simulation. In this chapter, we first introduce the conception of event-driven simulation. After that, we introduce how ESYNet implements the simulation engine.
- [Event-driven Simulation](#Event-driven\ Simulation)
- [Event definition in ESYNet](#Event\ definition\ in\ ESYNet)
The event-driven simulator consists of a simulation engine and simulation components. Simulation engine drives the simulation process forward while simulation components store the status and do the operations. In ESYNet, simulation components contain the components in the NoC.
The kernel of the simulation engine is the event queue which stores in the event in the order of increasing time. The event is an abstraction of simulation operations. The time determines when the simulation engine should respond to the specified event.
During the simulation, the simulation engine takes out the first event in the event queue and calls suitable simulation components to respond to the event. Simulation components receive the event and change their status and generate new events if necessary. The new events are inserted back to the event queue.
The simulation engine continues the iteration until all the events in the event queue have been responded. Thus, if the event queue is empty, the simulation is finished. When the simulation starts, the first event should be inserted to the event queue so that the simulation can start. If the event queue is empty, the simulation is finished.
The simulation time depends on the number of events. For example, if the NoC is not under heavy traffic, the simulation time can be very fast because there is not much event. On the other hand, the simulation accuracy depends on the fine-grain of event definitions.
Copyright @ Junshi Wang