#ifndef SVTVME_PUBLIC_H #define SVTVME_PUBLIC_H #include #include #include #include typedef unsigned long uint4; typedef struct { int boardType; int protect, lock, debug; struct svtvme_board_s *svtvmeboard; struct VISION_Slave *vs, *vsfifo; FILE *fpdebug; } svtvme_t; /* board types */ enum { SVTVME_SVTB=0, SVTVME_AMB=31, SVTVME_AMS=32, SVTVME_HB=33, SVTVME_MRG=34, SVTVME_HF=35, SVTVME_TF=36, SVTVME_XTFA=37, SVTVME_SC=38, SVTVME_XTFC=39 }; /* objects Id's within each board */ int HB_INIT, HB_TMODE, HB_ERROR, HB_HIT_FIFO_REG, HB_ROAD_FIFO_REG, HB_HIT_FIFO_EMPTY, HB_ROAD_FIFO_EMPTY, HB_OUT_HOLD, HB_FSM, HB_HF_FSM, HB_RF_FSM, HB_OUT_REG, HB_VME_FREEZE, HB_HSPY_PTR, HB_RSPY_PTR, HB_OSPY_PTR, HB_HSPY_FRZ, HB_RSPY_FRZ, HB_OSPY_FRZ, HB_HSPY_WRP, HB_RSPY_WRP, HB_OSPY_WRP, HB_ERREN, HB_CDFERREN, HB_CDFERR, HB_SWITCHES, HB_IDPROM, HB_HIT_FIFO, HB_ROAD_FIFO, HB_HIT_SPY, HB_ROAD_SPY, HB_OUT_SPY, HB_SS_MAP, HB_AM_MAP ; /* function prototypes */ svtvme_t *svtvme_openBoard(char *crate, int slot, int boardType); int svtvme_closeBoard(svtvme_t *board); int svtvme_setGlobalFlag(char *flag, int *value); int svtvme_getGlobalFlag(char *flag, int *value); int svtvme_setBoardFlag(svtvme_t *board, char *flag, int *value); int svtvme_getBoardFlag(svtvme_t *board, char *flag, int *value); int svtvme_setBoardDebugFile(svtvme_t *board, FILE *file); int svtvme_getState(svtvme_t *board, int objId, uint4 *state); int svtvme_setState(svtvme_t *board, int objId, uint4 *state); int svtvme_checkState(svtvme_t *board, int objId, uint4 *state); int svtvme_testRegister(svtvme_t *board, int objId); int svtvme_readMemory(svtvme_t *board, int memId, int ndata, uint4 *data); int svtvme_checkMemory(svtvme_t *board, int memId, int ndata, uint4 *data, int stopFlag, int *nerr); int svtvme_testMemory(svtvme_t *board, int memId, int ntimes, int stopFlag, int *nerr); int svtvme_testIDPROM(svtvme_t *board); int svtvme_writeMemory(svtvme_t *board, int memId, int ndata, uint4 *data); int svtvme_readMemoryFragment(svtvme_t *board, int memId, uint4 offset, int nw, uint4 *data); int svtvme_writeMemoryFragment(svtvme_t *board, int memId, uint4 offset, int nw, uint4 *data); int svtvme_isEmpty(svtvme_t *board, int fifoId); int svtvme_isLast(int fifoId, uint4 word); int svtvme_readFifo(svtvme_t *board, int fifoId, int nw, uint4 *data); int svtvme_readAllFifo(svtvme_t *board, int fifoId, int maxWords, uint4 *data, int *moreData); int svtvme_spyCounter(svtvme_t *board, int spyId); int svtvme_isFrozen(svtvme_t *board, int spyId); int svtvme_isWrapped(svtvme_t *board, int spyId); int svtvme_readSpyTail(svtvme_t *board, int spyId, int nw, uint4 *data); int svtvme_readAllSpy(svtvme_t *board, int spyId, int ndata, uint4 *data); int svtvme_deltaSpy(int spyId, uint4 end, uint4 start); uint4 svtvme_rand(uint4 mask); #endif /* SVTVME_PUBLIC_H */