HCAL oSLB Notes
This page contains some potentially useful notes about the HCAL optical SLB used
to connect the HCAL HO HTRs to the muon trigger system. These "oSLB" pre-date
the identically named ones used to connect other HCAL HTRs to the upgraded
calorimeter trigger.
See
main oSLB page for detailed documentation
Data Format
The oSLB uses a GOL (
user manual) transmitter which
is capable of operating in GLINK or Ethernet modes. The oSLB hard-wires the GOL to "GLINK Fast" mode.
In the firmware, the "CAV" bit which enables sending of command frames using the GLINK protocol are
set to zero, so no command frames are sent. Also, the "FLAG" and "FF" inputs are sent to zero.
This leaves two modes for GOL output:
- Data mode (when bit 7 of CSR (address 0x4) is 1)
- IDLE mode (when bit 7 of CSR (address 0x4) is 0)
The IDLE pattern is according to the GOL documentation the special symbol
0xff0
.
Firmware Notes
For some reason I find the structure of this firmware exceptionally confusing!
Here are some notes I am making to help understand it:
OSLB.vhd is the top level. It instantiates 3x
H0_sender (note
zero not
letter o).
ho_rpc.vhd has 3 entity definitions:
LPM_RAND_GEN,
LPM_PART_DATA_SENDER and
H0_SENDER.
H0_SENDER is the top level. It instantiates one
LPM_PART_DATA_SENDER with the following variables set:
- LPM_PART_WIDTH = 8
- LPM_PART_NUM = 4
- LPM_CHECK_WIDTH = 8
This means that in_data width is 24, out_data width is 32. Some more constants set in the code:
- DATA_WIDTH = 32
- DATA_CHECK_WIDTH = 24
- MUX_CHECK_WIDTH = 3 (?) signal old : std_logic_vector( 7 downto 0)
When in 'RPC pseudo-random mode':
A funtion
LPM_RAND_GEN is used to generate 8 bits of data for each byte sent.
It has an input 'val' and output 'gen_out' (8 bits) plus resetN and initN inputs.
Random value is initialized to test_data (set in registers).
Then updated according to algorithm:
function GetRndVal(rnd :TSLV) return TSLV is
constant LEN :TVL := rnd'length;
variable RndVar :TSLV(LEN-1 downto 0);
begin
RndVar := rnd;
RndVar(LEN/2) := RndVar(0) xor not(RndVar(LEN-1));
RndVar(LEN-1 downto 0) := (RndVar(LEN-2 downto 0) & RndVar(LEN-1)) xor rnd;
return (RndVar);
end function;
--
EricHazen - 05 May 2014