Using VIO to Control ATG - 1.0 English

Versal Adaptive SoC Soft DDR4 SDRAM Memory Controller LogiCORE IP Product Guide (PG353)

Document ID
PG353
Release Date
2023-10-18
Version
1.0 English

VIO is instantiated for the DDR4 example design to exercise the Traffic Generator modes when the design is generated with the ATG option.

The expected write data and the data that is read back are added to the ILA instance. Write and read data can be viewed in ILA for one byte and half burst only. Data of various bytes can be viewed by driving the appropriate value for vio_rbyte_sel which is driven through VIO. vio_rbyte_sel is a 5-bit signal and you need to pass the value through VIO for a required byte and burst. Based on the value driven for vio_rbyte_sel through VIO, a corresponding DQ byte write and read data are listed in ILA.

The ATG default control connectivity in the example design created by Vivado is listed in the following tables.

Note: Application interface signals are not shown in these tables. See the corresponding memory section for application interface address/data width in the related information.
Table 1. General Control
Signal I/O Width Description
General Control
vio_tg_start I 1 Enable traffic generator to proceed from "START" state to "LOAD" state after calibration completes.

If you do not plan to program instruction table or PRBS data seed, tie this signal to 1'b1.

If you plan to program instruction table or PRBS data seed, set this bit to 0 during reset. After reset deassertion and done with instruction/seed programming, set this bit to 1 to start traffic generator.

vio_tg_rst I 1 Reset traffic generator (synchronous reset, level sensitive).

If there is outstanding traffic in memory pipeline, assert this signal long enough until all outstanding transactions have completed.

vio_tg_restart I 1 Restart traffic generator after traffic generation is complete, paused, or stopped with error (level sensitive).

If there is outstanding traffic in memory pipeline, assert this signal long enough until all outstanding transactions have completed.

vio_tg_pause I 1 Pause traffic generator (level sensitive).
vio_tg_err_chk_en I 1 If enabled, stop upon first error detected. Read test is performed to determine whether "READ" or "WRITE" error occurred. If not enabled, continue traffic without stop.
vio_tg_err_clear I 1 Clear all errors excluding sticky error bit (positive edge sensitive).

Only use this signal when vio_tg_status_state is either TG_INSTR_ERRDONE or TG_INSTR_PAUSE. Error is cleared two cycles after vio_tg_err_clear is asserted.

vio_tg_err_clear_all I 1 Clear all errors including sticky error bit (positive edge sensitive)

Only use this signal when vio_tg_status_state is either TG_INSTR_ERRDONE or TG_INSTR_PAUSE. Error is cleared two cycles after vio_tg_err_clear is asserted.

vio_tg_err_continue I 1 Continue traffic after error(s) at TG_INSTR_ERRDONE state (positive edge sensitive).
vio_rbyte_sel I 5 Based on the value driven for vio_rbyte_sel through VIO, a corresponding DQ byte half burst write and read data are listed in ILA.
Instruction Table Programming
vio_tg_direct_instr_en I 1 0 = Traffic Table Mode (Traffic Generator uses traffic patterns programmed in 32-entry traffic table.)

1 = Direct Instruction Mode (Traffic Generator uses current traffic pattern presented at VIO interface.)

vio_tg_instr_program_en I 1 Enable instruction table programming (level sensitive).
vio_tg_instr_num I 5 Instruction number to be programmed.
vio_tg_instr_addr_mode I 4 Address mode to be programmed.

0 = LINEAR; (with user-defined start address)

1 = PRBS; (PRBS supported range from 8 to 34 based on address width.)

2 = WALKING1

3 = WALKING0

4-15 = Reserved

vio_tg_instr_data_mode I 4 Data mode to be programmed.

0 = LINEAR

1 = PRBS (PRBS supported 8, 10, 23)

2 = WALKING1

3 = WALKING0

4 = HAMMER1

5 = HAMMER0

6 = Block RAM

