fdhwlib  2.0.25
hw4::Slt Class Reference

#include <slt.h>

Inheritance diagram for hw4::Slt:
hw4::SubrackBoard hw4::SubrackBoard hw4::SubrackBoard SubrackBoardBase SubrackBoardBase SubrackBoardBase hw4::SltAuger hw4::SltKatrin

List of all members.

Public Types

Public Member Functions

Public Attributes


Detailed Description

The class Slt provides the definition for the registers of the second level trigger board (SLT) of the version 4 electronics.

The names of the registers are choosen as found in the hardware description. For a systematic access to all registers without knowledge of the specific register structure the array regList is introduced. The array contains a list of all available registers.

Definition at line 64 of file slt.h.


Member Enumeration Documentation

Status of the electronic:

  • RUN No inhibit active, No Resets active, second strobe source = ext trigger source = int dead time enabled
  • CAL as RUN but dead time disabled
  • WAIT as RUN but all pages full active
  • STOP as RUN but ext or sw inhibit active
  • CERR DAQ configuration error
  • UNKOWN Other state
Enumerator:
RUN 
CAL 
WAIT 
STOP 
CERR 
UNKNOWN 
RUN 
CAL 
WAIT 
STOP 
CERR 
UNKNOWN 

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 195 of file sltkatrin.h.

Status of the electronic:

  • RUN No inhibit active, No Resets active, second strobe source = ext trigger source = int dead time enabled
  • CAL as RUN but dead time disabled
  • WAIT as RUN but all pages full active
  • STOP as RUN but ext or sw inhibit active
  • CERR DAQ configuration error
  • UNKOWN Other state
Enumerator:
RUN 
CAL 
WAIT 
STOP 
CERR 
UNKNOWN 
RUN 
CAL 
WAIT 
STOP 
CERR 
UNKNOWN 

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 195 of file sltusct.h.


Constructor & Destructor Documentation

hw4::Slt::Slt ( int  ID,
const char *  inifile = "FE.ini" 
)
virtual hw4::Slt::~Slt ( ) [virtual]
hw4::Slt::Slt ( int  ID,
const char *  inifile = "FE.ini" 
)
virtual hw4::Slt::~Slt ( ) [virtual]
hw4::Slt::Slt ( int  ID,
const char *  inifile = "FE.ini" 
)
virtual hw4::Slt::~Slt ( ) [virtual]

Member Function Documentation

int hw4::Slt::checkActualTime ( long int *  tDiff,
long int *  tDiffEye,
int *  tMeas,
int *  tPhase,
long int *  tDiffGps = 0,
int  id = 0,
int  n = 1,
const char *  gpsserver = "localhost",
int  gpsport = 0 
)

Compare the PC clock and the hardware clock of all connected telescopes.This function is an extension for more than one telescope connected in PBUS_IP mode.

Parameters:
tDiffThe difference t(Hardware) - t(MirrorPC) in seconds.
tDiffEyeThe difference t(MirrorPC) - t(EyePC) in seconds.
tMeasThe measurement point in ms relative to the last second strobe
tPhaseThe phase in ms between the GPS time of the hardware and the NTP time of the EyePC: t(Hardware) - t(EyePC) t is the time of the second strobe in each case.
tDiffGpsDifference of the gps clock Two values: oncode time and auger counter
idNumber of the telescope to test. 0 (default) is the actual telescope
nNumber of telescopes to analyse If n > 1 you need to provide a array for the first argument (tDiff).
gpsserverHostname of the gpsserver (default: localhost)
gpsportPort of the gpsserver (0 to use the default port)
Returns:
Status of the function. + 0 failed, > 0 success == number of miliseconds of the last test.

Reimplemented in hw4::SltAuger.

int hw4::Slt::checkActualTime ( long int *  tDiff,
long int *  tDiffEye,
int *  tMeas,
int *  tPhase,
long int *  tDiffGps = 0,
int  id = 0,
int  n = 1,
const char *  gpsserver = "localhost",
int  gpsport = 0 
)

Compare the PC clock and the hardware clock of all connected telescopes.This function is an extension for more than one telescope connected in PBUS_IP mode.

Parameters:
tDiffThe difference t(Hardware) - t(MirrorPC) in seconds.
tDiffEyeThe difference t(MirrorPC) - t(EyePC) in seconds.
tMeasThe measurement point in ms relative to the last second strobe
tPhaseThe phase in ms between the GPS time of the hardware and the NTP time of the EyePC: t(Hardware) - t(EyePC) t is the time of the second strobe in each case.
tDiffGpsDifference of the gps clock Two values: oncode time and auger counter
idNumber of the telescope to test. 0 (default) is the actual telescope
nNumber of telescopes to analyse If n > 1 you need to provide a array for the first argument (tDiff).
gpsserverHostname of the gpsserver (default: localhost)
gpsportPort of the gpsserver (0 to use the default port)
Returns:
Status of the function. + 0 failed, > 0 success == number of miliseconds of the last test.

