#include "BTU/TEM.h"
Typedefs | |
| typedef _BFM_dsc | BFM_dsc |
| Typedef for struct _BFM_dsc. | |
| typedef enum _BFM_opTarget | BFM_opTarget |
| Typedef for enum _BFM_opTarget. | |
| typedef int(* | BFM_opReporter )(void *parameter, int opId, BFM_opTarget opTarget, unsigned int successes, unsigned int failures, const struct _TEM_tem *tems, const struct _TEM_fpga *fpgas) |
| Callback signature for BFM_opReport. More... | |
Enumerations | |
| enum | _BFM_opTarget { BFM_C_OP_TARGET_NONE = 0, BFM_C_OP_TARGET_TEMS = 1, BFM_C_OP_TARGET_FPGAS = 2 } |
| Enumerates to what target type an operation applies to. More... | |
Functions | |
| 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... | |
| 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_fpgasBistWrite (const BFM_dsc *bfm, unsigned int fpgasList, 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 fgpasList, 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 fgpasList, 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_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_temsFifosReset (const BFM_dsc *bfm, unsigned int temList) |
| Resets all the FIFOs on a TEM. More... | |
| const struct _TEM_tem * | BFM_tems (const BFM_dsc *bfm) |
| Returns a pointer to the TEM database. More... | |
| const struct _TEM_fpga * | BFM_fpgas (const BFM_dsc *bfm) |
| Returns a pointer to the FPGA database. 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... | |
| 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_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... | |
| 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 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... | |
| 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... | |
The general usage is to first pour information in information about the TEMS one is interested in via a BFM_describe and then get the TEMS ready by doing a BFM_initialize, which will load the FPGAs and put the registers in a known and consistent state. After these two steps one is free to change the state of the TEMs or just use the BFM query interfaces to learn about the current state of affairs.
|
|
Callback signature for BFM_opReport.
BFM_opReport reports on the status of requested operations. Instead of merely generating a The call signature is
status = (*reporter) (void *parameter,
int opId,
BFM_opTarget opTarget,
unsigned int successes,
unsigned int failures,
const struct _TEM_tem *tems,
const struct _TEM_fpga *fpags)
where
parameter: A user provided parameter passed transparently
through from the BFM_opReport call.
opId: The id of the operation, i.e. just which
operation is being reported on. The \a opId
can be translated to an ASCII name using
\c BFM_opnames(opId).
opTarget: Either BFM_C_OP_TARGET_TEM or BFM_C_OP_TARGET_FPGA,
indicating the target type of the operation.
This parameter indicates how to interpret the
\a successes and \a failures arguments, as being
relevant to an array of TEMs or and array of FPGAs.
successes: A list, expressed as a bit mask, indicating which
targets the operation was successful on.
failures: A list, expressed as a bit mask, indicating which
targets the operation was unsuccessful on.
tems: An array, indexed by TEM_C_xxx of structure
describing the TEMS.
fpgas: An array, indexed by TEM_C_FPGA_xxx, describing
the FPGAs.
The return code indicates whether one should stop (non-zero) or
continue through the remaining list of operations.
See BFM_opPrint for an usage example.
|
|
|
Enumerates to what target type an operation applies to.
Operations are generally directed at one of two target types, either TEMs or FPGAs. This enumeration clearly states the target type of any operation. It mainly used in the reporting BFM routines. |
|
||||||||||||||||||||||||||||
|
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.
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002