16 addMapping(
MPCNT, 1, &
m_main_period_counter,
"",
true,
true, NULL, 0,
false,
false, fault_mode);
17 addMapping(
MPLIM, 1, &
m_main_period_limit,
"",
true,
true, NULL, 0,
false,
false, fault_mode);
18 addMapping(
PSCNT, 1, &
m_main_period_sequence_counter,
"",
true,
true, NULL, 0,
false,
false, fault_mode);
19 addMapping(
EXTTRIGVC0, 1, &
m_extract_vc_low,
"",
true,
true, NULL, 0,
false,
false, fault_mode);
20 addMapping(
EXTTRIGVC1, 1, &
m_extract_vc_high,
"",
true,
true, NULL, 0,
false,
false, fault_mode);
21 addMapping(
LOOKTAR, 1, &
m_lookup,
"",
true,
true, NULL, 0,
false,
false, fault_mode);
22 addMapping(
PCREG, 1, &
m_period_control,
"",
true,
true, NULL, 0,
false,
false, fault_mode);
23 addMapping(
PERLUTSTART,
PERLUTSIZE,
m_perlut,
"perlut",
true,
true, &
m_lookup,
TARPERLUT,
false,
false, fault_mode);
24 addMapping(
OUTLUTSTART,
OUTLUTSIZE,
m_outlut,
"outlut",
true,
true, &
m_lookup,
TAROUTLUT,
false,
false, fault_mode);
25 addMapping(
RFCNT0START,
RFCNT0SIZE,
m_rawframes,
"raw frames",
true,
true, NULL, 0,
false,
false, fault_mode);
26 addMapping(
GFCNT0START,
GFCNT0SIZE,
m_goodframes,
"good frames",
true,
true, NULL, 0,
false,
false, fault_mode);
28 addMapping(
MAT_1, 1, &
m_mat_counter,
"",
true,
true, NULL, 0,
false,
false, fault_mode);
37 os <<
"SIMPeriod card at position " <<
m_position;
69 int frame_incr = delay / 20;
70 int proton_incr = (int)( 180.0 * (
double)delay / (1000.0 * 3600.0 * 1.738e-6) ) ;
92 int current_period, max_period, max_frames;
96 max_frames = 1 + (
m_perlut[current_period] & 0xffff);
120 if (current_period < max_period)
124 ((
m_perlut[current_period] & 0x80000000) >> 17);
125 if (!(
m_perlut[current_period] & 0x80000000))
140 ((
m_perlut[current_period] & 0x80000000) >> 17);
virtual void simulate(int delay)
static void increment2(int value, isisU32_t &low, isisU32_t &high)
isisU32_t m_main_period_sequence_counter
virtual void updateCardAfterWrite(DAEstatus &status)
isisU32_t m_main_period_counter
virtual void printStatus(std::ostream &os)
isisU32_t m_extract_vc_low
virtual int resetDetectorCardPeriod()=0
int addMapping(ISISVME::TransferProps props, isisU32_t address, int n, isisU32_t *var, const char *name, bool readable, bool writable, isisU32_t *access_reg, unsigned access_bit, bool wrap, bool sixteen_bit_access, FaultMode fault_mode)
static void increment(int value, isisU32_t &low)
virtual int incrementDetectorCardPeriod()=0
VMESimulationIface * m_vme
isisU32_t m_period_control
isisU32_t m_main_period_limit
virtual void updateCardAfterRead(DAEstatus &status)
SIMPeriodCard(int position, VMESimulation *vme, FaultMode fault_mode, DAEstatus &status)
isisU32_t m_extract_vc_high