Reimplemented in hw4::SltAuger.

int hw4::Slt::checkConfig ( )

Check hardware configuration.

Results:

  • 0 Ok
  • 1 Different board
  • 2 Firmware or documentation updated
  • 4 Wrong project
void hw4::Slt::checkDeadTime ( unsigned long long *  tDead,
unsigned long long *  tVeto,
double *  tRecord,
double *  tPageFull,
procDuration tMeas = 0 
)

Check the operation time of the crate.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

void hw4::Slt::checkDeadTime ( unsigned long long *  tDead,
unsigned long long *  tVeto,
double *  tRecord,
double *  tPageFull,
procDuration tMeas = 0 
)

Check the operation time of the crate.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

void hw4::Slt::checkHardwareModelVersion ( FILE *  fout = stdout,
const char *  indent = "" 
)

Check version of the Hardware model and the connected electronic.

void hw4::Slt::checkHardwareModelVersion ( FILE *  fout = stdout,
const char *  indent = "" 
)

Check version of the Hardware model and the connected electronic.

void hw4::Slt::checkHardwareModelVersion ( FILE *  fout = stdout,
const char *  indent = "" 
)

Check version of the Hardware model and the connected electronic.

bool hw4::Slt::checkPresence ( ) [virtual]

Check whether the board is responding and returns the correct slot id.

Reimplemented from SubrackBoardBase.

bool hw4::Slt::checkPresence ( ) [virtual]

Check whether the board is responding and returns the correct slot id.

Reimplemented from SubrackBoardBase.

bool hw4::Slt::checkPresence ( ) [virtual]

Check whether the board is responding and returns the correct slot id.

Reimplemented from SubrackBoardBase.

bool hw4::Slt::checkProject ( ) [virtual]

Check project number and FPGA design.

Reimplemented from SubrackBoardBase.

int hw4::Slt::checkTime ( double *  tDiff = 0,
int *  tSecErr = 0,
int *  tPhase = 0,
procDuration tPC = 0 
)

Check hardware and PC clock synchrony.

The approach used is faster than that implemented in checkActualTime(). It uses the subsecond counters to determine second error and phase between hardware and PC clock.

The function checks only the selected telescope.

return 0 Ok, -1 hardware not responding, bit 1 warning internal second strobe, bit 2 time error param tDiff Difference tHw - t PC [s] param tSecErr Second error tHw - t PC [s] param tPhase Offset between the second strobes in Hw and PC [us] param tPC Measurement intervall.

Reimplemented in hw4::SltAuger.

int hw4::Slt::checkTime ( double *  tDiff = 0,
int *  tSecErr = 0,
int *  tPhase = 0,
procDuration tPC = 0 
)

Check hardware and PC clock synchrony.

The approach used is faster than that implemented in checkActualTime(). It uses the subsecond counters to determine second error and phase between hardware and PC clock.

The function checks only the selected telescope.

return 0 Ok, -1 hardware not responding, bit 1 warning internal second strobe, bit 2 time error param tDiff Difference tHw - t PC [s] param tSecErr Second error tHw - t PC [s] param tPhase Offset between the second strobes in Hw and PC [us] param tPC Measurement intervall.

Reimplemented in hw4::SltAuger.

std::string hw4::Slt::convertTimeToText ( unsigned long long  time,
int  showSubSecs = 0 
)

Convert ded or veto times to a character string.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

std::string hw4::Slt::convertTimeToText ( unsigned long long  time,
int  showSubSecs = 0 
)

Convert ded or veto times to a character string.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

void hw4::Slt::convertToGPS ( SltTime time,
time_t  t_utc 
)

Convert to GPS time.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

void hw4::Slt::convertToGPS ( SltTime time,
time_t  t_utc 
)

Convert to GPS time.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

void hw4::Slt::convertToUTC ( time_t *  t_utc,
unsigned long  time 
)

Convert the Hardware second counter the the format used by the PC (UTC time started at 1.1.1970)

Parameters:
t_utcSecond counter in UTC format
timeTime in Hardware format

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

void hw4::Slt::convertToUTC ( time_t *  t_utc,
unsigned long  time 
)

Convert the Hardware second counter the the format used by the PC (UTC time started at 1.1.1970)

Parameters:
t_utcSecond counter in UTC format
timeTime in Hardware format

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

