Hardware Reference Manual 169
Intel® IXP2800 Network Processor
Microengines
4.1.1 Control Store
The Control Store is a static RAM that holds the program that the Microengine executes. It holds
8192 instructions, each of which is 40 bits wide. It is initialized by an external device that writes to
Ustore_Addr and Ustore_Data Local CSRs.
The Control Store can optionally be protected by parity against soft errors. The parity protection is
optional, so that it can be disabled for implementations that don’t need or want to pay the cost for
it. Parity checking is enabled by CTX_Enable[Control Store Parity Enable]. A parity error on an
instruction read will halt the Microengine and assert an output signal that can be used as an
interrupt.
4.1.2 Contexts
There are eight hardware Contexts available in the Microengine. To allow for efficient context
swapping, each Context has its own register set, Program Counter, and Context specific Local
registers. Having a separate copy per Context eliminates the need to move Context specific
information to/from shared memory and Microengine registers for each Context swap. Fast context
swapping allows a Context to do computation while other Contexts wait for IO (typically external
memory accesses) to complete or for a signal from another Context or hardware unit. Note: a
context swap is similar to a taken branch in timing.
Each of the eight Contexts is always in one of four states.
1. Inactive — Some applications may not require all eight contexts. A Context is in the Inactive
state when its CTX_Enable CSR enable bit is a 0.
2. Executing — A Context is in Executing state when its context number is in
Active_CTX_Status CSR. The executing Context’s PC is used to fetch instructions from the
Control Store. A Context will stay in this state until it executes an instruction that causes it to
go to Sleep state (there is no hardware interrupt or preemption; Context swapping is
completely under software control). At most one Context can be in Executing state at any time.
3. Ready — In this state, a Context is ready to execute, but is not because a different Context is
executing. When the Executing Context goes to Sleep state, the Microengine’s context arbiter
selects the next Context to go to the Executing state from among all the Contexts in the Ready
state. The arbitration is round robin.
4. Sleep — Context is waiting for external event(s) specified in the CTX_#_Wakeup_Events
CSR to occur (typically, but not limited to, an IO access). In this state the Context does not
arbitrate to enter the Executing state.
The state diagram in Figure 57 illustrates the Context state transitions. Each of the eight Contexts
will be in one of these states. At most one Context can be in Executing state at a time; any number
of Contexts can be in any of the other states.