Document ID
APT-DS-SLVS-RX-0001
Revision
2.1
IP version
3.4.1
Release date
November 2026
Chapter 4: Register Map

4.9Programming sequence

  1. Hold the link in resetKeep rstn_i low until the PHY reports the lanes ready.
  2. Identify the coreRead ID (expect 0xA715EC01) and VERSION (0x03040001 for v3.4.1). Read HWCFG for the lane count, build, output and embedded data output.
  3. Configure the linkWrite PIX_BIT and LINE_LENGTH. CRC build: write CRC_OPTION = 1 and set the sensor’s CRC Option on. ECC build: write ECC_OPTION (1 or 2, as the sensor) and ECC_BLOCK.
  4. Optional cropWrite VID_LINE_SKIP, VID_WIDTH and VID_HEIGHT. These may also be changed later, while streaming.
  5. Start the sensorRelease rstn_i and start streaming from the sensor.
  6. Check the linkRead VID_FRAME_INFO: FRAMES should count up with every frame and LINES should equal the image height after the crop. HDR_CRC_ERR_CNT and VID_OVF_CNT should stay 0 and CRC_ERR_LINE[31] should read 0. With the embedded data output built, EBD_FRAME_INFO counts the frames that sent metadata.
  7. MonitorRead the error counters periodically: HDR_CRC_ERR_CNT in both builds, PAY_CRC_ERR_CNT and CRC_ERR_LINE in the CRC build, C_ERR_CNT and ECC_FAIL_CNT in the ECC build. Clear them with ERR_CNT_CTRL.CLEAR, and the overflow status with VID_CTRL.OVF_CLR and VID_CTRL.EBD_OVF_CLR.

The same sequence with plain register accesses, for a 2-lane CRC build receiving 5328-pixel RAW12 lines with the CRC footer, cropped to 1920 x 1080:

/* base = address of slvs_ec_rx_0 in the Vivado address editor */
#define RX(off)  (base + (off))

if (Xil_In32(RX(0x00)) != 0xA715EC01) return -1;        /* ID              */
u32 ver   = Xil_In32(RX(0x04));                          /* VERSION 3.4.1   */
u32 hwcfg = Xil_In32(RX(0x08));                          /* lanes, build    */

Xil_Out32(RX(0x10), 12);       /* PIX_BIT       RAW12               */
Xil_Out32(RX(0x14), 5328);     /* LINE_LENGTH   pixels              */
Xil_Out32(RX(0x1C), 1);        /* CRC_OPTION    check CRC32 footer  */
Xil_Out32(RX(0x30), 8);        /* VID_LINE_SKIP                     */
Xil_Out32(RX(0x34), 1920);     /* VID_WIDTH                         */
Xil_Out32(RX(0x38), 1080);     /* VID_HEIGHT                        */

/* ... release rstn_i, start the sensor ... */

u32 info   = Xil_In32(RX(0x40));   /* VID_FRAME_INFO                      */
u32 frames = info >> 16;              /* counts up every frame               */
u32 lines  = info & 0xFFFF;          /* 1080 after the crop                 */
if (Xil_In32(RX(0x54)) & 0x80000000) { /* CRC_ERR_LINE: an error since clear */
    u32 hdr = Xil_In32(RX(0x4C));        /* bad copies [15:0], lost [31:16]     */
    u32 pay = Xil_In32(RX(0x50));        /* payload CRC32 failures              */
}

The software driver supplied with the core performs these steps for you, including the ECC_BLOCK computation; see Software.