Dynamically changing the serdes register values, Using sbus module to enable internal loopback – Achronix Speedster22i SerDes User Manual

Page 75

Advertising
background image

Dynamically Changing the SerDes Register Values

Typically the PMA/PCS registers need not be changed during runtime. However,

simple_serdes_design uses internal SerDes loopback. Internal loopback may be the starting

point for the users to verify the functionality of any user-design. To enable the internal

loopback, the user needs to dynamically ( at run-time) set a PCS register via the SBUS

interface. This is done using the ACX_SERDES_LOOPBACK_CTRL module explained in

Chapter – “Dynamic Read/Write of SerDes Registers (Through SBUS)”. Internal loopback

cannot be programmed statically (in the ACE-generated bitstream). Section Loopback

Modes presents the loopback modes available with Achronix SerDes. The code below shows

an example of using ACX_SERDES_LOOPBACK_CTRL (reproduced from Chapter –

“Dynamic Read/Write of SerDes Registers (Through SBUS)” for ready reference).

Using sBus module to enable internal loopback

The code below shows how to enable internal loopback using the sBus

wire sbus_ln0_done;

wire inv_sbus_disable_loopback_ln0;

assign inv_sbus_disable_loopback_ln0 = ~i_sbus_disable_loopback;

wire unused_ln0_i_reg_write;

wire unused_ln0_i_reg_rw_req;

wire unused_ln0_i_reg_pma;

wire unused_ln0_i_reg_address;

wire unused_ln0_i_reg_wr_data;

wire unused_ln0_o_reg_rd_data;

wire unused_ln0_o_reg_rdwr_valid;

ACX_SERDES_LOOPBACK_CTRL #(

.LOOPBACK_MODE (`LPBK_TX_RX_PMA_INTERNAL),

.ENABLE_PASS_THROUGH(0)

)

i_loopback_ctl_ln0

(

.sbus_clk (i_sclk),

.rstn (1'b1), // ok to tie high

.disable_loopback (inv_sbus_disable_loopback_ln6), // rising edge disables loopback

.done (sbus_ln0_done), // program is finished

// serdes connections

.from_sbus_data (ln0_sbus_rddata[1:0]),

.from_sbus_ack (ln0_sbus_ack),

.to_sbus_data (ln0_sbus_wrdata[1:0]),

.to_sbus_req (ln0_sbus_req),

.i_pma_synthready (ln0_synthready),

.i_pma_TXready (ln0_TX_ready),

.i_pma_RXready (ln0_RX_ready),

.to_sbus_sw_rst (ln0_sbus_sw_rst),

// pass-through connections, can be used when 'done' is high

// (ignored if ENABLE_PASS_THROUGH = 0)

.i_reg_write (unused_ln0_i_reg_write), // request is ‘write'

.i_reg_rw_req (unused_ln0_i_reg_rw_req), // rising edge starts action

.i_reg_pma (unused_ln0_i_reg_pma), // address is pma address

.i_reg_address (unused_ln0_i_reg_address), // 16-bit pcs or pma address

UG028, July 1, 2014

75

Advertising