#include <bstring.h>
#include "BBC/SPIN.h"
#include "BTU/TEM_ids.h"
#include "BTU/TEM.h"
#include "BFU/BFM.h"
Data Structures | |
| struct | _BFM_dsc |
| Captures all information about the TEMs and FPGAs. More... | |
| struct | _BFM_opStatus |
| Captures the status of a given operation. More... | |
Typedefs | |
| typedef enum _BFM_opId | BFM_opId |
| Typedef for enum _BFM_opId. | |
| typedef enum _BFM_opMsk | BFM_opMsk |
| Typedef for enum _BFM_opMsk. | |
| typedef _BFM_opStatus | BFM_opStatus |
| Typedef for struct _BFM_opStatus. | |
Enumerations | |
| enum | _BFM_opId { BFM_C_OP_TEMS_ADD = 0, BFM_C_OP_FPGAS_ADD = 1, BFM_C_OP_TEMS_PROBE = 2, BFM_C_OP_TEMS_PRESET = 3, BFM_C_OP_FPGAS_LOAD = 4, BFM_C_OP_TEMS_RESET = 5, BFM_C_OP_TEMS_READY = 6, BFM_C_OP_CNT = 7 } |
| Enumerates the list of possible operations. More... | |
| enum | _BFM_opMsk { BFM_M_OP_TEMS_ADD = (1 << BFM_C_OP_TEMS_ADD), BFM_M_OP_FPGAS_ADD = (1 << BFM_C_OP_FPGAS_ADD), BFM_M_OP_TEMS_PROBE = (1 << BFM_C_OP_TEMS_PROBE), BFM_M_OP_TEMS_PRESET = (1 << BFM_C_OP_TEMS_PRESET), BFM_M_OP_FPGAS_LOAD = (1 << BFM_C_OP_FPGAS_LOAD), BFM_M_OP_TEMS_RESET = (1 << BFM_C_OP_TEMS_RESET), BFM_M_OP_TEMS_READY = (1 << BFM_C_OP_TEMS_READY), BFM_M_OP_MSK = (1 << BFM_C_OP_CNT) - 1 } |
| Enumerates the list of possible operations as masks. | |
Functions | |
| unsigned int | setStatus (BFM_opStatus *opSts, BFM_opId opId, BFM_opTarget opTarget, unsigned int targetSet, unsigned int failures) |
| Internal routine to complete the operations status block. More... | |
| BFM_dsc * | BFM_get (void) |
| Returns a piece of memory that either is the TEM data base or can be filled in to be the TEM data base. More... | |
| unsigned int | BFM_describe (BFM_dsc *bfm, unsigned int requestTems, const unsigned vmeAdrs[TEM_C_CNT], const struct _TEM_temDsc *const temDscs[TEM_C_CNT], const struct _FPGA_ttcHdr *const fpgaTtcs[TEM_C_FPGA_CNT], const struct _TEM_fpgaDsc *const fpgaDscs[TEM_C_FPGA_CNT]) |
| Workhorse routine to describe the properties of a collection TEMs/FPGAs. More... | |
| unsigned int | BFM_initialize (BFM_dsc *bfm) |
| Initializes the TEMs making them ready for use. More... | |
| unsigned int | BFM_opsAttempted (const BFM_dsc *bfm) |
| Returns a bit mask of all operations attempted on any TEM/FPGA. More... | |
| unsigned int | BFM_opErrors (const BFM_dsc *bfm) |
| Returns a bit mask of all failed operations attempted on any TEM/FPGA. More... | |
| void | BFM_opReport (const BFM_dsc *bfm, unsigned int operations, BFM_opReporter reporter, void *parameter) |
| Reports on the success or failure of various operations. More... | |
| unsigned int | BFM_fpgasL1tCounterClear (BFM_dsc *bfm, unsigned int fpgaList) |
| Clears the L1t event counter. More... | |
| unsigned int | BFM_fpgasL1tTimerClear (BFM_dsc *bfm, unsigned int fpgaList) |
| Clears the L1t timer. More... | |
| unsigned int | BFM_fpgasBistWrite (const BFM_dsc *bfm, unsigned int fpgaList, unsigned int bistList) |
| Writes the self test mode for the specified list of fpgas. More... | |
| unsigned int | BFM_fpgasHfullClrWrite (const BFM_dsc *bfm, unsigned int fpgaList, unsigned int hfullList) |
| Writes the FIFO Half Full Auto Clear mode for the specified list of FPGAS. More... | |
| unsigned int | BFM_fpgasHfullEnbWrite (const BFM_dsc *bfm, unsigned int fpgaList, unsigned int hfullList) |
| Writes the FIFO Half Full Enable mode for the specified list of fpgas. More... | |
| unsigned int | BFM_fpgasLoaded (const BFM_dsc *bfm) |
| Returns a list of the FPGAs that were successfully loaded. More... | |
| unsigned int | BFM_fpgasLogicClear (BFM_dsc *bfm, unsigned int fpgaList) |
| Toggles the FPGA Logic Clear bit for the specified list of FPGAs. More... | |
| unsigned int | BFM_fpgasTemsGet (const BFM_dsc *bfm, unsigned int fpgaList) |
| Returns the list of the TEMSs associated with the specified list of FPGAs. More... | |
| unsigned int | BFM_temsFpgasGet (const BFM_dsc *bfm, unsigned int temList) |
| Returns the list of the FPGAs associated with the specified list of TEMs. More... | |
| const struct _TEM_fpga * | BFM_fpgas (const BFM_dsc *bfm) |
| Returns a pointer to the FPGA database. More... | |
| unsigned int | BFM_fpgasRdoBsyMinMaxWrite (const BFM_dsc *bfm, unsigned int fpgaList, unsigned int modeList) |
| Writes the readout min/max mode for the specified list of fpgas. More... | |
| unsigned int | BFM_fpgasRdoModeWrite (const BFM_dsc *bfm, unsigned int fpgaList, unsigned int modeList) |
| Writes the readout mode for the specified list of fpgas. More... | |
| const struct _TEM_tem * | BFM_tems (const BFM_dsc *bfm) |
| Returns a pointer to the TEM database. More... | |
| unsigned int | BFM_temsFifosReset (const BFM_dsc *bfm, unsigned int temList) |
| Resets all the FIFOs on a TEM. More... | |
| unsigned int | BFM_temsPresent (const BFM_dsc *bfm) |
| Returns a list of the TEMs that are present in the system. More... | |
| unsigned int | BFM_temsReadied (const BFM_dsc *bfm) |
| Returns a list of the TEMs that are in the ready state. More... | |
| unsigned int | BFM_temsScopeBitClear (BFM_dsc *bfm, unsigned int temList) |
| Clears the scope bit on the specified TEMs. More... | |
| unsigned int | BFM_temsScopeBitSet (BFM_dsc *bfm, unsigned int temList) |
| Sets the scope bit on the specified TEMs. More... | |
| unsigned int | BFM_temsScopeBitToggle (BFM_dsc *bfm, unsigned int temList) |
| Toggles the scope bit on the specified TEMs. More... | |
| const unsigned int * | BFM_vmeAdrsByTem (const BFM_dsc *bfm) |
| Returns an array, indexed by TEM, of the TEMs VME addresses. More... | |
| const unsigned int * | BFM_vmeAdrsByFpga (const BFM_dsc *bfm) |
| Returns an array, indexed by FPGA, of the TEMs VME addresses. More... | |
| volatile unsigned int *const * | BFM_lclAdrsByTem (const BFM_dsc *bfm) |
| Returns an array, indexed by TEM, of the TEMs local addresses. More... | |
| volatile unsigned int *const * | BFM_lclAdrsByFpga (const BFM_dsc *bfm) |
| Returns an array, indexed by FPGA, of the TEMs local addresses. More... | |
|
|
||||||||||||||||||||||||||||
|
Workhorse routine to describe the properties of a collection TEMs/FPGAs.
These parameters all are specified as arrays of either TEM_C_CNT or TEM_C_FPGA_CNT. In all cases, if the set requested TEMs does not include a particular TEM, then the information about that TEM or its associated FPGAs need not be specified. In short, if one only wants the CAL, then you only need specify the information relevant for the CAL TEM and its FPGA. The operations are basically beign. The only operation to actually touch a TEM is a VME bus probe to check on its presence. |
|
|
Returns a pointer to the FPGA database.
|
|
||||||||||||||||
|
Writes the self test mode for the specified list of fpgas.
|
|
||||||||||||||||
|
Writes the FIFO Half Full Auto Clear mode for the specified list of FPGAS.
|
|
||||||||||||||||
|
Writes the FIFO Half Full Enable mode for the specified list of fpgas.
|
|
||||||||||||
|
Clears the L1t event counter.
|
|
||||||||||||
|
Clears the L1t timer.
|
|
|
Returns a list of the FPGAs that were successfully loaded.
|
|
||||||||||||
|
Toggles the FPGA Logic Clear bit for the specified list of FPGAs.
|
|
||||||||||||||||
|
Writes the readout min/max mode for the specified list of fpgas.
|
|
||||||||||||||||
|
Writes the readout mode for the specified list of fpgas.
|
|
||||||||||||
|
Returns the list of the TEMSs associated with the specified list of FPGAs.
|
|
|
Returns a piece of memory that either is the TEM data base or can be filled in to be the TEM data base.
|
|
|
Initializes the TEMs making them ready for use.
Each TEM is initialized as far as possible. If a failure occurs, the return value is marked with a bit noting a failure of some TEM at this phase. Said another way, the return value is really a summary error mask, indicating which operations had at least on failure associated with it. The user can then interrogate the BFM for specifics about exactly what failed at each phase. (See BFM_opReport for instance). |
|
|
Returns an array, indexed by FPGA, of the TEMs local addresses.
|
|
|
Returns an array, indexed by TEM, of the TEMs local addresses.
|
|
|
Returns a bit mask of all failed operations attempted on any TEM/FPGA.
|
|
||||||||||||||||||||
|
Reports on the success or failure of various operations.
|
|
|
Returns a bit mask of all operations attempted on any TEM/FPGA.
|
|
|
Returns a pointer to the TEM database.
|
|
||||||||||||
|
Resets all the FIFOs on a TEM.
|
|
||||||||||||
|
Returns the list of the FPGAs associated with the specified list of TEMs.
|
|
|
Returns a list of the TEMs that are present in the system.
|
|
|
Returns a list of the TEMs that are in the ready state.
|
|
||||||||||||
|
Clears the scope bit on the specified TEMs.
|
|
||||||||||||
|
Sets the scope bit on the specified TEMs.
|
|
||||||||||||
|
Toggles the scope bit on the specified TEMs.
|
|
|
Returns an array, indexed by FPGA, of the TEMs VME addresses.
|
|
|
Returns an array, indexed by TEM, of the TEMs VME addresses.
|
|
||||||||||||||||||||||||
|
Internal routine to complete the operations status block.
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002