CMX VME registers/memories map Y.Ermoline, Current Rev. 17-Apr-2014 ============================== VME memory map for FPGA_BSPT_FW_v2_20140417 This documents is based on the following sources: [1] Common Merger Module, Version 1.8, 18-Jul-2008 [2] Missing Energy Significance Trigger, Version 2.1, 3-November-2011 [3] CMM schematics "pc3203m5_schems.pdf", last revision 20.09.06 [4] VHDL package "vme_cmm.vhd", last revision 05.01.11 [5] TTCrx Reference Manual, December 2005, version 3.11 (for para 4.4) [6] XILINX System ACE CompactFlash Solution, DS080(v2.0) October 1, 2008 (for para 4.5) [7] CMX Firmware Specifications (Wojtek, Pawel, Yuri) [8] inputs from Murrough, Wojtek, Pawel [9] CMX schematics and network lists Guidelines (from CMM_V1.8): --------------------------- The computer can read all registers; hence there are no ‘write only’ registers. The register bits generally have the same meaning for reads as for writes. - All Status Registers shall be Read-Only (RO) registers. - All Control Registers shall be Read/Write (RW) registers. - Reading back a register generally returns the last value written. - Attempts to write to RO registers or undefined portions of registers result in the non-modifiable fields being left unchanged It is illegal for the computer to read or write a value that the CMM module itself is able to modify at the same time. If the computer reads a register (e.g. a counter) which the CMM module is modifying, a well-defined value is returned. When the address space occupied by the CMM module is accessed, it always responds with a handshake to avoid a bus error. The power-up condition of all registers is all zeros, unless otherwise stated. Setting a bit-field means writing a 1 to it, clearing it means writing a 0. ------------------------------------------------------------------------------- 1. List of registers as now implemented in VAT test card (for reference) 1.1 VAT card list of registers 1.2 Detailed VAT test card registers description 1.3 CMX_VAT FPGA pins/signals 2. Proposal for the CMX Board Support FPGA (BSPT_FPGA) VME register map 2.1 BSPT_FPGA list of registers 2.2 Registers related to the whole CMX module 2.3 Registers related to the CTP/BP LVDS Links Mngmnt status 2.4 Registers related to the optical components access via I2C 2.5 Registers related to the TTCrx chip on the TTCDec card 2.6 Registers related to the XILINX SystemACE chip 2.7 Registers related to the CANbus microcontroller =================================================================================================================================== 1. List of registers as now implemented in VAT test card (for reference) =================================================================================================================================== The VME-- base address ranges: CrateSlotNumber Module VME-- address 3 CMM0 0x00700000-0x0077FFFE 20 CMM1 0x00780000-0x007FFFFE 1.1 VAT card list of registers ------------------------------ Initial set of registers from Ian CMM specification and Uli ACE design Addr Re Name Size Description "vme_cmm" name FPGA Function Comments ----- -- ---- ---- ----------- -------------- ------- -------- -------- 00000 RO ModuleIdA 2 Module ID Register A ia_modulida Support VME CMX ModuleID 00002 RO ModuleIdB 2 Module ID Register B ia_modulidb Support VME CMX ModuleRew 00004 RW ControlModeReg 2 Control Mode Register ia_ctrlmode Support VME CMX ModuleControl 00006 RW ControlPulseReg 2 Control Pulse Register ia_ctrlpulse Support VME CMX ModuleResets 00008 RO StatusReg 2 Status Register ia_status Support VME CMX ModuleStatus 0000A RO FifoStatusReg 2 FIFO Status Register ia_fifostat Support VME CMX FIFOStatus 00040 RW TtcrxControl 2 TTCrx Control Register ia_ttc_c Support TTC CMX 00042 RO TtcrxStatus 2 TTCrx Status Register ia_ttc_s Support TTC CMX 00044 RO TtcNotReady 2 ->for test not in CMM spec ->not in "vme_cmm" Support TTC -> not implemented in CMX 00054 RO I2cId 2 I2C FPGA firmware version ia_i2cid Support TTC -> replaced by CMX ModuleRew 00056 RO VmeId 2 VME CPLD firmware version ia_vmeid Support VME -> replaced by CMX ModuleRew 00058 RO SystemAceVMEIf 2 System Ace VME Interface ia_sysace Support ACE -> replaced by CMX ModuleRew 0005C RW CanAccessA 2 CAN Access Register A ia_can_a Support CAN -> not implemented in CMX 0005E RW CanAccessB 2 CAN Access Register B ia_can_b Support CAN -> not implemented in CMX 001FA RW TtcI2Cid 2 TtcI2cId Register ia_ttc_id Support TTC -> not implemented in CMX 001FC RO TtcBrcst 2 TtcBrcst Register ia_ttc_brcst Support TTC CMX TTCDecBrcst 001FE RO TtcDq 2 TTC DQ Register ia_ttc_dqreg Support TTC CMX TTCDecDq 00200 RO TtcDump 32 TTC Dump RAM ia_ttc_dqram Support TTC CMX TTCDecDump 00300 RW 2 ->not in CMM spec ia_ace_ctrl -> Ian ACE replaced by Uli ACE 00302 RW 2 ->not in CMM spec ia_ace_d_msb -> Ian ACE replaced by Uli ACE 00304 RW 2 ->not in CMM spec ia_ace_rst -> Ian ACE replaced by Uli ACE 00306 RO 2 ->not in CMM spec ia_ace_out -> Ian ACE replaced by Uli ACE 00308 RO 2 ->not in CMM spec ia_ace_stats -> Ian ACE replaced by Uli ACE 04000 ->See SystemACE 96 ->See SystemACE ->not in "vme_cmm" Support ACE address from 04000 to 0405F 1.2 Detailed VAT test card registers description ------------------------------------------------ Addr Re Name Size Description "vme_cmm" name FPGA Function Comments ----- -- ---- ---- ----------- -------------- ------- -------- -------- 00000 RO ModuleIdA 2 Module ID Register A ia_modulida Support VME ---------------------------------------------------------------------------------------------- All bit fields are outputs from card. Bits 00-15: ModuleID A unique 16 bit number, set in firmware. vme_interface: module_id_a <= X"2417"; -- for CMM (RAL Number), for CMX - ?) CMM FPGA port: Internal Support FPGA signal, not connected to the FPGA port 00002 RO ModuleIdB 2 Module ID Register B ia_modulidb Support VME ---------------------------------------------------------------------------------------------- All bit fields are outputs from card. -> set in VAT to "095a" by jumpers Bits 00-07: Module Serial number A unique 8-bit number for each module, starting at 1 and set by solder jumpers CMM FPGA port: module_id_b : IN std_logic_vector (7 DOWNTO 0); Bits 08-11: Hardware Revision Number Four-bit revision number starting at 1 and set by solder jumpers CMM FPGA port: module_id_b : IN std_logic_vector (11 DOWNTO 8); Bits 12-15: null 00004 RW ControlModeReg 2 Control Mode Register ia_ctrlmode Support VME ---------------------------------------------------------------------------------------------- All bit fields are inputs to card. Bit 00 : Enable Playback Mode Writing a 1 to this bit causes the Input DPM to be used as a data playback memory. CMM FPGA port: plybk_en : OUT std_logic; -- to crate and system FPGAs Bits 01-04: GEOADD Bypass On power-up, these bits are set to the value obtained from the geographical addressing pins GEOADD and used to establish the module function. VME and TTC address decoding is performed using the VME GEOADD bits and so is not altered by changes made here. CMM FPGA port: Internal Support FPGA signal, not connected to the FPGA port Bit 05 : TTC Clock enable When this bit is set, the CMM uses the TTC clocks, otherwise - the on-board 40 MHz oscillator. Trying to set this bit when the TTC is not ready has no effect (TTC Ready - bit 7 in 00008 RO StatusReg). CMM FPGA port: ttc_clksel : OUT std_logic; -- to TTC card ClkSel (Clock Select) TTCS1-44 Bit 06 : TTC Protect This bit controls the TTC Decoder protection scheme described in the TTCDec specification CMM FPGA port: ttc_pd : OUT std_logic; -- to TTC card P/D (Mode Select) TTCS1-42 Bit 07 : LaserDisable_RoI When this bit is set, the laser used to drive the RoI G-Link is turned off to reduce power consumption. CMM FPGA port: laser_dis_daq : OUT std_logic; -- DAQ SFP cage Bit 08 : Laser_Disable_DAQ When this bit is set, the laser used to drive the DAQ G-Link is turned off to reduce power consumption. CMM FPGA port: laser_dis_roi : OUT std_logic; -- ROI SFP cage Bit 09 : Rate Counter Inhibit When this bit is set, incrementing of the rate meter counters and the normalization counter is inhibited. CMM FPGA port: sp_core : OUT std_logic_vector (1); -- Crate FPGA sp_service : OUT std_logic_vector (0); -- System FPGA Bits 10–15: null 00006 RW ControlPulseReg 2 Control Pulse Register ia_ctrlpulse Support VME ---------------------------------------------------------------------------------------------- All bit fields are inputs to card. All bits read back as zero, and writing a zero to a bit has no effect. Bit 00 : Reset Module Writing a 1 to this bit resets the module to the power-on state (includes restoring GEOADD and reloading the FPGAs). CMM FPGA port: n_board_reset : OUT std_logic; -- to crate and system FPGAs Bit 01 : Reset TTC Writing a 1 to this bit resets the TTC daughter board to the power on state. CMM FPGA port: n_ttc_reset : OUT std_logic; -- generates Reset_b for TTCDec card (TTCrx chip reset) TTCS1-29 Bit 02 : Reset RoI G-link Writing a 1 to this bit resets the RoI G-link to the power on state. CMM FPGA port: n_groi_reset : OUT std_logic; -- to GLink HDMP-1022 Bit 03 : Reset DAQ G-link Writing a 1 to this bit resets the DAQ G-link to the power on state. CMM FPGA port: n_gdaq_reset : OUT std_logic; -- to GLink HDMP-1022 Bit 04 : Reset CAN controller Writing a 1 to this bit resets the CAN microprocessor to the power on state. CMM FPGA port: n_can_reset : OUT std_logic; -- FUJITSU MB90F594 uC reset from VME Bit 05 : Reset I2C controller Writing a 1 to this bit resets the I2C interface controller to the power on state. CMM FPGA port: Internal Support FPGA signal, not connected to the FPGA port Bits 06-07: null Bit 08 : Reset DLL Writing a 1 to this bit resets to the power-on state the DLLs used for clock management within the Crate and System FPGAs. CMM FPGA port: n_dll_reset : OUT std_logic; -- to crate and system FPGAs Bit 09 : Clear Errors Writing a 1 to this bit resets to zero the Backplane Parity Error Register, the Cable Parity Error Register, the Parity Count Register, and the FIFO Overflow and Recorded FIFO Overflow bits. CMM FPGA port: clrpe : OUT std_logic; -- to crate and system FPGAs Bit 10 : Reload Crate-summing FPGA Writing a 1 to this bit reloads the Crate and System FPGAs with firmware corresponding to the module geographical address specified in the Geoadd Bypass field (Bits 01-04) in the Control Mode Register. CMM FPGA port: n_ace_reset : OUT std_logic; -- to ACE controller (from ACE CPLD in CMM) Bit 11 : Reset Rate Meter Counters Writing a 1 to this bit sets all rate meter counters and the normalisation counter to zero. CMM FPGA port: sp_core : OUT std_logic_vector (2); -- Crate FPGA sp_service : OUT std_logic_vector (1); -- System FPGA Bits 12–15: null 00008 RO StatusReg 2 Status Register ia_status Support VME ---------------------------------------------------------------------------------------------- All bit fields are outputs from card Connected to the status1_Bus : IN std_logic_vector (15 DOWNTO 0); Bit 00 : Combined Parity Error When this bit is set, a parity error has been detected on one or more of the incoming backplane or cable links since the last error reset. The bit is cleared by the error-reset bit (Bit 09) in the Control Pulse Register. CMM FPGA port: status1_Bus : IN std_logic_vector (0); -- CMM_PEC_NZERO from crate FPGA Bit 01 : FPGA Load Complete This bit is set if all FPGA configurations have loaded successfully -> Not used in CMM... Bit 02 : DAQ FIFO Overflow This bit is set if any of the readout FIFOs on the module have overflowed. It is cleared by the error-reset bit (Bit 09) in the Control Pulse Register. -> Not used in CMM...??? Bit 03 : null Bit 04 : I2C FPGA loaded This bit is set if the I2C controller FPGA has been configured correctly. CMM FPGA port: status1_Bus : IN std_logic_vector (4); -- I2C_DONE -> TTC FPGA merged now with VME CPLD and ACE CPLD in Spartan, -> use DONE from Spartan? OR set to '1' in FW? Bit 05 : Crate FPGA loaded This bit is set if the Crate FPGA has been configured correctly. -> Not used in CMM... (use cmm_done in ACE part) Bit 06 : System FPGA loaded This bit is set if the System FPGA has been configured correctly. -> Not used in CMM... (use cmms_done in ACE part) Bit 07 : TTC Ready This bit is set when the TTCrx is ready. CMM FPGA port: status1_Bus : IN std_logic_vector (7); -- TTC_READY from TTC card Bit 08 : Crate FPGA DLL locked This bit is set when the DLL in the Crate FPGA has successfully locked on to the 40 MHz clock. CMM FPGA port: status1_Bus : IN std_logic_vector (8); -- CMM_LOCKED_DLL Bit 09 : System FPGA DLL locked This bit is set when the DLL in the System FPGA has successfully locked on to the 40 MHz clock. CMM FPGA port: status1_Bus : IN std_logic_vector (9); -- CMMS_LOCKED_DLL Bit 10 : DAQ G-Link Ready This bit is set when the DAQ G-link is ready. CMM FPGA port: status1_Bus : IN std_logic_vector (10); -- GDAQ_LINKRDY Bit 11 : RoI G-Link Ready This bit is set when the RoI G-link is ready. CMM FPGA port: status1_Bus : IN std_logic_vector (11); -- GROI_LINKRDY Bit 12 : Recorded FIFO Overflow -> Not used in CMM... Bits 13–15: null 0000A RO FifoStatusReg 2 FIFO Status Register ia_fifostat Support VME ---------------------------------------------------------------------------------------------- All bit fields are outputs from card Connected to the status2_Bus : IN std_logic_vector (7 DOWNTO 0); Bits 00–07: Crate and system, DAQ and RoI Empty and full flags for all of the readout FIFOs on the module. CMM FPGA port: status2_Bus : IN std_logic_vector (7 DOWNTO 0); 00040 RW TtcrxControl 2 TTCrx Control Register ia_ttc_c Support TTC ---------------------------------------------------------------------------------------------- All bit fields are inputs to card. This register and the following TTCrx Status Register provide access to the 20 useraccessible internal registers of the TTCrx chip. Power-up condition initially sets all bits to 0. A TTCrx I/O operation takes place whenever this register is changed, unless the I2C bus is busy (see TTC Status register below). An I2C operation is aborted if the reset bit is set. Bits 00–07: Data to TTCrx This 8-bit field contains data to be written to the TTCrx chip. CMM FPGA port: Internal Support FPGA signal, not connected to the FPGA port Bits 08-12: TTC Register Number Specify the TTCrx register number to be read or written CMM FPGA port: Internal Support FPGA signal, not connected to the FPGA port Bit 13 : Write When set to 1, defines the operation as a write to TTCrx. When set to 0, the operation is a read. CMM FPGA port: Internal Support FPGA signal, not connected to the FPGA port Bit 14 : null Bit 15 : Reset TTCrx Controller When set to 1, resets the TTC controller logic and aborts any I2C operation in progress. CMM FPGA port: Internal Support FPGA signal, not connected to the FPGA port 00042 RO TtcrxStatus 2 TTCrx Status Register ia_ttc_s Support TTC ---------------------------------------------------------------------------------------------- All bit fields are outputs from card. Bits 00-07: Data from TTCrx This 8-bit field contains data read from the TTCrx chip. CMM FPGA port: Internal Support FPGA signal, not connected to the FPGA port Bits 08-12: null Bit 13 : I2C Busy When set to 1, indicates that an I2C transaction is underway CMM FPGA port: Internal Support FPGA signal, not connected to the FPGA port Bit 14 : I2C Error When set to 1, indicates that an I2C error has occurred CMM FPGA port: Internal Support FPGA signal, not connected to the FPGA port Bit 15 : unused 00044 RO TtcNotReady 2 ->not in CMM spec ->not in "vme_cmm" Support TTC -> for test ---------------------------------------------------------------------------------------------- All bit fields are outputs from card. Bit 00 : TtcNotReady For test? 00008 RO StatusReg Bit 07 TTC Ready ? 00054 RO I2cId 2 I2C FPGA firmware version ia_i2cid Support TTC -> replace 54, 56, 58 with one Reg. ---------------------------------------------------------------------------------------------- All bit fields are outputs from card. Bits 00-15: I2C FPFA irmware version This register contains the version number of the I2C FPGA controlling the TTCrx chip. This is a 16-bit value set in firmware. The first version is number 1. in i2c_ttc -> revision_id <= "0000000000000111"; -- 16#7# -> set to 7 CMM FPGA port: Internal Support FPGA signal, not connected to the FPGA port 00056 RO VmeId 2 VME CPLD firmware version ia_vmeid Support VME -> replace 54, 56, 58 with one Reg. ---------------------------------------------------------------------------------------------- All bit fields are outputs from card. Bits 00-15: VME CPLD firmware version This register contains the version number of the FPGA providing the interface to VME--. This is a 16-bit value set in firmware. The first version is number 1. vme_interface: fw_rev_big <= "00000000" & fw_rev; fw_rev <= X"0B"; -> initial IPB version CMM FPGA port: Internal Support FPGA signal, not connected to the FPGA port 00058 RO SystemAceVMEIf 2 System Ace VME Interface ia_sysace Support ACE -> replace 54, 56, 58 with one Reg. ---------------------------------------------------------------------------------------------- All bit fields are outputs from card. Bits 00-15: System Ace VME Interface firmware version vme_interface: ace_fw_rev <= "00000011"; -- set to 3 CMM FPGA port: Internal Support FPGA signal, not connected to the FPGA port 0005C RW CanAccessA 2 CAN Access Register A ia_can_a Support CAN ---------------------------------------------------------------------------------------------- All bit fields are inputs to card. No bits This register provide access to the microprocessor controlling the CAN bus. in vme_interface -> CMM_VMEdecoder generates n_can_reg1_en => CAN_BUF_EN* CMM FPGA port: n_can_reg1_en : OUT std_logic; -- CAN_BUF_EN* for FUJITSU MB90F594 uC 0005E RW CanAccessB 2 CAN Access Register B ia_can_b Support CAN ---------------------------------------------------------------------------------------------- All bit fields are inputs to card. Bits 00-03: Can Interrupt Request Writing a 1 to one of these bits causes an interrupt request to the CANBus processor at the corresponding priority. Writing a zero has no effect. --> These bits always read as zero. <-- Bits 04-15: null 001FA RW TtcI2Cid 2 TtcI2cId Register ia_ttc_id Support TTC ---------------------------------------------------------------------------------------------- All bit fields are outputs from card. Bits 00-05: TTCrx I2C ID This register contains the TTC base ID used by the I2C FPGA to communicate with the TTCrx, which is set up as the module resets. It matches the content of the TTCrx base address register I2C_ID (0:5), and should always contain the value 4. CMM FPGA port: Internal Support FPGA signal, not connected to the FPGA port Bits 06-15: null 001FC RO TtcBrcst 2 TtcBrcst Register ia_ttc_brcst Support TTC ---------------------------------------------------------------------------------------------- All bit fields are outputs from card. Bits 00-01: null Bits 02-05: TTC BRCST data (2:5) The most recent value of BRCST data bits (2:5) output from the TTCrx (that were qualified by the TTC strobe BRCSTSTR1). CMM FPGA port: brcst : IN std_logic_vector (5 DOWNTO 2); Bits 06-07: TTC BRCST data (6:7) The most recent value of BRCST data bits (6:7) output from the TTCrx (that were qualified by the TTC strobe BRCSTSTR2). CMM FPGA port: brcst : IN std_logic_vector (7 DOWNTO 6); Bits 08-15: null 001FE RO TtcDq 2 TTC DQ Register ia_ttc_dqreg Support TTC ---------------------------------------------------------------------------------------------- All bit fields are outputs from card. Bits 00-03: TTC DQ The most recent DQ value output from the TTCrx (that was qualified by the TTC strobe DOUTSTR). CMM FPGA port: dq : IN std_logic_vector (3 DOWNTO 0); Bits 04-15: null 00200 RO TtcDump 32 TTC Dump RAM ia_ttc_dqram Support TTC address from 00200 to 0021E ---------------------------------------------------------------------------------------------- All bit fields are outputs from card. Bits 00-07: TTC Dump Data A block of RAM 16 words deep that captures data from TTC Error and Configuration Dumps. Data from the TTC are mapped to the RAM using DQ as the address. CMM FPGA port: dout : IN std_logic_vector (7 DOWNTO 0); Bits 08-15: null 04000 ->See SystemACE 96 ->See SystemACE ->not in "vme_cmm" Support ACE address from 04000 to 0405F ---------------------------------------------------------------------------------------------- 1.3 CMX_VAT FPGA pins/signals ----------------------------- Initial set of pins from Ian CMM specification and Uli ACE design I/O Name So/De CMM FPGA port Register Address Bits Comment --- ---- ------ ------------- -------- ------- ----- ------- IN ModuleID Jumpers module_id_b ModuleIdB 00002 00-11 OUT TTC Clock enable TTC card ttc_clksel ControlModeReg 00004 05 <- BSPT_FPGA OUT TTC Protect TTC card ttc_pd ControlModeReg 00004 06 <- BSPT_FPGA OUT Reset TTC TTC card n_ttc_reset ControlPulseReg 00006 01 <- BSPT_FPGA OUT SCL TTC card scl - - - I2C clock IO SDA TTC card sda - - - I2C data IN TTC Ready TTC card status1_Bus(7) StatusReg 00008 07 <- BSPT_FPGA IN TtcBrcst TTC card brcst TtcBrcst Register 001FC 02-07 <- BSPT_FPGA IN TtcDq TTC card dq TTC DQ Register 001FE 00-03 <- BSPT_FPGA IN TtcDump TTC card dout TTC Dump RAM 00200 00-07 <- BSPT_FPGA OUT LaserDisable_RoI ROI SFP laser_dis_daq ControlModeReg 00004 07 <- OUT LaserDisable_DAQ DAQ SFP laser_dis_roi ControlModeReg 00004 08 <- OUT Reset RoI G-link HDMP-1022 n_groi_reset ControlPulseReg 00006 02 <- OUT Reset DAQ G-link HDMP-1022 n_gdaq_reset ControlPulseReg 00006 03 <- IN DAQ G-Link Ready HDMP-1022 status1_Bus(10) StatusReg 00008 10 <- IN RoI G-Link Ready HDMP-1022 status1_Bus(11) StatusReg 00008 11 <- OUT Reload FPGAs SystemACE n_ace_reset ControlPulseReg 00006 10 IN Crate FPGA loaded SystemACE cmm_done StatusReg 00008 05 <- BSPT_FPGA IN System FPGA loaded SystemACE cmms_done StatusReg 00008 06 <- BSPT_FPGA OUT Reset CAN controller MB90F594 n_can_reset ControlPulseReg 00006 04 <- BSPT_FPGA OUT CAN_BUF_EN* MB90F594 n_can_reg1_en CanAccessA 0005C - register enable signal OUT Can Interrupt Request MB90F594 can_reg2_bus CanAccessB 0005E 00-03 OUT Enable Playback Mode BaseFPGA plybk_en ControlModeReg 00004 00 OUT Rate Counter Inhibit BaseFPGA sp_core(1) ControlModeReg 00004 09 also sp_service(0) to System FPGA in CMM OUT Reset Module BaseFPGA n_board_reset ControlPulseReg 00006 00 OUT Reset DLL BaseFPGA n_dll_reset ControlPulseReg 00006 08 OUT Clear Errors BaseFPGA clrpe ControlPulseReg 00006 09 OUT Reset Rate Counters BaseFPGA sp_core(2) ControlPulseReg 00006 11 also sp_service(1) to System FPGA in CMM IN Combined Parity Error BaseFPGA status1_Bus(0) StatusReg 00008 00 IN Crate FPGA DLL locked BaseFPGA status1_Bus(8) StatusReg 00008 08 IN System FPGA DLL locked TopoFPGA status1_Bus(9) StatusReg 00008 09 IN Empty and full flags BaseFPGA status2_Bus FifoStatusReg 0000A 00-07 IN Empty and full flags TopoFPGA status2_Bus FifoStatusReg 0000A 00-07 =================================================================================================================================== 2. Proposal for the CMX Board Support FPGA (BSPT_FPGA) VME register map =================================================================================================================================== The VME-- base address ranges: CrateSlotNumber Module VME-- address 3 CMX0 0x00700000-0x0077FFFE 20 CMX1 0x00780000-0x007FFFFE BSPT_FPGA address range: 256 bytes 3 CMX0 0x00700000-0x007000FF 20 CMX1 0x00780000-0x007800FF 2.1 BSPT_FPGA list of registers =============================== Addr Re Name Size Description VHDL name FPGA Function Comments ----- -- ---- ---- ----------- ---------- ---- ------- -------- 00000 RO ModuleIDSN 2 Module ID and SN module_idsn BSPT VME I/F 00002 RO ModuleRew 2 Module HW/FW Revisions module_rev BSPT VME I/F 00004 RW ModuleControl 2 Module Control Register module_cntrl BSPT VME I/F 00006 RW ModuleResets 2 Module Resets Register module_rsts BSPT VME I/F 00008 RO ModuleStatus1 2 Module Satus 1 module_stat1 BSPT VME I/F 0000A RO ModuleStatus2 2 Module Satus 2 module_stat2 BSPT Opto 0000C RO LinkStatus1 2 LVDS Link Satus 1 link_status1 BSPT LVDS 0000E RO LinkStatus2 2 LVDS Link Satus 2 link_status2 BSPT LVDS 00010 RW SFP1_CSR 2 SFP1 Control/Status Reg sfp1_csr BSPT Opto_sfp 00012 RW SFP1_Data 2 SFP1 Data Register sfp1_data BSPT Opto_sfp 00014 RW SFP2_CSR 2 SFP2 Control/Status Reg sfp2_csr BSPT Opto_sfp 00016 RW SFP2_Data 2 SFP2 Data Register sfp2_data BSPT Opto_sfp 00018 RW SFP3_CSR 2 SFP3 Control/Status Reg sfp3_csr BSPT Opto_sfp 0001A RW SFP3_Data 2 SFP3 Data Register sfp3_data BSPT Opto_sfp 0001C RW SFP4_CSR 2 SFP4 Control/Status Reg sfp4_csr BSPT Opto_sfp 0001E RW SFP4_Data 2 SFP4 Data Register sfp4_data BSPT Opto_sfp 00020 RW MP12_CSR 2 MP12 Control/Status Reg mp12_csr BSPT Opto_mp 00022 RW MP12_Data 2 MP12 Data Register mp12_data BSPT Opto_mp 00024 RW MP345_CSR 2 MP345 Control/Status Reg mp345_csr BSPT Opto_mp 00026 RW MP345_Data 2 MP345 Data Register mp345_data BSPT Opto_mp 00028 RW TempReg1 2 Temporary RW register 1 vme_rw_reg1 BSPT reserved 0002A RW TempReg2 2 Temporary RW register 2 vme_rw_reg2 BSPT reserved 0002C RW TempReg3 2 Temporary RW register 3 vme_rw_reg3 BSPT reserved 0002E RW TempReg4 2 Temporary RW register 4 vme_rw_reg4 BSPT reserved 00030 RW TTCrxControl 2 TTCrx Control Register ttc_control BSPT TTC 00032 RO TTCrxStatus 2 TTCrx Status Register ttc_status BSPT TTC 00034 RO TTCrxBrcst 2 TTCDec Brcst Register ttc_brcst BSPT TTC 00036 RO TTCrxDq 2 TTCDec DQ Register ttc_dq BSPT TTC 00038 reserved 0003A reserved 0003C reserved 0003E reserved 00040 RO TTCrxDump 32 TTCDec Dump RAM ttc_ram BSPT TTC addresses from 00040 to 0005E 00060 RW RegArray 32 Temporary RW array 1 vme_rw_array1 BSPT reserved addresses from 00060 to 0007F 00080 ->See SystemACE 96 ->See SystemACE ->See SystemACE BSPT ACE addresses from 00080 to 000DF 000E0 reserved addresses from 000E0 to 000FF (32 bytes) - DO NOT USE!!! (used by ACE VME address decoding!) Last BSPT_FPGAaddress: 000FF 2.2 Registers related to the whole CMX module ============================================= Addr Re Name Size Description VHDL name FPGA Function Comments ----- -- ---- ---- ----------- ---------- ---- ------- -------- 00000 RO ModuleIDSN 2 Module ID and SN module_idsn BSPT VME I/F -------------------------------------------------------------------------------------------------------------- All bit fields are outputs from the CMX This register replaces the CMM registers 00(00-15) and 02(00-07) Bits 07-00: Module_ID - a unique 8 bit Module Number (what is this number for CMX?), set in firmware Bits 15-08: Module_SN - a 8-bit Serial Number for each module, starting at 1 and set by 5 jumpers + 3 upper bits in FW 00002 RO ModuleRew 2 Module HW/FW Revisions module_rev BSPT VME I/F -------------------------------------------------------------------------------------------------------------- All bit fields are outputs from the CMX This register replaces the CMM registers 02(08-11), 54(I2cId), 56(VmeId), 58(SystemAceVMEIf) Bits 07-00: CMX_HWR - 8 bit CMX Hardware Revision Number starting at 1 and set in firmware Bits 15-08: BSPT_FWR - 8 bit Board Support FPGA Firmware Revision Number starting at 1 and set in firmware 00004 RW ModuleControl 2 Module Control Register module_cntrl BSPT VME I/F -------------------------------------------------------------------------------------------------------------- All bit fields are inputs to the CMX Bits 03-00: GEOADD0 Bypass (bit 01) and GEOADDR Bypass (bits 06-04) These bits are used to alter the value of the VME geographical addressing pins GEOADD from the backplane. GEOADDR is used to define the CFGADDR bits for the XILINX System ACE controller in order to select appropriate CMX configuration from the CF card according to the CMX position in the L1Calo system (crate/slot) and to establish the module function (FW download). VME and TTC address decoding is performed using the VME GEOADD pins and so is not altered by changes made here. Bit 04: TTCDec Clock Select - When this bit is set, the TTCDec uses the TTCrx clock, otherwise - XTAL clock Trying to set this bit when the TTCrx is not ready has no effect (TTCrx Ready - bit 07 in 00008 ModuleStatus1). Bit 05: TTCDec P/D Mode Select - This bit controls the TTCDec protection scheme described in the TTCDec specification Bits 11–06: null, writing to these bits has no effect. Bit 12: SFP1_TX_DISABLE - SFP1 Transmitter Disable (DAQ?) Bit 13: SFP2_TX_DISABLE - SFP2 Transmitter Disable (ROI?) Bit 14: SFP3_TX_DISABLE - SFP3 Transmitter Disable Bit 15: SFP4_TX_DISABLE - SFP4 Transmitter Disable 002 00006 RW ModuleResets 2 Module Resets Register module_rsts BSPT VME I/F -------------------------------------------------------------------------------------------------------------- All bit fields are inputs to the CMX. All bits read back as zero, and writing a zero to a bit has no effect. Bit 00: Reset Module - Writing a 1 to this bit resets the module to the power-on state (includes restoring GEOADD and reloading the FPGAs) ???. Bit 01: Reset TTCrx - Writing a 1 to this bit resets TTCrx on the TTCDec card. Writing a 0 has no effect. Read back as zero. Generates Reset_b for TTCDec card (TTCrx chip reset) TTCS1-29 Bit 02: Reset TTCrx I2C controller - Writing a 1 to this bit resets the I2C interface controller to the power on state. Bit 03: Reset System ACE - Writing a 1 to this bit resets the System ACE controller and reloads the BASE_FPGA and TOPO_FPGA with firmware corresponding to the module geographical address specified in the GEOADD Bypass field (Bits 01-04) in the Module Control Register (00004). Bits 07-04: null Bit 08: Reset MiniPods 12 - Writing a 1 to this bit generates Reset_B for MiniPods 1,2 Bit 09: Reset MiniPods 12 I2C controller Bit 10: Reset MiniPods 345 - Writing a 1 to this bit generates Reset_B for MiniPods 3,4,5 Bit 11: Reset MiniPods 345 I2C controller Bit 12: Reset SFP1 I2C controller Bit 13: Reset SFP2 I2C controller Bit 14: Reset SFP3 I2C controller Bit 15: Reset SFP3 I2C controller 00008 RO ModuleStatus1 2 Module Satus 1 Register module_stat1 BSPT VME I/F -------------------------------------------------------------------------------------------------------------- All bit fields are outputs from the CMX Bit 00: null Bit 01: Lock Monitor VCXO_PLL DeScew-1 Bit 02: Lock Monitor VCXO_PLL DeScew-2 Bit 03: Lock Monitor VCXO_PLL 320 MHz Bit 04: System ACE Error - When this bit is set, an error occurred during FPGA configuration Bit 05: BASE_FPGA loaded - This bit is set if the BASE_FPGA has been configured correctly - DONE from BASE_FPGA Bit 06: TOPO_FPGA loaded - This bit is set if the TOPO_FPGA has been configured correctly - DONE from TOPO_FPGA Bit 07: TTCrx Ready - This bit is set when the TTCrx on TTCDec card is ready. Bit 08: BASE_FPGA DLL locked - This bit is set when the DLL in the BASE_FPGA has successfully locked on to the 40 MHz clock. Bit 09: TOPO_FPGA DLL locked - This bit is set when the DLL in the TOPO_FPGA has successfully locked on to the 40 MHz clock. Bit 10: MP1_INTRPT_B - MiniPOD 1 Interrupt_B Bit 11: MP2_INTRPT_B - MiniPOD 2 Interrupt_B Bit 12: MP3_INTRPT_B - MiniPOD 3 Interrupt_B Bit 13: MP4_INTRPT_B - MiniPOD 4 Interrupt_B Bit 14: MP5_INTRPT_B - MiniPOD 5 Interrupt_B Bit 15: Status2 - This bit is set when TTCrx is the clock source on the TTCDec card 0000A RO ModuleStatus2 2 Module Satus 2 Register module_stat2 BSPT Opto -------------------------------------------------------------------------------------------------------------- All bit fields are outputs from the CMX SFP1 - BASE_FPGA DAQ SFP2 - BASE_FPGA ROI SFP3 - TOPO_FPGA DAQ SFP4 - TOPO_FPGA ROI Bit 00: SFP1_TX_FAULT - SFP1 Transmitter Fault Bit 01: SFP1_MOD_PRESENT - SFP1 Module Present->Low Bit 02: SFP1_RX_LOS - SFP1 Receiver Signal Loss Bit 03: null Bit 04: SFP2_TX_FAULT - SFP2 Transmitter Fault Bit 05: SFP2_MOD_PRESENT - SFP2 Module Present->Low Bit 06: SFP2_RX_LOS - SFP2 Receiver Signal Loss Bit 07: null Bit 08: SFP3_TX_FAULT - SFP3 Transmitter Fault Bit 09: SFP3_MOD_PRESENT - SFP3 Module Present->Low Bit 10: SFP3_RX_LOS - SFP3 Receiver Signal Loss Bit 11: null Bit 12: SFP4_TX_FAULT - SFP4 Transmitter Fault Bit 13: SFP4_MOD_PRESENT - SFP4 Module Present->Low Bit 14: SFP4_RX_LOS - SFP4 Receiver Signal Loss Bit 15: null 2.3 Registers related to the CTP/BP LVDS Links Mngmnt status ============================================================ Addr Re Name Size Description VHDL name FPGA Function Comments ----- -- ---- ---- ----------- ---------- ---- ------- -------- 0000C RO LinkStatus1 2 CTP/BP LVDS Links Mngmnt link_status1 BSPT LVDS -------------------------------------------------------------------------------------------------------------- All bit fields are outputs from the CMX Bit 00: TP_FPGA_INSTALLED_B Bit 01: ALLOW_BUSSED_IO Bit 02: BF_REQ_CTP_1_INPUT Bit 03: TP_REQ_CTP_1_INPUT Bit 04: BF_REQ_CTP_2_INPUT Bit 05: TP_REQ_CTP_2_INPUT Bit 06: CTP_1_TRNCVR_DIR Bit 07: CTP_1_BF_TRNSLT_DIR Bit 08: BSPT_CTP_1_BF_TRNSLT_OE_B Bit 09: CTP_1_TP_TRNSLT_DIR Bit 10: BSPT_CTP_1_TP_TRNSLT_OE_B Bit 11: CTP_2_TRNCVR_DIR Bit 12: CTP_2_BF_TRNSLT_DIR Bit 13: BSPT_CTP_2_BF_TRNSLT_OE_B Bit 14: CTP_2_TP_TRNSLT_DIR Bit 15: BSPT_CTP_2_TP_TRNSLT_O 0000E RO LinkStatus2 2 CTP/BP LVDS Links Mngmnt link_status2 BSPT LVDS -------------------------------------------------------------------------------------------------------------- All bit fields are outputs from the CMX Bit 00: BF_REQ_CABLE_1_INPUT Bit 01: CABLE_1_TRNCVR_DIR Bit 02: CABLE_1_TRNSLT_DIR Bit 03: BSPT_CABLE_1_TRNSLT_OE_B Bit 04: BF_REQ_CABLE_2_INPUT Bit 05: CABLE_2_TRNCVR_DIR Bit 06: CABLE_2_TRNSLT_DIR Bit 07: BSPT_CABLE_2_TRNSLT_OE_B Bit 08: BF_REQ_CABLE_3_INPUT Bit 09: CABLE_3_TRNCVR_DIR Bit 10: CABLE_3_TRNSLT_DIR Bit 11: BSPT_CABLE_3_TRNSLT_OE_B Bits 15-12: null 2.4 Registers related to the optical components access via I2C ============================================================== Addr Re Name Size Description VHDL name FPGA Function Comments ----- -- ---- ---- ----------- ---------- ---- ------- -------- 00010 RW SFP1_CSR 2 SFP1 Control/Status Reg sfp1_csr BSPT Opto_sfp -------------------------------------------------------------------------------------------------------------- Bit(13-00) are RW inputs to the CMX, bits (15-14) are RO outputs from CMX This register and the following SFP1 Data Register provide access to the 512 user accessible internal registers of the Avago AFBR-57M5APZ SFP chip. Power-up condition initially sets all bits to 0. Bits 07–00: SFP1 Register Number - Specify the register number to be read or written. Bit 08: SFP1 Page: 0 => SFP1 I2C address: 1010000X (0xA0); 1 => SFP1 I2C address: 1010001X (0xA2) Bits 10-09: null Bit 11: Write - When set to 1, defines the operation as a write to SFP1. When set to 0, the operation is a read. Bit 12: SFP1 I2C controller Abort - When set to 1, resets the I2C interface logic and aborts any I2C operation in progress. Bit 13: null Bit 14: SFP1 I2C controller Busy - When set to 1, indicates that an I2C transaction is underway Bit 15: SFP1 I2C controller Error - When set to 1, indicates that an I2C error has occurred 00012 RW SFP1_Data 2 SFP1 Data Register sfp1_data BSPT Opto_sfp -------------------------------------------------------------------------------------------------------------- Bits(07-00) are RW inputs to the CMX (data to MP12); bits(15-08) are RO outputs from CMX (data from SFP1 Bits 07-00: Data from SFP1 - This 8-bit field contains last data read from SFP1 Writing to these bits has no effect Bits 15–08: Data to SFP1 - This 8-bit field contains data to be written to SFP1 Read back the value written to the RW_12 SFP1 Data Register 00014 RW SFP2_CSR 2 SFP2 Control/Status Reg sfp2_csr BSPT Opto_sfp -------------------------------------------------------------------------------------------------------------- This register is similar to the SFP1 Control/Status Reg RW_00010 00016 RW SFP2_Data 2 SFP2 Data Register sfp2_data BSPT Opto_sfp -------------------------------------------------------------------------------------------------------------- This register is similar to the SFP1 Data Register RW_00012 00018 RW SFP3_CSR 2 SFP3 Control/Status Reg sfp3_csr BSPT Opto_sfp -------------------------------------------------------------------------------------------------------------- This register is similar to the SFP1 Control/Status Reg RW_00010 0001A RW SFP3_Data 2 SFP3 Data Register sfp3_data BSPT Opto_sfp -------------------------------------------------------------------------------------------------------------- This register is similar to the SFP1 Data Register RW_00012 0001C RW SFP4_CSR 2 SFP4 Control/Status Reg sfp4_csr BSPT Opto_sfp -------------------------------------------------------------------------------------------------------------- This register is similar to the SFP1 Control/Status Reg RW_00010 0001E RW SFP4_Data 2 SFP4 Data Register sfp4_data BSPT Opto_sfp -------------------------------------------------------------------------------------------------------------- This register is similar to the SFP1 Data Register RW_00012 00020 RW MP12_CSR 2 MP12 Control/Status Reg mp12_csr BSPT Opto_mp -------------------------------------------------------------------------------------------------------------- Bit(13-00) are RW inputs to the CMX, bits (15-14) are RO outputs from CMX This register and the following MP12 Data Register provide access to the 256 user accessible internal registers of the Avago MiniPOD AFBR-811VxyZ(Transmitter) chips. Power-up condition initially sets all bits to 0. Bits 07–00: MiniPOD Register Number - Specify the register number to be read or written. Bits 10-08: MiniPOD TWS Module Bus Address bits Adr[2:0] Address has the form 0101Adr[2:0](TX) or 0110Adr[2:0](RX) Bit 11: Write - When set to 1, defines the operation as a write to MiniPOD. When set to 0, the operation is a read. Bit 12: MP12 I2C controller Abort - When set to 1, resets the I2C interface logic and aborts any I2C operation in progress. Bit 13: null Bit 14: MP12 I2C controller Busy - When set to 1, indicates that an I2C transaction is underway Bit 15: MP12 I2C controller Error - When set to 1, indicates that an I2C error has occurred 00022 RW MP12_Data 2 MP12 Data Register mp12_data BSPT Opto_mp -------------------------------------------------------------------------------------------------------------- Bits(07-00) are RO outputs from CMX (data from MP12); bits(15-08) are RW inputs to the CMX (data to MP12); Bits 07-00: Data from MP12 - This 8-bit field contains last data read from MP12; Writing to these bits has no effect Bits 15–08: Data to MP12 - This 8-bit field contains data to be written to MP12 Read back the value written to the RW_22 SFP2_Dataregister 00024 RW MP345_CSR 2 MP345 Control/Status Reg mp345_csr BSPT Opto_mp -------------------------------------------------------------------------------------------------------------- This register is similar to the MP12 Control/Status Reg RW_00020 to access the Avago MiniPOD AFBR-821VxyZ (Receiver) chips 00026 RW MP345_Data 2 MP345 Data Register mp345_data BSPT Opto_mp -------------------------------------------------------------------------------------------------------------- This register is similar to the MP12 Data Register RW_00022 to access the Avago MiniPOD AFBR-821VxyZ (Receiver) chips 2.5 Registers related to the TTCrx chip on the TTCDec card ========================================================== Addr Re Name Size Description VHDL name FPGA Function Comments ----- -- ---- ---- ----------- ---------- ---- ------- -------- 00030 RW TTCrxControl 2 TTCrx Control Register ttc_control BSPT TTC -------------------------------------------------------------------------------------------------------------- All bit fields are inputs to the CMX This register and the following TTCrx Status Register provide access to the 20 user accessible internal registers of the TTCrx chip (see also [5]). Power-up condition initially sets all bits to 0. A TTCrx I/O operation takes place whenever this register is changed, unless the I2C bus is busy (see TTC Status register below). An I2C operation is aborted if the reset bit is set. Bits 00–07: Data to TTCrx - This 8-bit field contains data to be written to the TTCrx chip. Bits 12-08: TTCrx Register Number - Specify the TTCrx register number to be read or written Bit 13: Write - When set to 1, defines the operation as a write to TTCrx. When set to 0, the operation is a read. Bit 14: null Bit 15: TTCrx Controller Abort When set to 1, resets the I2C interface logic in the BSPT FPGA and aborts any I2C operation in progress. (What the difference: Reset TTCrx I2C controller - bit 05 in the Module Resets Register 00006 ???) 00032 RO TTCrxStatus 2 TTCrx Status Register ttc_status BSPT TTC -------------------------------------------------------------------------------------------------------------- All bit fields are outputs from the CMX Bits 07-00: Data from TTCrx - This 8-bit field contains data read from the TTCrx chip. Bits 12-08: null Bit 13: I2C Busy - When set to 1, indicates that an I2C transaction is underway Bit 14: I2C Error - When set to 1, indicates that an I2C error has occurred Bit 15: null 00034 RO TTCrxBrcst 2 TTCDec Brcst Register ttc_brcst BSPT TTC -------------------------------------------------------------------------------------------------------------- All bit fields are outputs from the CMX Bits 01-00: null Bits 05-02: TTCrx BRCST data (2:5) - The most recent value of BRCST data bits (2:5) output from the TTCrx (that were qualified by the TTC strobe BRCSTSTR1). Bits 07-06: TTCrx BRCST data (6:7) - The most recent value of BRCST data bits (6:7) output from the TTCrx (that were qualified by the TTC strobe BRCSTSTR2). Bits 15-08: null 00036 RO TTCrxDq 2 TTCDec DQ Register ttc_dq BSPT TTC -------------------------------------------------------------------------------------------------------------- All bit fields are outputs from card. Bits 03-00: TTCrx DQ - The most recent DQ value output from the TTCrx (that was qualified by the TTC strobe DOUTSTR). Bits 15-04: null 00040 RO TTCrxDump 32 TTCDec Dump RAM ttc_ram BSPT TTC addresses from 00040 to 0005E -------------------------------------------------------------------------------------------------------------- All bit fields are outputs from card. Bits 07-00: TTCrx Dump Data A block of RAM 16 words deep that captures data from TTC Error and Configuration Dumps. Data from the TTC are mapped to the RAM using DQ as the address. Bits 15-08: null 2.6 Registers related to the XILINX SystemACE chip ================================================== This is a block of XILINX SystemACE MPU registers (96 8-bit registers) mapped to the VME memory (see also [6]) Addr Re Name Size Description VHDL name FPGA Function Comments ----- -- ---- ---- ----------- ---------- ---- ------- -------- 00080 ->See SystemACE 96 ->See SystemACE ->See SystemACE BSPT ACE addresses from 00080 to 000DF -------------------------------------------------------------------------------------------------------------- 2.7 Registers related to the CANbus microcontroller =================================================== No registers