A RealTime Data Reduction and Processing Firmware for

  • Slides: 23
Download presentation
A Real-Time Data Reduction and Processing Firmware for SRS Raffaele Giordano Physics Dept. -

A Real-Time Data Reduction and Processing Firmware for SRS Raffaele Giordano Physics Dept. - University of Napoli “Federico II” and INFN Sezione di Napoli, Italy email: rgiordano@na. infn. it

Outline n n n Scalable Readout System physical view APV data parsing APV-FPGA relative

Outline n n n Scalable Readout System physical view APV data parsing APV-FPGA relative clock phase adjustment Pedestal correction (static) Pedestal correction (dynamic) Conclusions and future work Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 2

SRS Physical View From SRS website Raffaele Giordano RD 51 WG 5 meeting, CERN

SRS Physical View From SRS website Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 3

The APV Data Stream From Sorin Martoiu’s presentation n n Raffaele Giordano RD 51

The APV Data Stream From Sorin Martoiu’s presentation n n Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 Current driven signal (± 400 m. A) Stream with digital and analog info Digital: 3 -bit header, 8 -bit address, 1 -bit error flag Analog: 128 samples (1 time sample for 128 channels) When there is no data, the APV send synchronization pulses 4

12 -bit Digitized APV Data Stream n From Sorin Martoiu’s presentation n n Raffaele

12 -bit Digitized APV Data Stream n From Sorin Martoiu’s presentation n n Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 The whole stream is digitized on the hybrid-adapter board: 12 bits at 40 MHz (digital signal is inverted with respect to analog) In the present implementation, all the stream (even synch pulses) is transferred over Ethernet to the DAQ PC Need to transfer only the 128 channel data and skip synch pulses 5

APV Data Parser n n Simplified Block Diagram q Comparator Threshold 12 APV data

APV Data Parser n n Simplified Block Diagram q Comparator Threshold 12 APV data 12 > Control FSM 8 q address error flag n Header found n A module for parsing the APV digital info (header, address, error bit) and to output the actual data only has been designed Input: Data Reg. 12 7 -bit counter 7 data valid flag parsed data Output: q q q channel n n 12 -bit digitized APV stream 12 -bit threshold for discriminating the digital info in the APV stream 12 -bit APV data & qualifier (data valid flag) channel number APV Address & Error bit Fully pipelined Backward compatibility: need for a transparent mode? When there is not actual data from the APV (i. e. synch pulses) the data valid flag is kept low and parsed data bus is not updated Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 6

Simulation Strategy: APV Model Test bench (VHDL - Isim) APV Model (simplified) APV Parser

Simulation Strategy: APV Model Test bench (VHDL - Isim) APV Model (simplified) APV Parser n n Chipscope APV hybrid, hybrid-adapter & FEC card Library of Chipscope acquisition files used as benchmark VHDL model reads «real» APV streams acquired via Chipscope This approach makes it easier to debug the code After successful verification of the VHDL code => we tested the parser in the field Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 7

Testing the APV Parser in the Field Burst of time samples from APV Close-up:

Testing the APV Parser in the Field Burst of time samples from APV Close-up: 1 time sample from APV (128 -ch) 12 -bit digitized APV stream 128 -channel data headers Synch. Pulses APV Parser output Last value held Parsed data is valid Data valid Flag Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 8

APV/TPLL Clock Phase Adjustment range= 2300 counts Correct clock edge sampling n n range=

APV/TPLL Clock Phase Adjustment range= 2300 counts Correct clock edge sampling n n range= 1600 counts Wrong n clock edge sampling If APV sampling phase is not suitable with respect to ADC clock phase: signal sampled while it is not stable => poor digitization Need for adjusting the APV clock phase (i. e. the phase of the TPLL clock on the hybrid) The best phase is the one having the highest dynamics Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 9

TPLL Phase Auto-Adjuster n Reset Count done & all phase tried Get range (maxmin)

TPLL Phase Auto-Adjuster n Reset Count done & all phase tried Get range (maxmin) Count Not done Set best phase n n Count done & not all phase tried Done Change phase (enable Trigger) n max n Threshold for APV parser maximum range Based on exhaustive search of best suitable phase (24 possible phases) Trigger inhibited during the search, the phase adjuster only receives synch pulses For each phase the min-tomax range (in ADC counts) is measured during a predefined time window (e. g. 1024 clock cycles) The phase having the maximum range is selected after the search The adjuster also uses the range info to set a threshold value for the APV parser min Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 10

Simulation Strategy: APV+TPLL Model phase #0 Test bench (VHDL - Isim) phase #1 phase

Simulation Strategy: APV+TPLL Model phase #0 Test bench (VHDL - Isim) phase #1 phase #2 APV+TPLL Model (simplified) phase #N n Chipscope phase selection apv stream TPLL Phase Adjuster Threshold (for APV parser) … APV streams acquired with different TPLL phases n APV hybrid, n C-card & FEC card Designed a model of the APV+TPLL for simulating the phase selection The model uses a set of APV streams acquired with different TPLL phases to emulate the effect of a phase change on the APV stream The phase adjuster has been successfully tested in simulation Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 11

Pedestal (Static) n From Sorin Martoiu’s presentation n Pedestal variations on the time scale

