Python functions for PRBS testing: disable_oversampling_in_gen1() rate_and_preset_settings() gty_tx_rx_reset() prbs_sync() ber_counter_reset() snap_ber_counters() enable_oversampling_in_gen1() disable_bist() description: disable_oversampling_in_gen1() : Disables oversampling in Gen1 rate_and_preset_settings(rate, link_width = 4, is_external_loopback = 1, tx_amplitude_swing = 950):: Sets the user specified data rate for Transceiver. Sets the user specified linkwidth for Transceiver, rest on all the lanes tx_electrical_idle will be transmitted. LTSSM cannot control the Transceiver when this function is called. Enables bist path of transceiver. This function has the following arguments. rate - data rate at which the transceiver should work Valid values are 0,1,2,3,4,5. With 0 being gen1 , 4 being gen5 and 5 being gen6 link_width- Link width Valid values are 0,1,2,3,4. With 0 being x1 , 1 being x2 and 4 being x16 gty_tx_rx_reset(tx_reset,rx_reset) : issues reset to transceiver. Arguments: tx_reset : to issue reset to tx side 0 do not reset tx path , 1 reset the tx path rx_reset : to issue reset to rx_side 0 do not reset tx path , 1 reset the tx path prbs_sync() : isssues sync to prbs checker ber_counter_reset(): resets the ber counters in prbs checker snap_ber_counters() : reads BER counter values of each lanes one after other. enable_oversampling_in_gen1() : enables oversampling in Gen1 disable_bist() : Enables the LTSSM to control the Transceiver, disable BIST path of transceiver. Testing procedure : 1. configure FPGA from vivado 2. connect python session with 64 bit python 3. disable the oversampling in Gen1 by calling disable_oversampling_in_gen1() 4. configure Gen6 data rate by calling rate_and_preset_settings(5). 5. Issue rx_reset to transceiver by calling gty_tx_rx_reset(0,1) 6. Issue a PRBS sync to the checker prbs_sync() 7. Issue a BER reset by calling ber_counter_reset() 8. Capture the BER counters by calling snap_ber_counters() To switch back to LTSSM data, call enable_oversampling_in_gen1(), IBERT observation: IBERT setting : Tx_pattern: PRBS_23 Rx_pattern: PRBS_23 Tx_precursor: 0 Tx_precursor2: 0 Tx_postcursor: 0 Loopback mode: None TX main cursor: 0.998vdd Observed BER 10^-8 disable_bist()