6 #define MAX_NUM_PERIODS (16*1024) // should be same of OUTLUT and PERLUT sizes
10 #define MPCNT 0x60 // main period (DAQ + Dwell) counter (14 bit, RO) also has dwell flag
11 #define MPLIM 0x64 // main period (DAQ + Dwell) limit register (14 bit, RW)
12 #define PSCNT 0x68 // period sequence counter (16 bit, RO)
13 #define PSLR 0x6c // period sequence limit register (16 bit, RW)
14 #define EXTTRIGVC0 0x70 // extraft trigger veto count low (16 bit, RO)
15 #define EXTTRIGVC1 0x74 // extract trigger veto count high (16 bit, RO)
16 #define I50HZVC0 0x78 // isis not at 50Hz veto count low (16 bit, RO)
17 #define I50HZVC1 0x7C // isis not at 50Hz veto count high (16 bit, RO)
18 #define EXTPTRANVC0 0x80 // external period transition veto counter low (16 bit, RO)
19 #define EXTPTRANVC1 0x84 // external period transition veto counter high (16 bit, RO)
20 #define LOOKTAR 0x40000 // lookup table access register (4bit, RW) - see below
21 #define PCREG 0x40088 // period control register (16 bit, RW) - see below
22 #define EXTPERREG 0x4008c // external periods register (16bit, RW) - see below
23 #define FWVERREG 0x7fffc // firmware version regiuster (32 bit, RW)
24 #define PERLUTSTART 0x80000 // period lookup table (16k x 32 bit RW)
25 #define PERLUTSIZE (16*1024) //
26 #define PERLUTEND (PERLUTSTART + 4*PERLUTSIZE)
28 #define OUTLUTSTART 0xc0000 // period switching output lookup table (16k x 16 bit RW)
29 #define OUTLUTSIZE (16*1024) //
30 #define OUTLUTEND (OUTLUTSTART + 4*OUTLUTSIZE)
31 #define RFCNT0START 0x100000 // raw frame counters(16k x 32 bit, RW) in counts0
32 #define RFCNT0SIZE (16*1024)
33 #define GFCNT0START 0x110000 // good frame counters(16k x 32 bit, RW) in counts0
34 #define GFCNT0SIZE (16*1024)
35 #define RPCNT0START 0x120000 // raw frame counters(16k x 32 bit, RW) in counts0
36 #define RFCNT0SIZE (16*1024)
37 #define GPCNT0START 0x130000 // good frame counters(16k x 32 bit, RW) in counts0
38 #define GFCNT0SIZE (16*1024)
42 #define TARPERLUT (1 << 0) // access PERLUT enable bit, RW
43 #define TAROUTLUT (1 << 1) // access OUTLUT enable bit, RW
44 #define TARCNT0 (1 << 2) // access Counts0 enable bit, RW
45 #define TARBCT1 (1 << 3) // access Counts1 enable bit, RW
49 #define PCENDAFTER (1 << 1) // end run after period sequence completes control bit (RW)
50 #define PCSEQCOMP (1 << 2) // period sequence complete monitor bit (RO)
51 #define PCENDSEQCOMP (1 << 3) // run ended and period sequence complete monitor bit (RO)
52 #define PCENAB (1 << 4) // normal/period mode enable (RW)
53 #define PCEXTENAB (1 << 5) // internal/external periods control mode enable (RW)
54 #define PCMULENAB (1 << 6) // single/multi period sequence control mode enable (RW)
55 #define PCMULCOMP (1 << 7) // multiple period sequence completed monitor bit (RO)
56 #define PCEXTPERCLK (1 << 8) // internal/external period clock mode enable (RW)
57 #define PC50HZENAB (1 << 9) // isis not at 50 Hz veto enable (RW)
58 #define PCEXTTRIG (1 << 10) // extract trigger veto enable (RW)
59 #define PCCLRVETO (1 << 12) // clear veto counters (RW)
60 #define PCCLRPC (1 << 13) // clear period counters (RW)
61 #define PCRESET (1 << 15) // period card reset control bit(RW)
64 #define PERLUTTYPE (1 << 31) // bit of perlut used to decide if dwell or daq period
int setMultiplePeriodSequenceMode(DAEstatus &status)
int lookupAccessOUTLUT(DAEstatus &status)
int startDataCollection(DAEstatus &status)
int setPeriodControlBits(isisU32_t mask, bool preserve, DAEstatus &status)
int setInternalPeriodControlMode(DAEstatus &status)
int getExtractTriggerVetoCount(isisU32_t *value, DAEstatus &status)
int getCurrentPeriodSequence(DAEstatus &status)
int programPERLUT(isisU16_t *dwell_flags, isisU16_t *frames, int nperiod, DAEstatus &status)
int enableExtractTriggerVeto(DAEstatus &status)
int readPERLUT(isisU16_t *dwell_flags, isisU16_t *frames, int nperiod, DAEstatus &status)
int endRunAfterSequenceCompletes(DAEstatus &status)
int lookupAccessPERLUT(DAEstatus &status)
int setSinglePeriodSequenceMode(DAEstatus &status)
int getNumberOfPeriods(DAEstatus &status)
int stopDataCollection(DAEstatus &status)
int disable50HzVeto(DAEstatus &status)
int disableExtractTriggerVeto(DAEstatus &status)
int zeroPeriodFrameCounters(DAEstatus &status)
int getPeriodGoodFrames(int period, isisU32_t *frames, DAEstatus &status)
void abortSequenceCompleteWait(DAEstatus &status)
int enablePeriodMode(DAEstatus &status)
int readOUTLUT(isisU32_t *outputs, int nperiod, DAEstatus &status)
int setAndClearPeriodControlBits(isisU32_t mask, bool preserve, DAEstatus &status)
int clearVetoCounters(DAEstatus &status)
PeriodCard(int position, ISISVME *vme, DAEstatus &status)
int enable50HzVeto(DAEstatus &status)
int getPeriodRawFrames(int period, isisU32_t *frames, DAEstatus &status)
int clearPeriodControlBits(isisU32_t mask, DAEstatus &status)
int disablePeriodMode(DAEstatus &status)
void printStatus(std::ostream &os, DAEstatus &status)
int getExtractTriggerVetoCountHigh(isisU16_t *value, DAEstatus &status)
int lookupFinished(DAEstatus &status)
int getRawFrames(int period_start, int nperiod, isisU32_t frames[], DAEstatus &status)
int getGoodFrames(int period_start, int nperiod, isisU32_t frames[], DAEstatus &status)
int setNumberOfPeriods(isisU16_t n, DAEstatus &status)
bool isRunEndedAndSequenceComplete(DAEstatus &status)
int clearPeriodCounters(DAEstatus &status)
int setExternalPeriodClockMode(DAEstatus &status)
bool inDwellPeriod(DAEstatus &status)
int programOUTLUT(isisU32_t *outputs, int nperiod, DAEstatus &status)
int resetCard(DAEstatus &status)
int getPeriodRequestedFrames(int period, isisU32_t *frames, DAEstatus &status)
int getExtractTriggerVetoCountLow(isisU16_t *value, DAEstatus &status)
int getCurrentPeriodNumber(DAEstatus &status)
int setExternalPeriodControlMode(DAEstatus &status)
int getRequestedFrames(int period_start, int nperiod, isisU32_t frames[], DAEstatus &status)
int setInternalPeriodClockMode(DAEstatus &status)