Pedestal (Static) n From Sorin Martoiu’s presentation n Pedestal variations on the time scale of minutes (or longer) Due to q q n Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 Temperature? Power supply? Need periodic on-line pedestal measurement and correction 12

Chip or Channel ? n n n Measure and subtract the same pedestal for

Chip or Channel ? n n n Measure and subtract the same pedestal for all the channels? Or each channel has a different pedestal? We could perform an analysis on representative benchmark data (again to be acquired via chipscope) to evaluate the difference of the two methods Let us suppose this difference is negligible: we calculate one pedestal for the whole chip (i. e. all the channels) Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 13

Pedestal Measurer & Remover n Symplified Block Diagram Start Parsed APV data Pedestal analyzer

Pedestal Measurer & Remover n Symplified Block Diagram Start Parsed APV data Pedestal analyzer Two pedestal setting mode q Auto measured pedestal Manual Pedestal setting Enable Pedestal suppressor q Corrected Data out n n Automatic: acquire the pedestal from the stream (parsed APV data) Manual setting of the pedestal via a dedicated port Enable/Disable pedestal removal Fully pipelined Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 14

Simulation Results Calibration: pedestal measurement Correction: Subtraction of the pedestal from the data Estimated

Simulation Results Calibration: pedestal measurement Correction: Subtraction of the pedestal from the data Estimated pedestal APV stream Synch. Pulses Headers Corrected APV stream Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 15

Pedestal (Dynamic) From Sorin Martoiu’s presentation Raffaele Giordano RD 51 WG 5 meeting, CERN

Pedestal (Dynamic) From Sorin Martoiu’s presentation Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 n Currently performed as a 2 -step calculation offline (ask Sorin for details on the algorithm) 16

Dynamic Pedestal On-line Correction n n Correction on each sample depends on subsequent (future)

Dynamic Pedestal On-line Correction n n Correction on each sample depends on subsequent (future) samples Can use the present approach also on-line, but need memory for this q For instance with one V 5 Block-ram (36 kbits) configured as a FIFO n n we can cope with a burst of 20 time samples from APV (20 x 128 12 -bit digitized samples) minimum acceptable spacing between APV data bursts dependent on processing time for correcting the pedestal => need to be estimated Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 17

Embedded Processor ? n n A tiny FPGA-embedded processor (e. g. Xilinx Pico. Blaze)

Embedded Processor ? n n A tiny FPGA-embedded processor (e. g. Xilinx Pico. Blaze) could be used to run the dynamic pedestal correction algorithm on-line With respect to a standard FSM approach q Pros n n q flexibility: easy upgrade and/or modification of the program debug info and statistics might be available on a serial port Cons n n higher resource occupation, but still moderate (just 26 slices in a V 6) Slower due to IO overhead, but could solve this by means of dedicated peripherals and direct memory access Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 18

Lilo. Blaze: a Custom 8 -bit RISC architecture Microprocessor n n optimized to acquire

Lilo. Blaze: a Custom 8 -bit RISC architecture Microprocessor n n optimized to acquire 8, 12 or 16 -bit data, most important features are: q Timing predictability: every instruction takes always 2 clock cycles q High working frequency (100 MHz in Xilinx V 2 -1000 FPGA) q Very low logic footprint for scalability (2 k gates) => Read-out PC Lilo. Blaze CPU n a CPU+DAQ Peripherals for each APV Data reduction and processing firmware on FECcard APV Read-out PC 128 channels CPU APV Detector channels 0. . 127 CPU APV Detector channels 128. . 255 CPU APV Detector channels 256. . 383 CPU APV Detector channel N-127. . N … … Architecture compatible with Pico. Blaze in order to inherit its software tools and documentation 3/5/2021 Raffaele Giordano 19

Lilo. Blaze Close-up Preliminary n n Xilinx PROM 3/5/2021 n Raffaele Giordano Custom modified

Lilo. Blaze Close-up Preliminary n n Xilinx PROM 3/5/2021 n Raffaele Giordano Custom modified Pico. Blaze microprocessor Peripherals for real-time APV data processing Integrated 36 kbit Block Ram for APV data Serial IO interface Parallel (16 -bit) IO 20

Conclusions n SRS data reduction and feature extraction modules presently under development in Napoli

Conclusions n SRS data reduction and feature extraction modules presently under development in Napoli Features implemented and tested: q APV data parsing (successfully tested in the field) n n q Hybrid vs FPGA clock phase auto-adjustment (successfully verified in simulation) q Static pedestal estimate and correction (successfully verified in simulation) n q Features implemented and ready to be tested in the field: Under development: Dynamic pedestal estimate and correction q Custom microprocessor for enhanced feature extraction Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 21

Aknowlegdement n We wish to thank Hans and Sorin for all their help and

Aknowlegdement n We wish to thank Hans and Sorin for all their help and support in setting up the requirements and in testing the data reduction firmware in the field n Many thanks also to Givi and George (and again to Sorin) for providing the chipscope data as well as to Prof. de Asmundis and Marcin for helping out with the APV data format Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 22

Questions ? Ask Raffaele! Email: rgiordano@na. infn. it Office: +39 081 67 92 57

Questions ? Ask Raffaele! Email: rgiordano@na. infn. it Office: +39 081 67 92 57 Raffaele Giordano RD 51 WG 5 meeting, CERN April 14 th 2011 23