cms-gem-daq-project / gem-light-dqm

GEM light DQM code
0 stars 17 forks source link

Description of Zero Suppression Data Format #36

Closed rodwyer100 closed 5 years ago

rodwyer100 commented 5 years ago

The New VFAT zero suppression payload; familiar but with a few key differences

Details about the Data Structure

  1. The first line up to BC (bunch cross count) is identical; the last 16 bits of this line is a control sequence.

2.The control sequence will detail which packet of 8 channels is nonzero (i.e. 1001 means first and last nonzero)

  1. Afterwards a variable number of packets follow, each 8 bits, and then the 16 bit CRC as before.

Things to Tackle

  1. Changing the last 16 digits of line 1 from data to control sequence is easy, but that control sequence is really imperative to keeping track of channels

  2. I have implemented an array uint8_t packets[16] to hold the various packets upcoming, may not be the best way.

  3. In order to correctly read off the CRC after all the packets, I needed to count the number of 1's in the control sequence. Method I used may not be optimal.

  4. The variable position of the CRC means that there may be required a lot of empty space at the end of a particular line in order to keep the VFAT payload one block of 64 bit lines.

Context (for feature requests)

  1. At the moment changes are just being made to the VFAT read_fw,sw,tw methods in GEMAMC13EventFormat.h, but changes will also need to be made to their instances in the unpacker c++ file (now read_fw accepts two arguments, one to switch modes).

  2. I am just starting this project; at the moment the changes look like they made only need to be applied locally, but that may change as I look into the surroundings of the unpacker file.

  3. Below is a schematic that compares the two types of VFAT payloads

comparison
mexanick commented 5 years ago

@rodwyer100 can you please close this issue and open a new one, where you can fill the template please? It will just make the text a bit easier to read.

rodwyer100 commented 5 years ago

I have corrected the formatting issue

jsturdy commented 5 years ago

Can you create a new tab in this, the quality of the attached image is too low.

I note that in this format you are assuming a fixed setup for how the EC/BC bits are allocated, which is fine, but should be explicitly stated (this part of the VFAT is also configurable)