IXP1200 Network Processor Family ATM OC-3/12/Ethernet IP Router Example Design
Application Note 43
Modified on: 3/20/02,
4.6.1 MSGQ_HANDLE Parameters
The following parameters make up MSGQ_HANDLE and are common to all macros in msgq.uc:
4.6.2 msgq_init_queue()
Initializes the global queue in RAM_TYPE. Called by central initialization code before queues are
accessed.
msgq_init_queue(MSGQ_HANDLE)
4.6.3 msgq_init_regs()
Initializes the registers used to access the queue. Called by both producer and consumer.
msgq_init_regs(MSGQ_HANDLE)
4.6.4 msgq_send()
Sends a message to the queue.
Parameter Description
io_index GPR storing the current index into the queue. An absolute register is used to share the
index between threads. However, if the threads dont share access to the queue, a relative
GPR can be used.
in_base_addr GPR storing the base address of the queue in RAM_TYPE (scratchpad or SRAM). An
absolute GPR is used when the queue is shared between threads.
in_const_one The value one in a GPR, typically absolute, or the constant 1. The register is generally
used to save cycles.
BASE_ADDR Base address of the queue in RAM_TYPE -- loaded into in_base_addr by msgq_init().
SYNC_TYPE
Synchronization type, as follows:
#define MSGQ_ASYNC 0 - return immediately, with or without data
#define MSGQ_SYNC_POLL 1 - wait for data -- poll while waiting
#define MSGQ_SYNC_SLEEP 2 - wait for data -- sleep while waiting, sender must know
to wake up receiver
RAM_TYPE RAM type. Typically scratchpad, can also be SRAM.
MSGQ_SIZE Number of longwords in the message queue. Must be a power of 2. 16 is typically used for
scratchpad queues because it saves instructions.
Parameter Description
MSGQ_HANDLE Parameters described in MSGQ_HANDLE Parameters.
Parameter Description
MSGQ_HANDLE Parameters described in MSGQ_HANDLE Parameters.