7 = CAL_CPLX X (Must be programmed along with victim mode CAL_CPLX)

8-15 = Reserved

vio_tg_instr_rw_mode I 4 0 = Read Only (No data check)

1 = Write Only (No data check)

2 = Write/Read (Read performs after Write and data value is checked against expected write data.)

3 = Write once and Read forever (Data check on Read data)

4-15 = Reserved

vio_tg_instr_rw_submode I 2 Read/Write submode to be programmed.

This is a submode option when vio_tg_instr_rw_mode is set to "WRITE_READ" mode.

00 = WRITE_READ (Send all Write commands followed by Read commands defined in the instruction.)

01 = WRITE_READ_SIMULTANEOUSLY (Send Write and Read commands pseudo-randomly.)
Note: Write is always ahead of Read.

2 and 3 = Reserved

vio_tg_instr_victim_mode I 3 Victim mode to be programmed.

One victim bit could be programmed using global register vio_tg_victim_bit. The rest of the bits on signal bus are considered to be aggressors.

The following program options define aggressor behavior:

0 = NO_VICTIM

1 = HELD1 (All aggressor signals held at 1.)

2 = HELD0 (All aggressor signals held at 0.)

3 = NONINV_AGGR (All aggressor signals are same as victim.)

4 = INV_AGGR (All aggressor signals are inversion of victim.)

5 = DELAYED_AGGR (All aggressor signals are delayed version of victim. Num of cycle of delay is programmed at vio_tg_victim_aggr_delay.)

6 = DELAYED_VICTIM (Victim signal is delayed version of all aggressors.)

7 = CAL_CPLX (Complex Calibration pattern must be programed along with Data Mode CAL_CPLX)

vio_tg_instr_victim_aggr_delay I 5 Define aggressor/victim pattern to be N-delay cycle of victim/aggressor, where 0 ≤ N ≤ 24.

It is used when victim mode "DELAY_AGGR" or "DELAY VICTIM" mode is used in traffic pattern.

vio_tg_instr_victim_select I 3 Victim bit behavior to be programmed.

0 = VICTIM_EXTERNAL (Use Victim bit provided in vio_tg_glb_victim_bit.)

1 = VICTIM_ROTATE4 (Victim bit rotates from Bits[3:0] for every Nibble.)

2 = VICTIM_ROTATE8 (Victim bit rotates from Bits[7:0] for every Byte.)

3 = VICTIM_ROTATE_ALL (Victim bit rotates through all bits.)

4-7 = RESERVED

vio_tg_instr_num_of_iter I 32 Number of Read/Write commands to issue (number of issue must be > 0 for each instruction programmed)
vio_tg_instr_m_nops_btw_n_burst_m I 10 M: Number of NOP cycles in between Read/Write commands at User interface at general interconnect clock.

N: Number of Read/Write commands before NOP cycle insertion at User interface at general interconnect clock.

vio_tg_instr_m_nops_btw_n_burst_n I 32 M: Number of NOP cycles in between Read/Write commands at User interface at general interconnect clock.

N: Number of Read/Write commands before NOP cycle insertion at User interface at general interconnect clock.

vio_tg_instr_nxt_instr I 6 Next instruction to run.

To end traffic, next instruction should point at EXIT instruction.

6’b000000-6’b011111 – valid instruction

6’b1????? – EXIT instruction

PRBS Data Seed Programming
vio_tg_seed_program_en I 1 Enable seed programming (level sensitive).
vio_tg_seed_num I 8 Seed number to be programmed.
vio_tg_seed_data I PRBS_DATA_WIDTH PRBS seed to be programmed for a selected seed number (vio_tg_seed_num).

PRBS_DATA_WIDTH is by default 23. PRBS_DATA_WIDTH can support 8, 10, and 23.

