Using AMC13Tool
Using the tool at P5:
ssh cmsusr0
ssh hcaldaq12
source /nfshome0/hcalsw/bin/env.sh (or .csh)
AMC13Tool.exe
Pick an action (h for menu): fv
Virtex Firmware Version: 0x20
Spartan Firmware Version: 0xf
Using the tool on an ownsorced teststand (at Boston University):
- e.g. 11_5_3:
cd ${HOME}/src/11_5_3/hcal/hcalUpgrade/amc13
source ~daqowner/dist/etc/env.sh
source environ.sh
./bin/linux/x86_64_slc5/AMC13Tool.exe
Pick an action (h for menu): fv
Virtex Firmware Version: 0x20
Spartan Firmware Version: 0xf
Important Notes
- Address Tables are looked for in two locations:
${pwd}
and ./map
. If they are not found there, then the XDAQ_ROOT
AMC13 Address Tables are used, and these may not be up-to-date with the most current software (if one has update their source tree from CVS since the release)
- As of 11_5_3, the most current Tool lives at
11_5_3/hcal/hcalUpgrade/amc13/bin/linux/x86_64_slc5/AMC13Tool.exe
Functionality
General
-
'q'
: quit program
-
'do <file>'
: execute an AMC13Tool command script
-
'sh <command>'
: execute a shell <command>
Run Control
-
'i <ena_list> (d) (f) (t) (b)'
: enable AMC13
-
'<ena_list>'
is the comma/space/hyphen separated list of AMC inputs to be enabled (of ports 0-11)
-
'd'
is an optional flag to enable the 'DAQLink' bit on register 'CONTROL1' (address 0x1)
-
'f'
is an optional flag to enable the 'Fake Data Generation' bit on register 'CONTROL1' (address 0x1)
-
't'
is an optional flag to enable the 'TTCRx Commands' bit on register 'CONTROL1' (address 0x1)
-
'b'
is an optional flag to enable the 'Stop EVB when Monitor Buffer Full' bit on register 'CONTROL1' (address 0x1)
- NOTE:
'en'
is a synonym to 'i'
- e.g.
Pick an action (h for menu): en 1,2 4-7 d t
Enabling AMC inputs from list: 1, 2, 4, 5, 6, 7
Link status: 000000f6
Enable DAQ Link
Enable TTCrx Commands
'CONTROL1': 00140023
-
'lt <n>/(e)/(d)'
: send local L1As
-
'<n>'
is the number of 'single'/random triggers to be sent
-
'e'
enables periodic local triggers
-
'd'
disables periodic local triggers
-
'tsp (o)/(b)/(r) <n>'
: set the spacing between periodic local L1A generation
-
'o'
specifies that the trigger spacing will be defined by orbit-number increments of <n>
-
'b'
specifies that the trigger spacing will be defined by bunch-crossing-number increments of <n>
-
'r'
specifies that the trigger spacing will be defined by random orbit-number increments around value <n>
-
'<n>'
is the number of orbits/bunch-crossings/average-orbits between each periodically generated local L1A
-
'mm (e)/(d)'
: enable mega monitor scaling. This saves only saves one in every 0x100000 events to the SDRAM buffer
-
'e'
enables mega monitor scaling
-
'd'
disables mega monitor scaling
-
'st <level>'
: displays the status of the AMC13 registers and counters
-
'<level>'
is an optional numeric entry to set the detail of the display (0 least detailed, 2 most detailed, default to 1)
-
'lst'
: displays the status of the SFP connections and DAQ Link
-
'rg'
: issues a reset to both Spartan and Virtex chips (by writing 0x1 to address 0x0 on both chips)
-
'rc'
: resets the counters on the Virtex chip
-
'tre (o) (e)'
: reset internal TTC orbit number and/or event number
-
'o'
resets internal TTC orbit number
-
'e'
resets internal TTC event number
Register Access
-
'rs(v) <add> [count]'
: read registers from the Spartan (Virtex) chip
-
'brs(v) <add> [count]'
: block read Spartan (Virtex) chip
-
'<add>'
is the starting address of the block read
-
'[count]'
is the number of addresses to be read from the block (default to 1)
-
'frs(v) <add> [count]'
: FIFO read from the Spartan (Virtex) chip
-
'<add>'
is the address to be FIFO read
-
'[count]'
is the number of reads to be carried out at <add>
(default to 1)
-
'ws(v) <add> <data> [count]'
: write to Spartan (Virtex) chip
-
'<add>'
is the starting address to be written to
-
'<data>'
is the data to be written
-
'[count]'
is the number of addresses to be written to incrementally from '=<add>'= (default to 1)
-
'bws(v) <add> [<data_list>]'
: block write a data list to Spartan (Virtex)
-
'qws(v) <add> [<data_list>]'
: queued write to Spartan (Virtex) chip
-
'fws(v) <add> [<data_list>]'
: FIFO write to Spartan (Virtex) chip
DAQ
-
'de'
: enable DAQ link. This can be done from the receiver end only! However, it does enable both the LSC and LDC functionalities on either side of the DAQ Link
-
'dsv (e)/(d)'
: enable or disable the saveing received DAQ data to the monitor buffer. This can be done from the receiver end only!
-
'(e)'
enables the saving of DAQ Link received data to the SDRAM buffer
-
'(d)'
disabled the saving of DAQ Link received data to the SDRAM buffer
-
'nw'
: display number of words in the next event in the SDRAM buffer
-
'rd'
: display the data of the current event in the SDRAM buffer without advancing to the next event (without advancing the read pointer)
-
'rk'
: display an unpacked, checked event. NOTE: this command doesn't do much yet
-
'ne'
: advance to the next event in the buffer (advances the read pointer)
-
'df <file> (c) (r) (v) [count]'
: dump a given number of events to a file
-
'<file>'
is the name of the file to which the data will be written [required]
-
'(c)'
enables continuous reading [optional]
- if enabled, the program waits for the next event when it reaches the end of the buffer (when there are no more events to be read out)
- if disabled, the read finishes when the end of the buffer is reached
- careful: if you ^C out of a continuous read, then the data will not be written to a file. You must let the process finish. A better way to handle this is a coming attraction. For now, thoughtfully specify the number of events you want to read.
-
'(r)'
enables reduced reading [optional]
- if enabled, only the EvN, BcN, and OrN will be read, and they will be written to the file in a '.csv' format
- if disabled, the entire event will be written to the file in a binary format
-
'(v)'
enables verbose mode [optional]
- if enabled, the program will produce standard output for every event written to the file (for meticulous debugging only)
- if disabled, the program will produce standard output for every 1000 events written to the file (recommended)
-
'[count]'
is the number of events to read out [optional]
- if not specified...
- if
'c'
is enabled, 1,000,000 events will be read out by default
- if
'c'
is not enabled, 2048 events (the size of the buffer) will be read out be default
-
'dft <file> (r)'
send a given number of triggers and reads them to a file [Boston University ONLY]
-
'<file>'
is the name of the file to which the data will be written [required]
-
'(r)'
enables reduced reading [optional]
- if enabled, only the EvN, BcN, and OrN will be read, and they will be written to the file in a '.csv' format
- if disabled, the entire event will be written to the file in a binary format
Flash
-
'fv'
: display both Virtex and Spartan firmware versions
-
'rf <add>'
: read one page (256 bytes) from Flash Memory
-
'<add>'
is the flash address from which to read
-
'vfh'
: verify Flash Header, flash address 0x000000
-
'vbs'
: verify Golden Flash, flash address 0x100000
-
'vs(v)'
: verify Spartan (Virtex) Flash, flash address 0x200000 (0x400000)
-
'pfh'
: program flash header, flash address 0x00000
-
'pbs'
: program Golden Flash, flash address 0x100000
-
'ps(v)'
: program Spartan (Virtex) Flash, flash address 0x200000 (0x400000)
-
'L'
: load Spartan and Virtex chips from Flash Memory
uHTRs and other IP Devices
-
'ipadd <ip_addr>'
: add IP device to list of IP devices (which is initially empty). List of devices starts at 0!
-
'<ip_addr>'
is the ip address of the device to be added
-
'ipr <n> <addr>'
: read from an IP device
-
'<n>'
is the device number in the list of IP devices created by 'ipadd'
. List of devices starts at 0!
-
'<addr>'
is the address to be read from the specified IP device
-
'ipw <n> <addr> <data>'
: write to an IP device
-
'<n>'
is the device number in the list of IP devices created by 'ipadd'
. List of devices starts at 0!
-
'<addr>'
is the address to be written to on the specified IP device
-
'<data>'
is the data to be written
-
'ipst'
: display the status of all uHTRs whose IP addresses are have been added via 'ipadd'
-- Main. Charlie Hill - 17 Sept 2012