void hw4::Slt::convertToUTC ( time_t *  t_utc,
SltTime  time 
)

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

void hw4::Slt::convertToUTC ( time_t *  t_utc,
SltTime  time 
)

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

void hw4::Slt::getActivePages ( int  time,
int *  pages,
int *  continous 
)

Get the number of active and the fraction of continously trigger pages in a given interval.

Parameters:
timeAge of the considered pages in seconds (0 all time)
pagesPointer to the number of active pages
continousPointer to the number of continuous triggered pages

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

void hw4::Slt::getActivePages ( int  time,
int *  pages,
int *  continous 
)

Get the number of active and the fraction of continously trigger pages in a given interval.

Parameters:
timeAge of the considered pages in seconds (0 all time)
pagesPointer to the number of active pages
continousPointer to the number of continuous triggered pages

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

void hw4::Slt::getActualTime ( SltTime time)

Get the actual time of the system.

Note: The system runs with GPS time. The GPS second count differs from the UNIX System time by about 10 years.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

void hw4::Slt::getActualTime ( SltTime time)

Get the actual time of the system.

Note: The system runs with GPS time. The GPS second count differs from the UNIX System time by about 10 years.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

int hw4::Slt::getHardwareModelVersion ( )

Give the version of the used harware model.

The version of the model and the implemented register model of the connected electronic have to fit together.

Returns:
The version number is given multiplied times 100.
int hw4::Slt::getHardwareModelVersion ( )

Give the version of the used harware model.

The version of the model and the implemented register model of the connected electronic have to fit together.

Returns:
The version number is given multiplied times 100.
int hw4::Slt::getHardwareModelVersion ( )

Give the version of the used harware model.

The version of the model and the implemented register model of the connected electronic have to fit together.

Returns:
The version number is given multiplied times 100.
RunMode hw4::Slt::getRunMode ( )

Get System state.

The system state is defined by the configuration of the signal sources and the level of the signals.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

RunMode hw4::Slt::getRunMode ( )

Get System state.

The system state is defined by the configuration of the signal sources and the level of the signals.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

std::string hw4::Slt::getRunModeText ( )

Give text output for the run modes.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

std::string hw4::Slt::getRunModeText ( )

Give text output for the run modes.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

std::string hw4::Slt::getRunModeText ( RunMode  mode)

Reimplemented in hw4::SltKatrin.

std::string hw4::Slt::getRunModeText ( RunMode  mode)

Reimplemented in hw4::SltKatrin.

int hw4::Slt::getVersion ( int  unit = 0) [virtual]

Read the version of the FPGA design.

Reimplemented from SubrackBoardBase.

int hw4::Slt::getVersion ( int  unit = 0) [virtual]

Read the version of the FPGA design.

Reimplemented from SubrackBoardBase.

int hw4::Slt::getVersion ( int  unit = 0) [virtual]

Read the version of the FPGA design.

Reimplemented from SubrackBoardBase.

void hw4::Slt::printConfigToInifile ( FILE *  fout)

Print Slt configuration in inifile format.

void hw4::Slt::printExpectedConfig ( FILE *  fout)

Print the expected hardware configuration.

int hw4::Slt::readDeadTime ( unsigned long long *  tDead,
unsigned long long *  tVeto,
unsigned long long *  tInhibit 
)

Read dead and veto times Calculate the inhibit time by substracting both.

The inhibit time is only valid if the function returns zero.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

int hw4::Slt::readDeadTime ( unsigned long long *  tDead,
unsigned long long *  tVeto,
unsigned long long *  tInhibit 
)

Read dead and veto times Calculate the inhibit time by substracting both.

The inhibit time is only valid if the function returns zero.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

int hw4::Slt::readExpectedConfig ( akInifile config)

Read expected hardware configuration from inifile.

unsigned long hw4::Slt::setActualTime ( )

Synchronize the actual time of the system with the local PC clock.

To set the correct value of the second, the function waits 300ms after the next second change. Then the UTC second counter ist converted to GPS seconds second counter is written. The hardware will set this value with the next second strobe. Finally the function checks, whether it was possible to finish the operation within one second.

Returns:
The second since beginning of GPS time when the crate was synchronized. A value of zero indicates that the setting failed. Repeat the function.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

unsigned long hw4::Slt::setActualTime ( )

Synchronize the actual time of the system with the local PC clock.

To set the correct value of the second, the function waits 300ms after the next second change. Then the UTC second counter ist converted to GPS seconds second counter is written. The hardware will set this value with the next second strobe. Finally the function checks, whether it was possible to finish the operation within one second.

Returns:
The second since beginning of GPS time when the crate was synchronized. A value of zero indicates that the setting failed. Repeat the function.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.


