1111// / \file Crorc/Constants.h
1212// / \brief Definitions of RORC related constants
1313// / Based on ddl_def.h and rorc.h
14+
1415// / \author Pascal Boeschoten ([email protected] )1516// / \author Kostas Alexopoulos ([email protected] )1617
@@ -356,39 +357,43 @@ static constexpr Register I2C_CMD(0x000000D0);
356357// Register to control CRORC configuration
357358// [15-4] -> CRORC ID
358359// [0] -> FIXED/DYNAMIC OFFSET
359- static constexpr Register CFG_CONTROL (0x000001f0 );
360+ static constexpr Register CFG_CONTROL (0x000001F0 );
360361
361362// Register that contains the firmware hash
362- static constexpr Register FIRMWARE_HASH (0x0000019c );
363+ static constexpr Register FIRMWARE_HASH (0x000001Cc );
363364
364365// CRORC Control & Status Register
365366static constexpr Register CRORC_CSR (0x00000000 );
366367
367368// CHANNEL Control & Status Register
368- // [9] -> data receive ON / OFF
369- // [23] -> FIFO NOT EMPTY
370- static constexpr Register CHAN_CSR (0x00000010 );
371- static constexpr uint32_t DATA_RX_ON_OFF (0x00000200 );
372- static constexpr uint32_t RXSTAT_NOT_EMPTY (0x00800000 );
373-
374- // Channel Control & Status Register
375369// [1] -> CRORC
376370// [2] -> CHANNEL (can be used together - e.g. 0x3)
371+ // [9] -> data receive ON / OFF
372+ // [12] -> LOOPBACK ON OFF
373+ // [23] -> FIFO NOT EMPTY
377374static constexpr Register CHANNEL_CSR (0x00000010 );
378375static constexpr uint32_t CRORC_RESET (0x00000003 );
376+ static constexpr uint32_t DATA_RX_ON_OFF (0x00000200 );
377+ static constexpr uint32_t RXSTAT_NOT_EMPTY (0x00800000 );
378+ static constexpr uint32_t LOOPBACK_ON_OFF = 0x00001000 ;
379379
380380// Channel Receive Report Base Address
381381static constexpr Register CHANNEL_RRBAR (0x00000034 );
382382// Channel Receive Report Base Address Extension
383383static constexpr Register CHANNEL_RRBARX (0x00000084 );
384384
385- // Register to send DDL commands
386- static constexpr Register DDL_COMMAND (0x00000018 ); // TODO: Find a better name
385+ // Registers to send DDL commands
386+ static constexpr Register DDL_COMMAND (0x00000018 );
387387static constexpr Register DDL_STATUS (0x0000001C );
388388static constexpr uint32_t SIU_RESET (0x000000F1 );
389389static constexpr uint32_t RDYRX (0x00000014 );
390390static constexpr uint32_t STBRD (0x00000054 );
391391static constexpr uint32_t EOBTR (0x000000B4 );
392+ static constexpr uint32_t DIU_LOOPBACK (0x00000091 );
393+ static constexpr uint32_t SIU_LOOPBACK (0x00000092 );
394+ // Read & Clear Interface Status Word
395+ static constexpr uint32_t DIU_RANDCIFST (0x00000001 );
396+ static constexpr uint32_t SIU_RANDCIFST (0x00000002 );
392397
393398// At bit 13
394399static constexpr uint32_t LINK_DOWN (0x00002000 );
@@ -401,6 +406,12 @@ static constexpr IntervalRegister OPT_POWER_QSFP1(0x00000158, 0x4);
401406static constexpr Register RX_FIFO_ADDR_LOW (0x00000038 );
402407static constexpr Register RX_FIFO_ADDR_HIGH (0x0000003c );
403408static constexpr Register RX_FIFO_ADDR_EXT (0x00000080 );
409+
410+ // Data transmission status word
411+ static constexpr uint32_t DTSW (0x00000082 );
412+
413+ // Register to configure the Data Generator
414+ static constexpr Register DATA_GENERATOR_CFG (0x00000020 );
404415} // namespace Registers
405416} // namespace Crorc
406417
0 commit comments