Output data structure in CODA

From PolWiki
Jump to: navigation, search

The electron detector ROC reads out data from v1495 slave boards and puts it in various subbanks based on the source and type of the incoming data. This section elaborates the format and structure in which this data is written.

Event types defined

 Event type 1 : Helicity Reversal events
 Event type 2 : photon single events
 Event type 3 : electron single events
 Event type 4 : coincidence of electron and photon single events


Sub banks used

 Single Event Data from Slave-1: 0x201
 Single Event Data from Slave-2: 0x202
 Single Event Data from Slave-3: 0x203
 Accumulation Data from Slave-1 : 0x204
 Accumulation Data from Slave-2 : 0x205
 Accumulation Data from Slave-3 : 0x206
 Parameter information about Slave-1 : 0x207
 Parameter information about Slave-2 : 0x208
 Parameter information about Slave-3 : 0x209
 Scaler Data from Slave-1 : 0x20A
 Scaler Data from Slave-2 : 0x20B
 Scaler Data from Slave-3 : 0x20C
 Scaler module 3801 in ROC2 : 0x210 
 redundant, if an event type different from defined values is encountered : 0x211 

Format of electron detector data

On every helicity reversal trigger(MPS), the contents of the Buffer with single event patterns is read out along with the contents of the accumulation counter for each strip. Each of these triggers will result in creation of the subbanks for the the event and accum data of the slaves used. (currently we are using 2 slaves, since we consider only the first 64 strips to have relevant information) Hence we have a total of 4 subbanks relevant to electron detector readout on each MPS trigger. Following diagram shows a typical view of the data structure as seen through XCEFDMP.

DataWithCalibInput 17.png

Next subsection elaborates the contents of the individual subbanks

Structure inside subbank 0x201 and 0x202

The single event data from v1495 slave-1 and slave-2 goes into 0x201 0x202 respectively.

The subbank has five 32 bit words.

1st word: hit-map on plane-1 for strip 1 through 32
2nd word: hit-map on plane-2 for strip 1 through 32
3rd word: hit-map on plane-3 for strip 1 through 32 
4th word: hit-map on plane-4 for strip 1 through 32
5th word: self-check info for the respective slave: 
 "0"| buf_RD_EMPTY | buf_FULL_ERR | buf_BUSY | buf_RD_COUNT(8bits) |"0000" | raw_trig_CNT(12bits) | "000"| Helicity	
 |<------------- 1st hex digit ------------->|<---- 2nd & 3rd ---->|<-4th->|<---5th, 6th & 7th--->|<-8th hex digit->|

For the last firmware revision, the 5th word is in the following format:

 "0000"| "0" | buf_RD_EMPTY | buf_FULL_ERR | buf_BUSY | buf_RD_COUNT(8bits) | raw_trig_CNT(12bits) | "000"| Helicity	
 |<1st>|<--------------- 2nd hex digit -------------->|<---- 3rd & 4th ---->|<---5th, 6th & 7th--->|<-8th hex digit->|

Details:

  • The above snapshot displays the 32 bits in hexadecimal format.
  • The least significant bit(bit 1) of the hit-map carries the hit-information of strip-1
  • Successively, the higher order bits represent hit-information for each next strip. Thus the 32 bits word has the hit-information of the 32 strips from that part of the detector.
  • The 5th word has the event buffer status information and the total number of triggers that were received during the previous helicity period. The information stored in this word is in the following order
    • Trigger Info
      • least significant bit: the delayed Helicity
      • next 3 bits: currently "000"
      • next 12 bits: raw_trig_CNT1(11 downto 0)
    • Buffer Status
      • next 4 bits: currently "0000"
      • next 8 bits: buf_RD_COUNT1(7 downto 0)
      • next bit: buf_BUSY
      • next bit: buf_FULL_ERR
      • next bit: buf_RD_EMPTY
      • most significant bit: currently "0"

Structure inside subbank 0x204 & 0x205

The accumulation mode data from v1495 slave 1 & 2 are written into subbank 0x204 and 0x205 respectively

The subbank has thirty-two words of depth 32 bits. Each word has the following format.

Most significant byte(bits 32-23): no.of hits in plane-1
Next significant byte(bits 24-17): no.of hits in plane-2
Next significant byte(bits 16-09): no.of hits in plane-3
Least significant byte(bits 01-08): no.of hits in plane-4

The words are organized in order of increasing strips. For example in the above snapshot displaying data from bank 0x205(slave-2)

1st word has accumulation data of strip-1,
2nd word has accumulation data of strip-2,
... and so on


Structure inside Parameter info sub-bank

 0x207: parameter information about slave-1
 0x208: parameter information about slave-2
 0x209: parameter information about slave-3

Each sub-bank has nine words, each 32 bit in the following order

Identifier beginning word
Firmware Revision Number
A mask
B mask
D mask
E mask
PWTL(8 bits) | PWDL(8 bits) | HOLDOFF(8 bits) | PL_Delay(8 bits)
Rejection Width(16 bits) | Accum trigger condition(8 bits) | Event trigger condition(8 bits)
Identifier ending word (commented out in the current format)

The respective slave identifier words are:

 slave #    beginning         ending
 slave 1    0xb1000000       0xb100000f 
 slave 2    0xb2000000       0xb200000f 
 slave 3    0xb3000000       0xb300000f 

As a visual example, the sub-bank parameter information as saved in run # 4042(taken Feb 2011) is shown in the following image.

EDet parameterInfo format.PNG

Structure inside Scalar sub-bank

The structure in the Scalar subbank is an exact duplicate of the Accumulation subbank


Similarly, data from slave-2 and slave-3 contains the hit map of strip 33-64 and 65-96 on all planes respectively in the above order.