Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages

primList.h

00001 /************************************************************************************
00002  * primList.h
00003  *                            
00004  *  synopsis: Contains the structures which describe the primitive list buffer.
00005  *
00006  *  related files:
00007  *   listManager.c: Routines which manage the execution of a primitive list and
00008  *                  writing the reply data.
00009  *
00010  *  Damon Fasching,   UW Madison/LBNL                     fasching@wisconsin.cern.ch
00011  *  Douglas Ferguson, UW Madison/LBNL   (510) 486-5230    dpferguson@lbl.gov
00012  ************************************************************************************/
00013 #ifndef PRIM_LIST_H
00014 #define PRIM_LIST_H
00015 
00016 #include "processor.h"
00017 
00018 /* There are three message (primitive) buffers, each of which has a input ("primitive")
00019    and an output ("reply") buffer. The first is for host/MDSP and MDSP/SDSP use; the
00020    latter two are private inter-DSP buffers which are used by the DSPs to send sub-lists
00021    while the main list is still active. */
00022 #define N_PRIM_BFRS 3
00023 
00024 /* ListHeader describes the primitive list header */
00025 typedef struct {                 /* header for message (primitive and reply) lists */
00026     UINT32 length;               /* total number of words in the list */
00027     UINT32 index;                /* list index */
00028     UINT32 numPrims;             /* number of primitives */
00029     UINT32 status;               /* list status code */
00030 
00031     UINT32 nErrors;              /* # non-fatal errors (fatal errors stop list) */
00032     UINT32 nProcessed;           /* # of primitves processed */
00033     UINT32 processingIndex;      /* index of last primitive processed */
00034     UINT32 primListRevision;     /* revision number of list */
00035 } ListHeader;
00036 
00037 /* ListTail describes the message trailer */
00038 typedef struct {                 /* trailer for message (primitive and reply) lists */ 
00039     UINT32 length;               /* should = length in the header, a check */
00040     UINT32 checksum;             /* checksum */
00041 } ListTail;
00042 
00043 /* PrimList describes a message (primitive or reply) list */
00044 typedef struct {
00045     UINT32 *base;                /* base address of the buffer */
00046     UINT32 buffSize;             /* size of the buffer in words */
00047     UINT32 *rwPtr;               /* current address */
00048     UINT32 primCounter;          /* primitive or reply message counter */
00049     UINT32 checksumWC;           /* number of words to use in checksum calculation */
00050     UINT32 checksum;             /* locally calculated value of checksum */
00051     ListHeader head;             /* holds list header */
00052     ListTail   tail;             /* holds list trailer */
00053 } PrimList;
00054 
00055 /* PrimHeader describes a primitive header */
00056 typedef struct {
00057     UINT32 length;               /* Length of primitive */    
00058     UINT32 index;                /* Index of primitive in list */
00059     UINT32 id;                   /* Primitive's ID */
00060     UINT32 status;               /* Result of execution */
00061     UINT32 nExecutions;          /* # times the primitive executed */
00062     UINT32 procTime;             /* total primitive processing time*/
00063     UINT32 unused;            
00064     UINT32 primRevision;         /* the primitive's revision #*/
00065 } PrimHeader;
00066 
00067 #define UNINITIALIZED_PRIM (0xFFFFFFFF)
00068 
00069 #endif

Generated on Thu Dec 22 20:17:06 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5