/************************************************************************************ * primList.h * * synopsis: Contains the structures which describe the primitive list buffer. * * related files: * listManager.c: Routines which manage the execution of a primitive list and * writing the reply data. * * Damon Fasching, UW Madison/LBNL fasching@wisconsin.cern.ch * Douglas Ferguson, UW Madison/LBNL (510) 486-5230 dpferguson@lbl.gov ************************************************************************************/ #ifndef PRIM_LIST_H #define PRIM_LIST_H #include "processor.h" /* There are three message (primitive) buffers, each of which has a input ("primitive") and an output ("reply") buffer. The first is for host/MDSP and MDSP/SDSP use; the latter two are private inter-DSP buffers which are used by the DSPs to send sub-lists while the main list is still active. */ #define N_PRIM_BFRS 3 /* ListHeader describes the primitive list header */ typedef struct { /* header for message (primitive and reply) lists */ UINT32 length; /* total number of words in the list */ UINT32 index; /* list index */ UINT32 numPrims; /* number of primitives */ UINT32 status; /* list status code */ UINT32 nErrors; /* # non-fatal errors (fatal errors stop list) */ UINT32 nProcessed; /* # of primitves processed */ UINT32 processingIndex; /* index of last primitive processed */ UINT32 primListRevision; /* revision number of list */ } ListHeader; /* ListTail describes the message trailer */ typedef struct { /* trailer for message (primitive and reply) lists */ UINT32 length; /* should = length in the header, a check */ UINT32 checksum; /* checksum */ } ListTail; /* PrimList describes a message (primitive or reply) list */ typedef struct { UINT32 *base; /* base address of the buffer */ UINT32 buffSize; /* size of the buffer in words */ UINT32 *rwPtr; /* current address */ UINT32 primCounter; /* primitive or reply message counter */ UINT32 checksumWC; /* number of words to use in checksum calculation */ UINT32 checksum; /* locally calculated value of checksum */ ListHeader head; /* holds list header */ ListTail tail; /* holds list trailer */ } PrimList; /* PrimHeader describes a primitive header */ typedef struct { UINT32 length; /* Length of primitive */ UINT32 index; /* Index of primitive in list */ UINT32 id; /* Primitive's ID */ UINT32 status; /* Result of execution */ UINT32 nExecutions; /* # times the primitive executed */ UINT32 procTime; /* total primitive processing time*/ UINT32 unused; UINT32 primRevision; /* the primitive's revision #*/ } PrimHeader; #define UNINITIALIZED_PRIM (0xFFFFFFFF) #endif