6 - 1 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
- 6. System Simulation
Hardware-Software Codesign 6. System Simulation Lothar Thiele - - PowerPoint PPT Presentation
Hardware-Software Codesign 6. System Simulation Lothar Thiele Swiss Federal Computer Engineering 6 - 1 Institute of Technology and Networks Laboratory System Design (worst-case) system simulation perf. analysis specification (this
6 - 1 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 2 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
system simulation (this lecture) (worst-case)
(lectures 10-11)
6 - 3 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 4 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
[IEEE Standard Dictionary of Electrical and Electronic Terms]
inputs
6 - 5 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
system
Load
Network Processor Example model
6 - 6 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
Example: state space modeling of continuous time driven systems
6 - 7 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
x1 x4 x2 x3
6 - 8 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 9 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
time continuous state space (in continuous time) discrete state space (in discrete time) time
1 2 3 1 2 3 4
6 - 10 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
events A A B C D A A B C D
6 - 11 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 12 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 13 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
x(t):
input token
stored token System input token queue server
x(t) t t2 t1 t3 t5 t4 t6 t7
Model State trajectory
6 - 14 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
x(t) t
6 - 15 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
x(t) t x(t) t t2 t1 t3 t5 t4 t6 t7 Continuous time Discrete time events in in out in in in
in in out in in in
6 - 16 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 17 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
Concurrent processes are usually modeled using the concept of modules
signals Modules can be hierarchical, i.e., there can be modules inside of modules The system behavior is governed by events event-driven simulation
6 - 18 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
(in this case, lists are sorted by event times).
event time by processing the next event in the event list.
the respective module is scheduled.
remove events), and manipulate the system state.
6 - 19 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
states of subsystem modules, fill the event queue with initial events
event queue
time when the event is to occur
particular type of event occurs
initialize while (!StopCriterion) set clk to next event time update simulation output generate simulation report
calling subsystem module(s)
event queue simulation cycle
6 - 20 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
simulation cycle
6 - 21 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
t + δ t + 2δ t + nδ simulation cycle
(δ). Processing of an event that takes 0 time according to the original system model now takes δ time.
6 - 22 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 23 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 24 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 25 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
Standard channels for various MoC’s Kahn process networks, static dataflow, etc. Methodology specific channels master/slave lib, etc. Elementary channels signal, timer, mutex, semaphore, FIFO, etc. Core language modules ports processes interfaces channels events Data types logic type (0’XZ) logic vectors bits and bit vectors fixed point numbers C++ built-in types (int, char, double, etc.) C++ user-defined types C++ language standard
SystemC core language
structural description, concurrency, communication, and synchronization
Data types On top of core language and data types: Communication mechanisms, e.g., signals, FIFOs. Models of computation (MoCs) SystemC builds on C++ Upper layers built on top of lower layers
also be used without passing throught the upper layers
SystemC language
6 - 26 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 27 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
n1 n2 n3 n4 A B F alternatives to define connections between modules
6 - 28 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
processes SC_MODULE ports
6 - 29 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
event in the associated sensitivity list
an event).
6 - 30 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 31 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 32 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
Process 1 Process 2 Internal signals Input ports I/O ports Output ports Sensitivity Module
6 - 33 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 34 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 35 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 36 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 37 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 38 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 39 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 40 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 41 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 42 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 43 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 44 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 45 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 46 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 47 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
KPN will deadlock unless an initial token is put in the loop:
6 - 48 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 49 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
6 - 50 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory
(Untimed) functional level
Transaction level
development, timing estimation
Register transfer level /pin level
Functional Transaction-Level Register Transfer Level