2. Serial RapidIO Interface > Lookup Tables
45
Tsi578 User Manual
June 6, 2016
Integrated Device Technology
www.idt.com
Example Two: Adding a Lookup Table Entry
In the following example, routing is added for port 0x5 to route destination ID 0x20 to output port 0x3.
To add a lookup table, complete the following steps:
1.
Write to the
“RapidIO Port x Route Config DestID CSR” on page 314
, using the offset for port 5
(0x11570), with a value of 0x80000020. This makes the destination ID 0x20 and the
Auto-increment 0x1
2.
Write to the
“RapidIO Port x Route Config Output Port CSR” on page 315
, using the offset for port
5 (0x11574), with a value of 0x00000003. This programs Port 0x3.
Example Three: Verifying / Reading a Lookup Table Entry
In the following example, output port for destination ID 0x54 is read. To verify and read a lookup table
entry, perform the following steps:
1.
Write to the
“RapidIO Port x Route Config DestID CSR” on page 314
, using the broadcast (BC)
offset (0x10070), with a value of 0x00000054. This programs the destination ID 0x54.
2.
Read to the value in
“RapidIO Port x Route Config Output Port CSR” on page 315
, using the
broadcast (BC) offset (0x10074). This value represents the output port for packets with destination
ID 0x54
2.3.4
Hierarchical Mode
The hierarchical mode of operation of the LUT allows the full range of 65536 16-bit destination IDs to
be mapped. This mode is enabled by setting RIO_SP_MODE.LUT_512 = 0. The hierarchical mode of
operation uses two LUTs, each containing 256 entries.
•
For packets with 8-bit destination IDs, the ingress port uses the ID as an index into the “local” LUT
(see
•
For packets with 16-bit destination IDs:
— If the most significant 8 bits of the packet’s destination ID match the value configured in
SPx_ROUTE_BASE.BASE register field, the ingress port uses the least significant 8 bits of
the packet’s destination ID to index the “local LUT” and retrieve an egress port number.
— If the most significant 8 bits of the packet’s destination ID do not match the value configured
in the SPx_ROUTE_BASE.BASE register field, the ingress port uses the most significant 8
bits of the packet’s destination ID to index the “global LUT” and retrieve an egress port
number. Thus, the majority of the 16-bit destination ID number space is covered by the global
LUT, with groups of 256 destination IDs targeting the same egress switch port.
In this example, if a further write to
“RapidIO Port x Route Config DestID CSR” on page 314
(offset 0x11574) was performed the output port for destination ID 0x21 is configured
The value reported back is assumed to be for all ports but it only reports back the value in port
0.