eFEX firmware  1.7.3
ATLAS l1-calo - electron and tau feature extraction firmware for eFEX boards

Back to eFEX documentation
Entities
RAW_data_rdout.vhd File Reference

RAW Calorimeter Data Readout Logic for process FPGA. More...

Go to the source code of this file.

Entities

RAW_data_rdout  entity
 RAW Calorimeter Data Readout Logic for process FPGA. More...
 
RTL  architecture
 RAW Calorimeter Data Readout Logic for process FPGA. More...
 

Detailed Description

RAW Calorimeter Data Readout Logic for process FPGA.

This module received synchronised 224-b Calorimeter RAW data and its associated 3-b error flags, and produces writes the data as 7 x 32-b words into dual port scrolling memory.

Upon receiving L1A signals, it produces RAW events of 32-b words with Headr, Trailer and error flags for transmission to control FPGA.

RAW Readout Logic Block Diagram

There are 40 ECAL and 9 HCAL input fibres.

Different RAW event are generated depending on buffer levels and control settings:

  1. Normal operation when only fibres with error flags set, are assembled into the RAW Event.
    • It takes 598 ticks of 280MHz clock to create one event as the FSM must read data for every fibre.
  2. Normal operation when there are no errors on any fibre.
    • In this case, the RAW Event consists of two header words, two error flag payload registers and one trailer word.
    • This RAW event takes 15 ticks of 280MHz clock to create as the fibre data is discarded.
  3. Read_All mode and TTC_Privilege Mode at very low L1A rates.
    • In this case the data for every fibre is assembled into RAW event regardless of error status of the links.
    • It takes 598 ticks of 280MHz clock to create one event as the FSM must read data for every fibre.
  4. Safe Mode operation when the buffer levels reach a programmable level.
    • In this case, the RAW Event consists of two header words and one trailer word.
    • It takes 11 ticks of 280MHz clock to create one event as the RAW data from all fibres are discarded.

Sequence of Buffers occupancy levels:

  1. When the Ready signal from Control FPGA is removed, complete RAW Events are stored in RAW Link Output FIFO.
    • When the occupancy of RAW Link Output FIFO reaches its pFULL occupancy level, then the construction of RAW Events are paused.
    • Enough headroom must be assigned in Link Output FIFO to be able to store RAW Events under Safe Mode operation.
  2. At this point, fibre data are still transferred from Circular DPRAM into de-randomisation RAW Data FIFO.
    • When the occupancy of de-randomisation RAW Data FIFO reaches its pFULL occupancy level, no more data is written to this FIFO, and a Safe Mode Flag is set which is stored in TTC FIFO with L1A_ID and BCN.
    • A BUSY request must be sent to HUB/ROD to reduce L1A rates at this time.
  3. At this stage, TTC FIFO and Error Flag FIFO continue to operate and store the L1A_ID, BCN and Error Status of MGT Fibres.
    • When the occupancy of TTC FIFO reaches its pFULL occupancy level, the FSM enters the Safe Mode Operation.
    • In Safe Mode, all buffers, except RAW Link Output FIFO, are flushed, and very small RAW Events are generated and stored in Link Output FIFO.

Under Safe Mode operation if the occupancy of TTC FIFO or Link Output FIFO, reaches its FULL occupancy level, then the system synchronisation is lost.

The GEN_CHANNEL loop, generates 49 copies of the RAW data readout blocks within it,these are:

The output of RAW Readout is: 32-bit data word 1-bit data is CHAR 1-bit valid which is the write enable to Link Output FIFO

Header Word:

Header Word 2:

Fibre Trailer Word:

Trailer Word 1:

Trailer Word 2:

Trailer Word 3:

CHAR constants are defined in data_type_pkg.vhd for reference only

Author
Saeed Taghavi

Definition in file RAW_data_rdout.vhd.