RapidIO Intel FPGA IP User Guide

ID 683884
Date 9/15/2021
Public
Document Table of Contents

7.1. Reset, Initialization, and Configuration

In the testbench generated for variations other than Intel® Arria® 10 and Intel® Cyclone® 10 GX, the clocks that drive the testbench are defined and generated in the <design_name>_hookup.iv file. In the testbench generated for Intel® Arria® 10 and Intel® Cyclone® 10 GX variations, the clocks are defined and generated in the main testbench file.
Note: Refer to <design_name>_hookup.iv or the main testbench file, as appropriate for your IP core variation, for the exact frequencies used for each of the clocks. The frequencies depend on the configuration of the variation.

The reset sequence is simple—the main reset signal for the DUT and the sister_rio IP core, reset_n, is driven low at the beginning of the simulation, is kept low for 200 ns, and is then deasserted.

After reset_n is deasserted, the testbench waits until both the DUT and the sister_rio modules have driven their port_initialized output signals high. These signal transitions indicate that both IP cores have completed their initialization sequence. The testbench then waits an additional 5000 ns, to allow time for a potential reset link-request control symbol exchange between the DUT and the sister_rio module. The testbench again waits until both the DUT and the sister_rio modules have driven their port_initialized output signals high. Following the 5000 ns wait, these signals indicate that the link is established and the Physical layer is ready to exchange traffic.

Next, basic programming of the internal registers is performed in the DUT and the sister_rio module.

Table 121.  Testbench Registers Programmed in both the DUT and the sister_rio IP Cores
Module Register

Address

Register Name Description Value
rio 0x00060 Base Device ID CSR Program the DUT to have an 8-bit base device ID of 0xAA or a 16-bit device ID of 0xAAAA. 32'h00AA_FFFFor 32’h00FF_AAAA
rio 0x0013C General Control CSR Enable Request packet generation by the DUT. 32'h6000_0000
sister_rio 0x00060 Base Device ID CSR Program the sister_rio module to have an 8-bit base device ID of 0x55 or a 16-bit device ID of 0x5555. 32'h0055_FFFF or 32’h00FF_5555
sister_rio 0x0013C General Control CSR Enable Request packet generation by the sister_rio module. 32'h6000_0000
rio 0x1040C Input/Output Slave Window 0 Control Set the DESTINATION_ID for outgoing transactions to a value 0x55 or 0x5555. The width of the DESTINATION_ID field depends on the sister_rio device ID width. This value matches the base device ID of the sister_rio module. 32'h0055_0000 or 32'h5555_0000
rio 0x10404 Input/Output Slave Window 0 Mask Define the Input/Output Avalon® -MM Slave Window 0 to cover the whole address space (mask set to all zeros) and enable it. 32'h0000_0004
sister_rio 0x10504 Input/Output Slave Interrupt Enable Enable the I/O slave interrupts. 32'h0000_000F
sister_rio 0x10304 Input/Output Master Window 0 Mask Enable the sister_rio I/O Master Window 0, which allows the sister_rio to receive I/O transactions. 32'h0000_0004
rio 0x1010C TX Maintenance Window 0 Control Set the DESTINATION_ID for outgoing MAINTENANCE packets to 0x55 or 0x5555, depending on the sister_rio device ID width. This value matches the base device ID of the sister_rio module. Set the hop count to 0xFF. 32'h0055_FF00 or 32'h5555_FF00
rio 0x10104 TX Maintenance Window 0 Mask Enable the TX Maintenance window 0. 32'h0000_0004

Read and write tasks that are defined in the BFM instance, bfm_cnt_master, program the DUT’s registers. Read and write tasks defined in the BFM instance sister_bfm_cnt_master program the sister_rio module’s registers. For the exact parameters passed to these tasks, refer to the file <design_name>_tb.v. The tasks drive either a write or read transaction across the System Maintenance Avalon® -MM slave interface.

In this testbench example, the IP cores can exchange basic packets across the serial link.