PZ-TIO Manual
Version 1.01
© 2022 XIA LLC
21
4 API functions
4.1 progfippi
Functions performed
-
Parse .ini file, extract FPGA parameters
-
Convert into “FPGA units”, e.g. number of samples instead of us (where necessary)
-
Apply limits and dependencies, if not ok, give feedback and abort
-
Read data from PROM and verify the current version of the PZ-TIO hardware is supported
by the software
-
Write to FPGA registers to apply settings
-
Toggle I2C lines to read PZ-TIO information from PROM.
Arguments
: fixed to “settings.ini”
Output
: Errors for bad settings, prints hardware info from PROM and temperatures
Restrictions
: Do not execute during a data acquisition
4.2 runstats, cgistats
These functions are used to read and output the I/O and output registers in the PL. runstats writes
them to a local file RS.csv. cgistats prints them as a webpage to std out, which can be piped into
the webserver; this is displayed as the “Status” webpage. These functions can be used for
development, setup, and diagnostics, for example the run statistics include module revision and
serial number, temperature, counters for pulses on the input, etc.
Status registers can also be read and written to the file RS.csv by “data acquisition” monitoring
routines. During a data acquisition, users should not execute runstats and cgistats (i.e. do not load
webpage “Current status” = cgistats.cgi) to avoid conflicting access to the run status registers and
possible delays and dead times. Instead monitor the file RS.csv (i.e. load webpage “Status File”=
rspage.html)
Functions performed
-
Read Runstats registers in PL
-
Read I2C info from PROM
-
write to file
Arguments
: none
Output
: RS.csv
Restrictions
: Do not execute during a data acquisition
Notes
: The cgi program requires presence of the web page template rspage.html in the same folder.