Skip to content

ESYNet User Manual : Simulation Engine

wangeddie67 edited this page May 1, 2019 · 34 revisions

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

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.

Event definition in ESYNet

ESYNet defines five events, includes: packet generation (EVG), router pipeline (ROUTER), link transmission (WIRE), credit transmission (CREDIT) and NI read (NIREAD).

Each event should provide the following information:

Fields Data type NOTE EVG ROUTER WIRE CREDIT NIREAD
m_event_time double Event time. Y Y Y Y Y
m_pipe_time double Pipeline time for different frequency field. Y
m_mess_type long Event type. Y Y Y Y Y
m_src_id long Source id. Y Y Y Y
m_src_pc long Source physical channel. Y Y Y
m_src_vc long Source virtual channel. Y Y Y
m_des_id long Destination id. Y Y Y Y
m_des_pc long Destination physical channel. Y Y Y
m_des_vc long Destination virtual channel. Y Y Y
m_flit EsynetFlit One flit. Y Y Y Y