| LAT Internal Communications System: Software Interface Conceptual Design | ||
|---|---|---|
| Prev | Chapter 3. Event Processing | Next |
For event data the LCB uses a circular memory buffer that physically resides in the SBC. The starting address of the circular buffer is stored in the EVENT_BASEn register of the LCB. The LCB maintains the buffer's write pointer internally, while the user maintains the buffer's read pointer in the EVENT_FREEn register of the LCB.
Paraphrasing from [1], the life cycle of an event consists of the following steps:
The LCB decodes an incoming event packet and buffers it in the export unit of the LCB
The LCB allocates memory for the incoming event from the circular buffer.
The LCB DMAs the event data into this memory.
An unsolicated result descriptor, referencing the memory location for the event, is written into the results FIFO for the appropriate SBC.
The LCB raises an interrupt.
The LEPI traps the interrupt and reads the result descriptor from the results FIFO.
The LEPI checks the result descriptor for DMA errors – on errors the LEPI calls a user supplied error handling call-back function.
The LEPI determines from the result descriptor that the result is an event result.
From the result descriptor the event data is located and processed.
When event processing is completed the user deallocates the event by updating the circular buffer's read pointer.