RapidIO Intel FPGA IP User Guide

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

7.7. Doorbell Transactions

To test DOORBELL messages, the doorbell interrupts must be enabled. To enable interrupts, the testbench sets the lower three bits in the Doorbell Interrupt Enable register located at address 0x0000_0020. The test also programs the DUT to store all of the successful and unsuccessful DOORBELL messages in the Tx Completion FIFO.

Next, the test pushes eight DOORBELL messages to the transmit DOORBELL Message FIFO of the DUT. The test increments the message payload for each transaction, which occurs when the rw_addr_data task (defined in the bfm_drbell_s_master instance) is invoked with a ‘WRITE operation to the TX doorbell register at offset 0x0000_000C. This action programs the 16-bit message, an incrementing payload in this example, as well as the DESTINATION_ID0x55 for an 8-bit device ID or 0x5555 for a 16-bit device ID—which is used in the DOORBELL transaction packet.

To verify that the DOORBELL request packets have been sent, the test waits for the drbell_s_irq signal to be asserted. The test then reads the Tx Doorbell Completion register. This register provides the DOORBELL messages that have been added to the Tx Completion FIFO. Eight successfully completed DOORBELL messages should appear in that FIFO and each one should be accessible by reading the Tx Doorbell Completion register eight times in succession. To perform this verification, the test invokes the rw_data task defined in the instance bfm_drbell_s_master.

If you created the DUT with Doorbell Rx enable turned on and with Doorbell Tx enable turned off, the doorbell test programs the sister_rio module to send eight DOORBELL messages to the DUT. The test verifies that all eight DOORBELL messages were received by the DUT. The test calls the rw_addr_data task defined in the instance sister_bfm_drbell_s_master. The task performs a write to the Tx Doorbell register. It programs the payload to be incrementing, starting at 0x0C01, and the DESTINATION_ID to have value 0xAA or 0xAAAA, matching the device ID of the DUT.

The test waits for the DUT to assert the drbell_s_irq signal, which indicates that a DOORBELL message has been received. The test then reads the eight received DOORBELL messages, by calling the rw_data task with a ‘READ operation to the Rx DOORBELL register at offset 0x0000_0000. The task is called eight times, once for each message. It returns the received DOORBELL message and the message is checked for an incrementing payload starting at 0x0C01 and for the sourceId value 0x55 or 0x5555, the device ID of the sister RapidIO IP core variation.