to update model state. Cycle-based simulation is par-
ticularly suited to systems that naturally have a fixed
time-step (such as clocked digital systems, discrete-
time queues and computer networks).
An event-driven approach may be more efficient
for simulating systems where the frequency of activi-
ties vary widely over time or across components in the
system. However it is fundamentally difficult to paral-
lelize the event-driven simulation algorithm, although
there exists a large body of research in this direction
(Fujimoto, 1990). This is because the event queue
either needs to be shared across multiple parallel pro-
cesses/threads, or divided in a coherent manner. The
difficulty also arises because the time increments are
dynamically computed and are not known up-front.
VHDL, Verilog and SystemC (OSCI, 2021) are
some examples of discrete-event frameworks that al-
low modeling of system structure and behavior of
concurrent entities with respect to simulation time.
While VHDL and Verilog are meant for detailed
hardware-level modeling, SystemC has been used
for hardware-level, Register-Transfer-Level(RTL) as-
well-as system-level simulations (Fummi et al., 2008)
and is designed to support incremental transition from
abstract descriptions to detailed hardware-level mod-
els.
For building purely architecture-level models of
large clocked systems for rapid design exploration,
SystemC may not be the best choice. This is be-
cause SystemC uses an event-driven simulation ap-
proach which is fundamentally difficult to parallelize.
SystemC was intended to also support hardware-level
modeling and provides constructs such as signals. (A
signal is essentially a state variable which when up-
dated, can automatically trigger activity in other com-
ponents that are sensitive to the signal.) Although
parallelization of SystemC simulations using paral-
lel discrete-event (PDES) algorithms has been ex-
plored (D
¨
omer et al., 2012) the achievable speedup is
low for most benchmarks. General-purpose discrete-
event simulation frameworks such as SimPY (SimPY,
2021) typically do not provide any special constructs
for modeling system structure and use event-driven
approach since their primary focus is on model-
ing flexibility. A cycle-based simulation approach
can be easier to parallelize and is often well-suited
for architecture-level modeling of clocked-systems.
Cycle-based simulation has been used in libraries
such as Cascade (Grossman et al., 2013) and Sys-
temCASS(Buchmann and Greiner, 2007), which is a
cycle-accurate variant of the SystemC kernel.
This paper describes Sitar - a framework for mod-
eling discrete-event, discrete-time systems. It con-
sists of a modeling language and a cycle-based sim-
ulation kernel. The design of Sitar is driven by the
goal of supporting fast, scalable and parallel simu-
lation, while also being expressive enough to ease
modeling and validation effort. Its key design feature
is a two-phase, cycle-based simulation algorithm
which makes the simulation efficient and easy to par-
allelize.
Sitar has been in development since 2013. It
was initially developed as an internal tool, specif-
ically targeted for creating architecture-level mod-
els of Multi-core systems for design exploration.
Subsequently the design and simulation kernel were
improved and simplified, retaining the most useful
features to create Sitar Version 2.0 which is avail-
able as open-source under an MIT licence. The
online repository is present at the following url:
https://nehakaranjkar.github.io/sitar/.
The main focus of this paper is on presenting the
design and architecture of Sitar, along with its ratio-
nale. We first summarize the differentiating aspects
of Sitar in the following paragraphs. In Section 2, we
present an overview of Sitar, describe its underlying
execution model and discuss the parallel simulation
strategy. In Section 3 we present an overview of the
Sitar modeling language, using illustrative examples.
The framework has been used for creating a detailed
cycle-accurate model of a multi-core system for de-
sign exploration studies. In Section 4 we describe our
experience and the performance and scalability ob-
served for this use case. We present a summary and
discuss future work and conclusions in Section 5.
1.1 Related Work
The differentiating aspects of Sitar in the context of
other cycle-based simulation frameworks are summa-
rized below:
• Sitar uses a two-phase cycle-based execution
model (described in detail in the next section)
which makes it possible to execute components of
the model in parallel, in a deterministic way.
Parallel execution is non-trivial because the exact
order in which the individual components in the
model are executed can affect the results, leading
to a race condition. In frameworks such as Cas-
cade (Grossman et al., 2013) and SystemCASS
(Buchmann and Greiner, 2007), deterministic ex-
ecution is achieved by first building a static de-
pendency graph between the components. The be-
havior of components in each cycle is executed in
this statically-computed order. If there are loops
in this dependency graph, the components within
the loop are executed multiple times until conver-
gence.
Sitar: A Cycle-based Discrete-Event Simulation Framework for Architecture Exploration
143