Historical perspective zOriginal notion in PDD: yMost pulses are simple SPE-like waveforms y“Recognize” SPE pulses & process waveforms xReport derived Q & time for these pulses yDon’t process all other complex waveforms xNo zero-suppression, report raw waveform zAlgorithmic implementation: unpleasant Two processing methods: bad idea
“Road Grader” Algorithm zPerspective: “Simple is Good” zRoad grader scrapes up all good data: yzero-suppression + data compression zSamples near baseline & below threshold are unimportant for timing & charge zAll fADC & ATWD waveforms treated identically zVery few parameters to meddle with y(and lose track of!) Stability of data guaranteed
Project Goals zSuppress and compress data to meet the data rate requirement for DOM-to-surface data transmission: < 20 kbytes/s/DOM zRealize compressor in firmware to minimize processing time. zEfficient operation within DAQ FPGA design zCPU to be used for state control, message management, etc, not for data processing
Technical description zWaveforms are similar to fax scan lines: yRun-length encoding, followed by Huffman encoding zSuppression replaces baseline data with zeroes zRun-length encoding counts the repetitions of same valued data zHuffman “lite” encoding replaces “zero” bytes with a “zero” bit
Suppression zATWD and fADC data words are 10 bits wide. zData below a threshold is replaced by zeros, and data above a threshold is left unchanged zThis produces a large run length of zero valued data, for a typical single-pulse waveform
ATWD pre-pulse behavior zBaseline noise is small, ± 2 counts peak-to-peak. zOccasional pre-pulse baseline “shift”: - 3 counts zThreshold is set 4 counts above the baseline. zMaximum threshold: 8 - 9 counts zTypical SPE: 200 counts at peak. zPulse samples with amplitudes above 8 -9 counts (~4% of an SPE) are never suppressed.
Threshold impact zThreshold causes not more than one sample of uncompressed data to be lost. zThere will be virtually no loss of useable waveforms due to compression. zPulse (non-zero) data will be identical to uncompressed data. zReconstructed pulse has negligible errors.
Run length encoding zZero-suppressed data is run-length encoded. zRun-length is zero for non-repeated data. zRun-length encoding produces number pairs: data followed by the number of repetitions. zPre-pulse: 0 0 0 0 0 0,4 zPulse: 43 89 22 43,0 89,0 22,0
Huffmann encoding zA zero-valued 10-bit word is replaced by a 1-bit wide “zero flag”. zA non-zero flag bit is added to non-zero data, forming a 11-bit word. zDecompression of data requires an additional flag bit 12 bit words.
Compressed data zThe compression ratio depends on the sampling rate, the pulse width, and waveform complexity. zCompressed data is 12 bits wide for both repeated zeros & non-repeated non-zero data values. zFor a pulse 8 samples wide, with leading and following zeroes, compressed data = 12 + (8 x 12) + 12 = 120 bits = 15 bytes zFor a pulse 4 samples wide, with leading and following zeroes, compressed data = 12 + (4 x 12) + 12 = 72 bits = 9 bytes
Data compression ratio zFor a 8 samples wide ATWD pulse: the compression ratio = 128 x 10/120 = 10 zFor a 4 samples wide fADC pulse: the compression ratio = 256 x10/72 = 35 zEvery hit also has an 8-byte header that includes the coarse time-stamp ( 32 bits) + various hit descriptor bits ( 32 bits)
Data flow rate - “Hard” LC zMode: Hard Local Coincidence yLC tag present: Header + ATWD + fADC data yLC tag absent: no data at all! Hit discarded! zData rate = (header + fadc + atwd) x tag rate = (8 + 15 + 9) x 15 Hz = 480 bytes/s yCompression is not really needed…but, yAll isolated hit data is lost
Data flow rate - “Soft” LC zOperating mode: Soft Local Coincidence yLC tag present: Header + ATWD + fADC data yLC tag absent: Header only, no ATWD, no fADC data zTagged data rate = (header + (fadc + atwd)) x tag rate = (8 + 15 + 9) bytes x 15 Hz = 480 bytes/s zNon-tagged rate = 8 x 735 Hz = 5880 bytes/s zSum = 6360 bytes/s zZero-suppression & run-length encoding needed
Data rates - “Flabby” LC zMode: Flabby Local Coincidence yLC tag present: Header + ATWD + fADC data yLC tag absent: Header only + fADC data, no ATWD zTagged data rate = (header + fadc + atwd) x tag rate = (8 + 15 + 9) bytes x 15 Hz = 480 bytes/s zNon-tagged data rate = (8 + (1 +.2) x 9) bytes x 735 Hz = 13,818 bytes/s zSum = 14,298 bytes/s (reasonable margin)
Possible issues zATWD baseline may need monitoring yBaseline drift, if any, needs to be tracked yEasy to imagine auto-tracking capability zATWD pulses over-sampled @ 300 MHz yTypical: ~11 samples/pulse yWhy is this? Pulses are wider than expected 1.Delay line + amps + ATWD driver affect r 2.PMT gain is probably higher than we need 3.Pulse tail adds many samples, little information
Summary z“Road grader” is conceptually simple. zReconstructed pulse fidelity is excellent. zCompression ratio meets project goals. zImplementation is pretty well-tested. zIncorporated in the new FPGA for DAQ. zATWD issues may need some attention. zNo obvious flaws preventing utilization.