232 Hardware Reference Manual
Intel
®
IXP2800 Network Processor
SHaC — Unit Expansion
Head, Tail, Base, and Size are registers in the Scratchpad Unit. Head and Tail point to the actual
ring data, which is stored in the Scratchpad RAM. For each ring in use, a region of Scratchpad
RAM must be reserved for the ring data. The reservation is by software convention. The hardware
does not prevent other accesses to the region of Scratchpad used by the ring. Also, the regions of
Scratchpad memory allocated to different rings must not overlap.
Head points to the next address to be read on a get, and Tail points to the next address to be written
on a put. The size of each ring is selectable from the following choices: 128, 256, 512, or 1,024
32-bit words. The size is specified in the Ring_Base register.
Note: The above rule stating that rings must not overlap implies that many configurations are not legal.
For example, programming five rings to a size of 1024 words would exceed the total size of
Scratchpad memory, and therefore is not legal.
Note: The region of Scratchpad used for a ring is naturally aligned to its size.
Each ring asserts an output signal that is used as a state input to the Microengines. The software
configures whether the Scratchpad asserts the signal if a ring becomes empty or if the ring is nearly
full.
If configured to assert status when the rings are nearly full, Microengines must test the input state
(by doing Branch on Input Signal) before putting data onto a ring. There is a lag in time from a put
instruction executing to the Full signal being updated to reflect that put. To be guaranteed that a put
does not overfill the ring, there is a limit on the number of Contexts and the number of 32-bit words
per write, based on the size of the ring, as shown in Table 79. Each Context should test the Full
signal, then do the put if not Full, and then wait until the Context has been signaled that the data has
been pulled, before testing the Full signal again.
Table 79. Ring Full Signal Use – Number of Contexts and Length versus Ring Size
Number of
Contexts
Ring Size
128 256 512 1024
116161616
216161616
4 8 16 16 16
8 4 12 16 16
16 2 6 14 16
24 1 4 9 16
32 1 3 7 15
40 Illegal 2 5 12
48 Illegal 2 4 10
64 Illegal 1 3 7
128 Illegal Illegal 1 3
NOTE:
1. Number in each table entry is the largest length that should be put. 16 is the largest length that a single put
instruction can generate.
2. Illegal - With that number of Contexts, even a length of 1 could cause the ring to overfill.