Member Data Documentation

Reimplemented in hw4::SltAuger.

Definition at line 395 of file sltkatrin.h.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 313 of file sltkatrin.h.

Identification of the board.

Definition at line 127 of file slt.h.

Reimplemented in hw4::SltAuger.

Definition at line 361 of file sltkatrin.h.

Command register.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 265 of file sltkatrin.h.

Control register.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 259 of file sltkatrin.h.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 397 of file sltkatrin.h.

Interval of the dead time checks.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 402 of file sltkatrin.h.

unsigned long long Slt::deadStart

Dead time counter at start in interval.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 405 of file sltkatrin.h.

Counter for the dead-time.

Use the command reset dead-time to reset the counter before starting the data aquisition run.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 305 of file sltkatrin.h.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 315 of file sltkatrin.h.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 378 of file sltkatrin.h.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 376 of file sltkatrin.h.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 371 of file sltkatrin.h.

Reimplemented in hw4::SltAuger.

Definition at line 355 of file sltkatrin.h.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 369 of file sltkatrin.h.

The register contains the interrupt mask.

High bits will disable the interrupt and low bits will enable it.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 270 of file sltkatrin.h.

The register gives the actual interrupt status of the SLT board.

After the interrupt acknowledge cycle the register is cleared.

Name in Slt fpga documentation: Interrupt Request

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 279 of file sltkatrin.h.

Reimplemented in hw4::SltAuger.

Definition at line 385 of file sltkatrin.h.

Timing and trigger information of the recorded events.

Defines the number of active registers in the page numbers list This register will contain always 64 unless some registers should be taken out of operation.

Reimplemented in hw4::SltAuger.

Definition at line 351 of file sltkatrin.h.

Status register of the page controller.

Reimplemented in hw4::SltAuger.

Definition at line 334 of file sltkatrin.h.

Reimplemented in hw4::SltAuger.

Definition at line 353 of file sltkatrin.h.

Page select register.

Reimplemented in hw4::SltAuger.

Definition at line 343 of file sltkatrin.h.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 309 of file sltkatrin.h.

Check of the pixel bus connection.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 293 of file sltkatrin.h.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 311 of file sltkatrin.h.

Reimplemented in hw4::SltAuger.

Definition at line 383 of file sltkatrin.h.

Reimplemented in hw4::SltAuger.

Definition at line 357 of file sltkatrin.h.

Reimplemented in hw4::SltAuger.

Definition at line 363 of file sltkatrin.h.

Reimplemented in hw4::SltAuger.

Definition at line 359 of file sltkatrin.h.

List of three hardware semaphores to synchronize the hardware access independant from software means.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 283 of file sltkatrin.h.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 307 of file sltkatrin.h.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 328 of file sltkatrin.h.

Expected configuration.

Definition at line 130 of file slt.h.

Set Slt second count.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 325 of file sltkatrin.h.

Reimplemented in hw4::SltAuger.

Definition at line 387 of file sltkatrin.h.

Status register.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 262 of file sltkatrin.h.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 331 of file sltkatrin.h.

Definition at line 117 of file slt.h.

Definition at line 255 of file sltkatrin.h.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 367 of file sltkatrin.h.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 365 of file sltkatrin.h.

Coincidence time T1 [100ns].

The system will generate a next page signal T1 * 100ns after a trigger is detected.

Reimplemented in hw4::SltAuger.

Definition at line 340 of file sltkatrin.h.

Reimplemented in hw4::SltAuger.

Definition at line 391 of file sltkatrin.h.

Reimplemented in hw4::SltAuger.

Definition at line 389 of file sltkatrin.h.

Reimplemented in hw4::SltAuger.

Definition at line 393 of file sltkatrin.h.

Control and status register for additional usct functions.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 318 of file sltkatrin.h.

Additional register for usct functions.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 321 of file sltkatrin.h.

uint32_t hw4::Slt::vdoc

Definition at line 132 of file slt.h.

The version is given by a 16 bit integer.

The number has to be divided by 100 to get the actual version. (Example: The number 104 means version 1.04)

Definition at line 124 of file slt.h.

unsigned long long Slt::vetoStart

Veto counter at start of interval.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 408 of file sltkatrin.h.

Counter for the veto-time.

Use the command reset dead-time to reset the counter before starting the data aquisition run.

Reimplemented in hw4::SltKatrin, and hw4::SltAuger.

Definition at line 299 of file sltkatrin.h.

uint32_t hw4::Slt::vfpga

Definition at line 131 of file slt.h.

Definition at line 133 of file slt.h.


The documentation for this class was generated from the following files: