Skip to content

Commit efce624

Browse files
authored
Merge pull request #17 from sy-c/master
doc update
2 parents dee3352 + e98d557 commit efce624

File tree

2 files changed

+42
-13
lines changed

2 files changed

+42
-13
lines changed

doc/README.md

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ The base class ReadoutEquipment is derived in different types:
3131
memory without hardware readout card.
3232
- ReadoutEquipmentRORC : the readout class able to readout CRORC and CRU
3333
devices, using the ReadoutCard library DmaChannelInterface for readout.
34+
- ReadoutEquipmentCruEmulator : a class emulating CRU data, with realistic
35+
LHC clock rates.
3436

3537

3638
## Aggregator
@@ -50,23 +52,44 @@ by readout. Counters can be published to O2 Monitoring system.
5052
CRU internal data generator.
5153
- ConsumerDataSampling : pushes data through the DataSampling interface
5254
- ConsumerFMQ : pushes data outside readout process as a FairMQ device.
55+
- ConsumerFairMQChannel : pushes data outside readout process as a FairMQ channel - with the WP5 format.
56+
This consumer may also create shared memory banks (see Memory management) to be used by equipments.
5357

5458
They all follow the interface defined in the base Consumer Class.
5559

5660

5761
# Memory management
5862

59-
Depending on the readout equipment, memory is allocated in different ways.
60-
The base class to pre-allocate and get/release at runtime memory blocks is
61-
defined in DataFormat/MemPool.h
63+
Readout creates on startup some banks (big blocks of memory),
64+
which are then used to create pools of data pages which are filled at runtime
65+
by the readout equipments (and put back in the same pool after use).
6266

63-
For the dummy software generator, it is a big block of malloc() data.
64-
For the ROC, it is based on MemoryMappedFile shared memory.
67+
The memory layout is explicitely defined in the configuration file.
68+
69+
In practice, you will define one or more memory blocks to be used
70+
by the equipments. Each block is configured in a section named [bank-...]
71+
(e.g. [bank-a1]), specifying its type (e.g. type=malloc or type=MemoryMappedFile),
72+
size (e.g. size=256M or size=4G) and optionally NUMA node to be used
73+
(e.g. numaNode=1).
74+
75+
The special consumer 'FairMQChannel' may also create a memory bank,
76+
allocated from the FMQ "unmanaged shared memory" feature, before the other banks
77+
are created (and hence, being the first one, being used by default by equipments).
78+
79+
Each equipment will then create its private data pages pool from
80+
a given bank. This is done in the corresponding equipment configuration section
81+
with number (memoryPoolNumberOfPages=1000) and size of each page (memoryPoolPageSize=512k),
82+
and which bank to use (memoryBankName=bank-a1). By default of a bank name,
83+
readout will try to create the pool from the first bank available.
84+
Several memory pools can be created from the same memory bank, if space allows.
6585

6686

6787
# Data format
68-
Readout uses the data format defined in FlpPrototype.
69-
The base data type is a vector of header+payload pairs.
88+
Readout uses the data format defined in FlpPrototype for internal indexing of the pages.
89+
The content (payload) of the pages is not affected, and follows the RDH specification
90+
if using a CRU equipment.
91+
92+
The (internal) base data type is a vector of header+payload pairs.
7093
In practice, it deals with different object types:
7194
- DataBlock : header+payload pair
7295
- DataBlockContainer : object storing a DataBlock, specialized depending on
@@ -85,6 +108,12 @@ Consumers should be prefixed as [consumer-...]
85108
Settings for data sampling are in section [sampling] (NB: to be moved to a consumer instead?).
86109
General settings are defined in section [readout]
87110

111+
To setup a new readout configuration starting from the provided file, the basic steps are:
112+
- define a memory layout suitable for your readout.
113+
- define the equipments to be used, and their parameters (in particular, the memory bank they should use.
114+
If not specified, readout will use the first one available).
115+
116+
88117

89118
# Usage
90119

readout.cfg

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ channelAddress=ipc:///tmp/readout-pipe-0
164164
unmanagedMemorySize=2G
165165
disableSending=0
166166
#need also a memory pool for headers and partial HBf chunks copies
167-
memPoolNumberOfElements=100
168-
memPoolElementSize=128k
167+
memoryPoolNumberOfPages=100
168+
memoryPoolPageSize=128k
169169

170170

171171

@@ -185,8 +185,8 @@ enabled=0
185185
eventMaxSize=8000
186186
eventMinSize=8000
187187
idleSleepTime=100
188-
memPoolNumberOfElements=100
189-
memPoolElementSize=3200k
188+
memoryPoolNumberOfPages=100
189+
memoryPoolPageSize=3200k
190190
# number of links enabled
191191
numberOfLinks=16
192192
# base id of link - incremented with number of links
@@ -199,8 +199,8 @@ enabled=0
199199
eventMaxSize=8000
200200
eventMinSize=8000
201201
idleSleepTime=100
202-
memPoolNumberOfElements=100
203-
memPoolElementSize=3200k
202+
memoryPoolNumberOfPages=100
203+
memoryPoolPageSize=3200k
204204
numberOfLinks=16
205205
linkId=200
206206

0 commit comments

Comments
 (0)