RapidIO Intel FPGA IP User Guide

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

4.5.5.1. Pass-Through Interface Examples

This section contains two examples, one receiving and the other transmitting a packet through the Avalon® -ST pass-through interface. The RapidIO IP core variation in the receiving example uses 8-bit device ID, and the variation in the transmitting example uses 16-bit device ID.

Packet Routed Through Rx Port on Avalon® -ST Pass-Through Interface

The following example of a packet routed to the receiver Avalon® -ST pass-through interface is for a variation that only has the Maintenance module and the Avalon® -ST pass-through interface enabled. A packet received on the RapidIO interface with an ftype that does not indicate a MAINTENANCE transaction is routed to the receiver port of the Avalon® -ST pass-through interface.

Figure 37. Packet Received on the Avalon® -ST Pass-Through Interface

In cycle 0, the user logic indicates to the RapidIO IP core that it is ready to receive a packet transfer by asserting gen_rx_ready. In cycle 1, the IP core asserts gen_rx_valid and gen_rx_startofpacket. During this cycle, gen_rx_size is valid and indicates that five cycles are required to transfer the packet.

Table 29.  RapidIO Header Fields and gen_rx_data Bus Payload
Cycle Field gen_rx_data bus Value Comment
1 ackID [63:59] 5'h00  
rsvd [58:57] 2'h0  
CRF [56] 1'b0  
prio [55:54] 2'h0  
tt [53:52] 2'h0 Indicates 8-bit device IDs.
ftype [51:48] 4'h5 A value of 5 indicates a Write Class packet.
destinationID [47:40] 8'haa 31
sourceID [39:32] 8'hcc 31
ttype [31:28] 4'h4 The value of 4 indicates a NWRITE transaction.
wrsize [27:24] 4'hc The wrsize and wdptr values encode the maximum size of the payload field. In this example, they decode to a value of 32 bytes. For details, refer to Table 4-4 in Part 1: Input/Output Logical Specification of the RapidIO Interconnect Specification, Revision 2.1
srcTID [23:16] 8'h00  
address[28:13] [15:0] 16'h5a5a The 29 bit address composed is 29’hb4b5959. This becomes 32'h5a5acac8, the double-word physical address.
2 address[12:0] [63:51] 13'h1959  
wdptr [50] 1'b0 See description for the size field.
xamsbs [49:48] 2'h0  
Payload Byte0,1 [47:32] 16'h0001  
Payload Byte2,3 [31:16] 16'h0203  
Payload Byte4,5 [15:0] 16'h0405  
3 Payload Byte6,7 [63:48] 16'h0607  
Payload Byte8,9 [47:32] 16'h0809  
Payload Byte10,11 [31:16] 16'h0a0b  
Payload Byte12,13 [15:0] 16'h0c0d  
4 Payload Byte14,15 [63:48] 16'h0e0f  
Payload Byte16,17 [47:32] 16'h1011  
Payload Byte18,19 [31:16] 16'h1213  
Payload Byte20,21 [15:0] 16'h1415  
5 CRC[15:0] [63:48] 16'hd37c For packets with a payload greater than 80 bytes, the first CRC field is removed but the final CRC field is not removed. For packets smaller than 80 bytes, the CRC field is not removed.
Pad bytes [47:32] 16'h0000 The RapidIO requires that Pad bytes be added for the payload to adhere to 32-bit alignment.
 

Bits [31:0] of the gen_rx_data bus are ignored in cycle 5 as the gen_rx_empty signals indicates that 4 bytes are not used in the end-of-packet word. In the case of a RapidIO IP core variation with 16-bit device ID, the value of gen_rx_empty would be 2, and only bits [15:0] of the gen_rx_data bus would be ignored in cycle 5.

NREAD Example Using Tx Port on Avalon® -ST Pass-Through Interface

The next example shows the response to an NREAD transaction in a RapidIO IP core variation with 16-bit device ID. The response is presented on the Tx port of the Avalon® -ST pass-through interface. The transaction diagram below shows the packet presented on this interface. The values captured on a rising clock edge are those shown in the previous clock cycle, because values change after the rising clock edge.

Figure 38. Packet Transmitted on the Avalon® ST Pass-Through Interface

The figure shows a response to a 32-byte NREAD request in a RapidIO IP core with 16-bit device ID. The following table shows the composition of the fields in the RapidIO packet header and the payload as they correspond to each clock cycle. The gen_tx_empty bits indicate a value of 0, because all bytes of the last word are read.

Table 30.  RapidIO Header Fields on the gen_tx_data Bus
Cycle Field gen_tx_data bus Value Comment
1 ackID [63:59] 5'h00 Value is a don’t care, because it is overwritten by the Physical layer ackID value before the packet is transmitted on the RapidIO link.
rsvd [58:57] 2'h0  
CRF [56] 1'b0  
prio [55:54] 2'b10 Priority of the RESPONSE packet. Value must be incremented from the priority value of the REQUEST packet. For example, prio value 2’b10 indicates that the original request had a priority value of 2’b01.
tt [53:52] 2'h1 Indicates 16-bit device IDs.
ftype [51:48] 4'hd A value of 4'hd (13 decimal) indicates a Response Class packet.
destinationId [47:32] 16'hccdc In the case of a RapidIO IP core variation with a 8-bit device ID width, the destinationID and sourceID fields shrink to a width of 8 bits each, and the fields described in the following table rows shift to the left and to an earlier clock cycle if appropriate.
sourceId [31:16] 16'haaba
ttype [15:12] 4'h8 A value of 8 indicates a RESPONSE transaction with data payload.
status [11:8] 4'h0 A value of 0 indicates DONE. Requested transaction has been successfully completed.
targetTID [7:0] 8'h00 Value in the response packet matches the sourceTID of the corresponding request packet.
2 Payload Byte0,1 [63:48] 16'h0102 Payload double word 0
Payload Byte2,3 [47:32] 16'h0304
Payload Byte4,5 [31:16] 16'h0506
Payload Byte6,7 [15:0] 16'h0708
3 Payload Byte8,9 [63:48] 16'h090a Payload double word 1
Payload Byte10,11 [47:32] 16'h0b0c
Payload Byte12,13 [31:16] 16'h0d0e
Payload Byte14,15 [15:0] 16'h0f10
4 Payload Byte16,17 [63:48] 16'h1112 Payload double word 2
Payload Byte18,19 [47:32] 16'h1314
Payload Byte20,21 [31:16] 16'h1516
Payload

Byte22,23

[15:0] 16'h1718
5 Payload

Byte24,25

[63:48] 16'h191a Payload double word 3
Payload

Byte26,27

[47:32] 16'h1b1c
Payload

Byte28,29

[31:16] 16'h1d1e
Payload

Byte30,31

[15:0] 16'h1f20
31 In the case of RapidIO IP core variation with 16-bit device ID, the destinationID and sourceID fields expand to a width of 16 bits each, and the fields described in the table rows following the destinationID field are shifted to the right and to the following clock cycles.