ROD FDR / PRR Firmware Overview • Introduction • Design Overviews

Download Report

Transcript ROD FDR / PRR Firmware Overview • Introduction • Design Overviews

ROD FDR / PRR
Firmware Overview
•
•
•
•
•
25/05/2016
Introduction
Design Overviews
Device Utilisation
Firmware Management
Conclusion
1
Introduction
•
•
•
•
•
18 G-links
Input FPGA
– Data formatting & buffering
INPUT
FPGA
Switch FPGA
– buffering, packet building & S-link control
Monitor FPGA
– VME-accessible RAM
– (PCI to daughter card & embedded PC core)
VME FPGA
– motherboard registers, chip selects
VME
FPGA
INPUT
FPGA
INPUT
FPGA
SWITCH
FPGA
VME
CPLD
To 4
S-Links
INPUT
FPGA
INPUT
FPGA
MONITOR
FPGA
VME CPLD
– DTACK, BRDSEL, Reset register
& System ACE Control
25/05/2016
Ian Brawn & Weiming Qian
2
Input Firmware Variants
•
•
13 variants of Input FPGA firmware required
– different data sources; compression levels; neutral
Compiled into 8 System ACE collections:
ACE
ROD Type
Address
0
PPM DAQ
Uncompressed
1
PPM DAQ Compressed
2
PPM DAQ
Super-compressed
3
CP DAQ
4
JE DAQ
5
CP RoI
6
JE RoI
7
Neutral
•
INP firmware varients
PPM Uncompressed
PPM Compressed
PPM Supercompressed
CPM DAQ + CMM CP DAQ
JEM DAQ + CMM JE DAQ
CPM RoI
JEM RoI + CMM JE RoI
Neutral
Only Input FPFA firmware differs between variants
25/05/2016
Ian Brawn & Weiming Qian
3
Input FPGA Overview
•
Input FPGA divided into 2 blocks:
•
Formatting Logic
– front-end data processing
– specific to given Input FPGA variant
•
Input FPGA
Formatting
Logic
Common
Logic
Common Logic
– back-end interface to Switch FPGA
– common to all Input FPGA variants
25/05/2016
Ian Brawn & Weiming Qian
4
Input FPGA - Formatting Logic
•
13 f/w variants required for
–
–
–
•
Subslice suppression
Zero suppression
GLink
DAV
GLink DAV
Debounce
Control
Logic
GLink
Data
Serial/Parallel
Conversion
Data
Formatting
Suppression
Write
Enable
Error checking
–
–
–
–
–
•
Control
Signals
X4
Suppression
–
–
•
1 Neutral format
10 Native formats (without compression)
2 Compression formats (see next slide)
GLink down
GLink protocol error
GLink parity error
LVDS link error
BCN mismatch
Error
Checking
FIFO
Data
Error
Maximizing data throughput
–
–
1 tick DAV gap for native formats
3 ticks DAV gap for neutral format
25/05/2016
Ian Brawn & Weiming Qian
5
Input FPGA – PPM Compressed Formatting Logic
B
B
A
Input data from
1 G-link = 1 PPM
A
A
A
A
•
B
B
B
•
•
•
•
•
Requires more resources than other formats
Data arrive serially 1 ASIC / G-link pin
Rotation, buffering (BlockRAM)
MUX to compression algorithm 1 channel / time
Lossless compression: deviations from minimum value
of channel
Variable length bit fields
Most efficient of 6 encoding schemes applied to channel
Requires PPM data of 1 LUT + 5 FADC slices
Noise dominates data – compression tuned for this
Compression algorithm well tested in physics
simulation: 70% data reduction c.f. requirement = 46%
Output = bit-stream chopped into as many S-link words
as required
ASIC 15
ASIC 2
ASIC 1
ASIC 0
•
•
•
•
•
B
A
B
A
Buffer
Compression
•
•
•
No hardware testing or simulation of complete FPGA
Device utilization is a concern, but optimization seems
likely
PPM Super-Compressed very similar architecture: data
thresholded before compression
25/05/2016
Ian Brawn & Weiming Qian
bitstream
bitstream
bitstream
Common Logic
6
Input FPGA – Common Logic
Data buffering
•
Event Manager FIFO stores event lengths &
error flags
•
Handshake to Switch
•
Generates status words for overflowed &
missing (timed-out) event packets
•
Recovers from error conditions without
intervention
•
All FIFOs have programmable BUSY thresholds
•
Data & EvtMng FIFOs built from BlockRAM
•
BCN FIFO distributed RAM
•
Clock domains crossed only by asynchronous
FIFOs
25/05/2016
x4
Formatting Logic
•
Switch clock
domain
Common Logic
Overflow /
timeout
Data
32
Data
32
Data FIFO (8k)
wen
Error
Flags
BCN
Ian Brawn & Weiming Qian
Cntr
12
Local
VME
EvtMng
FIFO (512)
Buffer
Ctrl
BCN FIFO
(16)
Output
Ctrl
Switch FPGA
G-Link clock
domain
ROD Busy
7
Switch FPGA
•
•
•
•
•
•
Cascaded switch structure
3 Slink routing configuration
5 Input FPGAs
4 Output Slinks
Over 100 combinations
Complex flow control
–
•
Synchronize 5 input FPGAs,
4 SLinks and 1 TTC stream
Input FPGA0
Input FPGA1
Input FPGA2
Slink Data
Assembling
SLink0
Slink Data
Assembling
SLink1
Slink Data
Assembling
Input FPGA3
Slink Data
Assembling
Input FPGA4
Copy
Mode
SLink2
SLink3
Complicate timeout behaviour
–
–
GLink timeout
TTC trigger type timeout
25/05/2016
Switch Control
Ian Brawn & Weiming Qian
TTC Info control
8
Switch FPGA – Slink routing mode 0
Input FPGA0
Input FPGA1
Input FPGA2
Input FPGA3
Input FPGA4
25/05/2016
Slink Data
Assembling
SLink0
Slink Data
Assembling
SLink1
Slink Data
Assembling
SLink2
Slink Data
Assembling
SLink3
Input FPGA0
SLink0
Input FPGA 1
SLink1
Input FPGA 2
SLink2
Input FPGA 3 & 4
SLink3
Ian Brawn & Weiming Qian
9
Switch FPGA – Slink routing mode 1
Input FPGA0
Slink Data
Assembling
SLink0
Slink Data
Assembling
SLink2
Input FPGA1
Input FPGA2
Input FPGA3
Input FPGA4
25/05/2016
Input FPGA 0 & 1
SLink0
Input FPGA 2 & 3 & 4
SLink2
Ian Brawn & Weiming Qian
10
Switch FPGA – Slink routing mode 2
Input FPGA0
Slink Data
Assembling
SLink0
Input FPGA1
Input FPGA2
SLink2
Input FPGA3
Input FPGA4
Input FPGA 0 & 1 & 2 & 3 & 4
25/05/2016
Ian Brawn & Weiming Qian
Slink 0 & 2
11
Monitor FPGA
•
Receives data from Switch FPGA, copied from Spy buffers
– 4 x Rocket IO transceivers (total 4 Gbit/s) (untested)
– 20 x160 MHz point-point links (3.2 Gbit/s)
•
Can process data for monitoring purposes
– 2 CPUs in FPGA (XC2VP20) + external instruction RAMs
– PCI interface using commerical core (33 MHz, 64 bit) to PMC daughter board (untested)
– interface to external Dual-Port RAM (64K x 32) with VME access (untested)
•
•
•
Monitor FPGA intended to provide capacity for monitoring as need arises
As yet firmware undeveloped as no clear requirement has been identified
Current firmware consists only of VME interface, data links to Switch FPGA
and interface to Dual Port RAM.
25/05/2016
Ian Brawn & Weiming Qian
12
VME CPLD & FPGA
VME CPLD
•
•
Implements key VME functions:
– DTACK, BRDSEL, Reset register & System ACE Control
VME access to board possible if FPGAs fail to configure & configuration can be initialised
VME FPGA
•
•
•
•
Generates chip select signals
Implements motherboard Register map
I2C interface to TTCrx
Access to System ACE internal registers
25/05/2016
Ian Brawn & Weiming Qian
13
Device Utilisation (1)
VME CPLD
- XCR3384XL
Macrocells:
Pterms:
Registers:
Pins:
Fn Block Inputs:
VME FPGA
- XC2VP20-5ff896
Slice Registers:
4 input LUTs:
IOBs:
Block RAMs:
114/384 =
148/1152 =
48/384 =
145/208 =
161/960 =
242/18,560 =
399/18,560 =
266/556 =
1/88 =
30%
13%
13%
70%
17%
1%
2%
47%
1%
Switch
- XC2VP30-5ff896
Slice Registers:
4 input LUTs:
IOBs:
Block RAMs:
4,743/27,392 =
6,491/27,392 =
463/556 =
60/136 =
17%
23%
83%
44%
Input FPGA, all except PPM compressed
- XC2VP20-5ff896
Slice Registers: 3,096–7,799/18,560 = 16–42%
4 input LUTs:
5,021–8,415/18,560 = 27–45%
IOBs:
264/556 =
47%
Block RAMs:
64/88 =
72%
Monitor FPGA
- XC2VP20-5ff896
No figures available
25/05/2016
Ian Brawn & Weiming Qian
14
Device Utilisation (2)
Input FPGA, PPM compressed
- XC2VP20-5ff896
Slice Registers:
9,258/18,560 =
4 input LUTs:
15,330/18,560 =
IOBs:
262/556 =
Block RAMs:
84/88 =
49%
82%
47%
95%
Input FPGA, PPM compressed
- XC2VP30-5ff896
Slice Registers:
9,258/27,392 =
4 input LUTs:
15,330/27,392 =
IOBs:
262/556 =
Block RAMs:
84/136 =
33%
55%
47%
61%
25/05/2016
– current device
– footprint compatible alternative
Ian Brawn & Weiming Qian
15
Firmware Management
Design Team
•
James Edwards, Ian Brawn, Weiming Qian, Adam Davis, Dave Sankey
•
Areas of responsibility with well-defined interfaces
Design Tools
•
FPGAdvantage: HDL Designer, Modelsim, Precision Synthesis
•
XISE (+ EDK)
Version Control
•
Synchronicity used for version control, archiving & file sharing; archive @ RAL
•
May move to CVS @ CERN when firmware more stable
•
Each FPGA design has incremental revision number – file name & readable from VME
•
Log in VHDL: who, when, what
•
System ACE collections have incremental revision numbers
Distribution
•
via web page
– Full history, log & instructions for building ROD collections
•
May place collections in EDMs when stable
25/05/2016
Ian Brawn & Weiming Qian
16
Conclusion
•
•
•
•
•
Most firmware well developed
– Confident further changes will be tweaks rather than major rethinks
Except Input FPGA for PPM Compressed code, devices have plenty of spare
capacity for logic changes
Working practices in place will benefit us after production
Some development of firmware still required, particularly PPM Compressed logic
– Test
– Reduce device utilisation
Monitor FPGA undeveloped due to no current requirements
– Exists to provide spare resources which may prove useful later
25/05/2016
Ian Brawn & Weiming Qian
17