Global Registers
vio_tg_glb_victim_bit I 8 Global register to define which bit in data bus is victim. It is used when victim mode is used in traffic pattern.
vio_tg_glb_start_addr I APP_ADDR_WIDTH Global register to define Start address seed for Linear Address Mode.
Status Registers
vio_tg_status_state O 4 Traffic Generator state machine state.
vio_tg_status_err_bit_valid O 1 Error detected. It is used as trigger to detect read error.
vio_tg_status_err_bit O APP_DATA_WIDTH Error bit mismatch. Bitwise mismatch pattern. A1 indicates error detected in that bit location.
vio_tg_status_err_addr O APP_ADDR_WIDTH Error Address (Address location of failed read.)
vio_tg_status_err_cnt O 32 Saturated counter that counts the number of assertion of the signal vio_tg_status_err_bit_valid.

The counter is reset by vio_tg_err_clear and vio_tg_err_clear_all.

vio_tg_status_exp_bit_valid O 1 Expected read data valid.
vio_tg_status_exp_bit O APP_DATA_WIDTH Expected read data.
vio_tg_status_read_bit_valid O 1 Memory read data valid.
vio_tg_status_read_bit O APP_DATA_WIDTH Memory read data.
vio_tg_status_first_err_bit_valid O 1 If vio_tg_err_chk_en is set to 1, first_err_bit_valid is set to 1 when first mismatch error is encountered.

This register is not overwritten until vio_tg_err_clear, vio_tg_err_continue, vio_tg_restart is triggered.

vio_tg_status_first_err_bit O APP_DATA_WIDTH If vio_tg_status_first_err_bit_valid is set to 1, only the first error mismatch bit pattern is stored in this register.
vio_tg_status_first_err_addr O APP_ADDR_WIDTH If vio_tg_status_first_err_bit_valid is set to 1, only the first error address is stored in this register.
vio_tg_status_first_exp_bit_valid O 1 If vio_tg_err_chk_en is set to 1, this represents expected read data valid when first mismatch error is encountered.
vio_tg_status_first_exp_bit O APP_DATA_WIDTH If vio_tg_status_first_exp_bit_valid is set to 1, expected read data for the first mismatch error is stored in this register.
vio_tg_status_first_read_bit_valid O 1 If vio_tg_err_chk_en is set to 1, this represents read data valid when first mismatch error is encountered.
vio_tg_status_first_read_bit O APP_DATA_WIDTH If vio_tg_status_first_read_bit_valid is set to 1, read data from memory for the first mismatch error is stored in this register.
vio_tg_status_err_bit_sticky_valid O 1 Accumulated error mismatch valid over time.

This register is reset by vio_tg_err_clear, vio_tg_err_continue, and vio_tg_restart.

vio_tg_status_err_bit_sticky O APP_DATA_WIDTH If vio_tg_status_err_bit_sticky_valid is set to 1, this represents accumulated error bit
vio_tg_status_err_cnt_sticky O 32 Saturated counter that counts the number of assertion of the signal vio_tg_status_err_bit_sticky_valid.

The counter is reset by vio_tg_err_clear_all.

vio_tg_status_err_type_valid O 1 If vio_tg_err_chk_en is set to 1, read test is performed upon the first mismatch error. Read test returns error type of either "READ" or "WRITE" error.

This register stores valid status of read test error type.

vio_tg_status_err_type O 1 If vio_tg_status_err_type_valid is set to 1, this represents error type result from read test.

0 = Write Error

1 = Read Error

vio_tg_status_done O 1 All traffic programmed completes.
Note: If infinite loop is programmed, vio_tg_status_done does not assert.
vio_tg_status_wr_done O 1 This signal pulses after a WRITE-READ mode instruction completes.
vio_tg_status_watch_dog_hang O 1 Watchdog hang. This register is set to 1 if there is no READ/WRITE command sent or no READ data return for a period of time (defined in tg_param.vh).
compare_error O 1 Accumulated error mismatch valid over time.

This register resets by vio_tg_err_clear, vio_tg_err_continue, and vio_tg_restart.