Closed bdorney closed 4 years ago
Decoupling from the text file solution proposed in the mail thread...
This would be called once per VFAT
VFAT -> OH?
loops over unmasked vfats,
loop over bits in VFAT
idx = ohN * 24 + vfat + bitN
write sbit tap delay for this bit
idx = ohN * 24 + vfat + bitN
does not probably give you the indexing you are hoping for, you would probably need something like idx = (ohN * 24 + vfat) * 8 + bitN
Hi all,
The constants used by the firmware are derived from simple python files...
https://raw.githubusercontent.com/cms-gem-daq-project/OptoHybridv3/master/tools/polarity_swaps.py
Developing these rpc modules would be a matter of porting these constants from the linked python files into the desired format (keeping in mind that these are all in hardware numbering, and the numbering of VFATs needs to be reversed for compatibility with the software)
Also remember that v3b short and v3c short have the same configurations.
The files should be relatively self-explanatory... but to add some details for the record:
in the timing constants files, as an example:
v3c_long_trig_tap_delays = [
2 , # TU_OFFSET[0][0]
5 , # TU_OFFSET[0][1]
5 , # TU_OFFSET[0][2]
3 , # TU_OFFSET[0][3]
3 , # TU_OFFSET[0][4]
3 , # TU_OFFSET[0][5]
1 , # TU_OFFSET[0][6]
2 , # TU_OFFSET[0][7]
These are GEM_AMC.OH.OHX.FPGA.TRIG.TIMING.TAP_DELAY_VFATY_BITZ for VFAT23 bits 0-7. The numbering of the VFATY is reversed (23-i) but the numbering of BITZ does not change.
In the polarity swaps file, note that the sectors are counting from 1 (as it does in the hardware)..
Moved to the new GitLab repository (cmsgemos#89).
Brief summary of issue
Present tools do not allow multiple OH's on the same AMC to be programmed with different FW.
Promless method forces the same FW onto all links after a TTC hard reset. Using the SCA path through jtag could be one method, but it is very "slow." Additionally a straight forward python script may also be "slow" to execute (although in uhal it may be possible...but I don't know if uhal address tables for v3 electronics have been generated)
One "short-term" solution would be to write these registers in a dedicated RPC module at the time of configuration. The hope would be a "long-term" solution could be achieved next week at the camp...?
The registers in question are:
GEM_AMC.OH.OHX.FPGA.TRIG.TIMING.TAP_DELAY_VFATY_BITZ
, SBIT Tap Delays, there areNOH * NVFAT * 8
registers in total (each VFAT has 8 sbits)GEM_AMC.OH.OHX.FPGA.TRIG.TIMING.SOT_TAP_DELAY_VFATY
, SOT Tap Delay; there areNOH * NVFAT
registersGEM_AMC.OH.OHX.FPGA.TRIG.CTRL.SOT_INVERT
, there areNOH
registersGEM_AMC.OH.OHX.FPGA.TRIG.CTRL.VFATY_TU_INVERT
, there areNOH * NVFAT
registersWhere
X
,Y
andZ
are integers respectively specifying OH number, VFAT position, and SBIT (e.g.BIT
above) number.Types of issue
Expected Behavior
The remote rpc module would take the form of. This would be called once per VFAT
These functions would go in
optohybrid.h
.This would be an optional step in the detector configuration (since if the chamber has the right type, i.e. long or short, for the FW file in the CTP7 it is not needed).
Additionally we may find in the future that we need this function with a database interaction. Unknown...?
Current Behavior
No such functionality exists.
Context (for feature requests)
Need short term solution for writing trigger registers.
Also need a long term solution. Opening this issue for discussion before starting coding.