Title: Usage of SystemC for simulation of event building
1Usage of SystemC for simulation of event building
- S.Linev, Darmstadt, GSI, 9/09/2004
2Network topology, W.Müller, 2/09/2004
3Event based switching scheme
TNet
BNet
Contr.
HNet
to high level computing
4BNet scheme, W.Müller, 2/09/2004
5Modified BNet scheme
6What is SystemC?
- As described on www.systemc.org
- The SystemC library of classes and simulation
kernel extend C to enable the modeling of
systems. The extensions include providing for
concurrent behavior, a notion of time sequenced
operations, data types for describing hardware,
structure hierarchy and simulation support. - Can be used for discrete event simulation
- It is freeware
7DAQ simulation with SystemC
- Provide realistic FEE signals generation
- Have a possibility of integration of MC-simulated
data - Functional models of different components with
proper time behaviour - Define a data format for exchange between model
components
8Proposal for data format
- Requirements
- all data flows can be separated by packet of
variable size - simple algorithm to merge data of several packets
into one - data of following packet should not depend from
previous one - all entities of the system should use same
format. - Possible implementation
- packet defined as array of 4 bytes values
- some of packet 4-bytes values are defined as
markers - packet always should be started from marker
value - marker includes 4-bit type and 28-bit data parts
- marker (depending on type) can be supplied by
additional data - size of additional data is always defined by
marker type.
9List of marker types
Type Name Marker data (28 bits) Supplied data
0 Epoch Value of time epoch in 10 µs units. no
1 Time shift To achieve 1 ns precision inside 10 µs epoch, 13-14 bits are required no
2 Detector channel identifier Unique channel identifier number. Can be devided on three parts system number like STS, TRD etc subsystem number STS1, TRD2 etc channel inside subsystem Size and format of data are defined by subsystem number (STS1)
3 Net addr Destination or source network addres to route packet inside switch network no
4 Histogram histogram id 2048 bytes
5 Peak amplitude (14 bits), width (14 bits) no
6 Event tag unique id for event (group of the events) no
7 Schedule Number of slots inside schedule no
8 TDS cmd. Command identifier in time distribution no
10Current status
- Set of basic classes
- TPacket container for data, exchanged between
modules - TPacketInput, TPacketOutput synchronous ports
- TPacketInOut asynchronous I/O port with FIFO
- TPacket_ch data channel (wire) for ports
connection - TBaseModule base module with debugging
capabilities - Primary implementation for modules
- MEventGenerator generator of primary event data
- MDetectorPart receiver of FEE data
- MConcentrator concentrator for FEE channels
- MActiveBuffer active buffer between CNet and
BNet - MHistogramming histogram builder over several
active buffers - MSwitchNetwork BNet implementation
- MController BNet TNet controller
11SystemC modules in development
MDetectorPart
MConcentrator
MActiveBuffer
TNet
BNet
Contr.
MController
MHistogramming
MSwitchNetwork
MEventProcessor
HNet
to high level computing
12To be done in next 2-3 months
- Complete implementations of functional models
- Improve event generator to simulate fluctuations
of beam intensity and detectors dark noise - Investigate on running model
- data rates over different channels
- latency of event tagging algorithm
- feasible model of BNet switch network.