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:

  1. Data mode (when bit 7 of CSR (address 0x4) is 1)
  2. 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':

  • check_data_ena = '1'

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

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2014-09-15 - EricHazen
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback