NSCL DDAS
1.0
Support for XIA DDAS at the NSCL
|
This section documents three programs: toxml, tocrate and tosetfile
For more on the XML file format see: XML used to describe DSP settings.
toxml can take settings from XIA setfiles and from live modules and writes them to XML files. The advantage of XML files is that they store settings in meaningful units of measure while Set files and the module, internally, store settings in module type dependent units.
Here is the Help text for the toxml program:
ToXml 1.0
Usage: ToXml [OPTIONS]...
-h, --help Print help and exit -V, --version Print version and exit -s, --source=ENUM Where the data to write the XML comes from (possible values="setfile", "modules") -c, --crate=STRING XML Crate file that describes where module data are written -f, --file=STRING Setfile with the data (valid only if --source=setfile) -m, --msps=STRING Only used with setfile: speeds of the modules form slot:MHz
$DDAS_BIN/toxml --source=modules --crate=crate.xml
This example takes settings from the slots described in crate.xml and rewrites both crate.xml and the module settings file specified by the slot tags in it.
$DDAS_BIN/toxml --source=setfile --crate=crate.xml --file=crate_1.set \ --msps=2:500 --msps=5:100
Converts a set file (crate_1.set) into XML. The slots converted are defined by the slot gats in crate.xml, which also says where the module parameter XML files are written. Slot 2 is defined to be a 500MHz module and slot 5 a 100MHz module. All other modules are 250MHz (the default speed).
tocrate takes either XML or setfile data and loads the parameters in those files to the digitizers in specified slots. Optionally, slots can be fully booted. Here's the help text for tocrate:
tocrate 1.0
Usage: tocrate [OPTIONS]...
-h, --help Print help and exit -V, --version Print version and exit -s, --source=ENUM Where the data to load modules comes from (possible values="setfile", "xml") -f, --file=STRING Set file or XML crate file depending on source -b, --fullboot Perform a full boot of te modules before loading them (default=on) -c, --crate=SHORT ID of crate - only use this if source=setfile -S, --slot=INT A slot to load - use as many times as there are slots -m, --msps=STRING Speed specification of a digitizer (slot:mhz) default is 250MHz
Here are some examples:
$DDAS_BIN/tocrate --source=xml --file=crate.xml
The slots described in crate.xml are loaded with the parameters in module XML files pointed to by their slot tags. The modules are assumed to already have their firmware loaded and running. adding the–fullboot flag to this line will boot each module prior to loading it.
$DDAS_BIN/tocrate --source=setfile --file=crate_1.set --crate=0 \ --slot=2 --slot=3 --slot=4 --slot=5 --slot=6 \ --msps=2:500 --msps=5:100 --fullboot
Loads slots 2-6 from the setfile crate_1.set. Slot 2 is specified to be 500MHz, slot 5 is specified to be 100Mhz, and all other modules are 250MHz. All modules are fully booted before being loaded.
Note that when the setfile was written, there must have been a 500Mhz module in slot2, a 100Mhz module in slot 5 and 250MHz modules in slots 3,4,6.
The load will require about 20 seconds per module regardless of the source type. This is due to the time required to call Pixie16WriteSglModPar and Pixie16WriteSglChanPar for each parameter that must be loaded.
As we've seen tocrate, run directly from an XML file takes approximately 20 seconds per module to load the configuration. For large systems, this can try the user's patience. Therefore, the program tosetfile was written to convert an XML crate specification into a setfile that can be loaded more rapidly.
Here's the help text for tosetfile:
ToSetfile 1.0
Usage: ToSetfile [OPTIONS]...
-h, --help Print help and exit -V, --version Print version and exit -x, --xml=STRING Path to XML Crate definition file -s, --setfile=STRING Path to output Set file -m, --msps=STRING Slot speeds each in the form slot:speed defaults are 250MHz
As with all of these utilities, the default module speed is 250MHz. You can override this on a per slot basis by specifying the–msps option one or more times. The value of this option is a string of the form slot:MHz where slot is the crate slot number and MHz the speed of the module in megahertz. Here's an example:
$DDAS_BIN/tosetfile --xml=crate.xml --setfile=crate.set --msps=2:500
This translates the XML crate specification rooted in crate.xml to a setfile named crate.set. Slot 2 will be a digitizer that runs at 500MHz. All other digitizers default to 250MHz..