Context state transition diagram – Intel NETWORK PROCESSOR IXP2800 User Manual

Page 36

Advertising
background image

36

Hardware Reference Manual

Intel

®

IXP2800 Network Processor

Technical Description

Each of the eight Contexts is 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_STS 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 the 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

INDIRECT_WAKEUP_EVENTS CSR to occur (typically, but not limited to, an I/O access).

In this state the Context does not arbitrate to enter the Executing state.

The state diagram in

Figure 5

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.

The Microengine is in Idle state whenever no Context is running (all Contexts are in either Inactive

or Sleep states). This state is entered:

1. After reset (CTX_ENABLE Local CSR is clear, putting all Contexts into Inactive states).

2. When a context swap is executed, but no context is ready to wake up.

3. When a

ctx_arb[bpt]

instruction is executed by the Microengine (this is a special case of

condition

2

above, since the

ctx_arb[bpt]

clears CTX_ENABLE, putting all Contexts into

Inactive states).

Figure 5. Context State Transition Diagram

A9352-03

Inactive

Ready

CTX_ENABLE bit is set by

Intel XScale

®

Core

CTX_ENABLE bit is cleared

CTX_ENABLE

bit is cleared

Reset

Sleep

Executing

Context executes

CTX Arbitration instruction

Executing Context goes
to Sleep state, and this
Context is the highest
round-robin priority.

Ex

ter

na

l E

ven

t S

ign

al a

rrive

s

Note:
After reset, the Intel XScale

®

Core processor must load the starting address of the CTX_PC, load the

CTX_WAKEUP_EVENTS to 0x1 (voluntary), and then set the appropriate CTX_ENABLE bits to begin
executing Context(s).

Advertising