Tags:
view all tags
AMC13Tool2 is a command-line utility designed to exercise all functions of the AMC13. The tool can be run in either interactive or scripted mode. %TOC% ---++ Usage: =AMC13Tool2.exe [-p <string>] [-X <string>] [-i <string>] ... [-c <string>] ... [--] [--version] [-h]= | *Argument* | *Type* | *Notes* | | -p, --path | path | path to address table files (if not using connection file) | | -X, --script | string | name of script file to execute | | -c, --connect | file name or ip address | connection file name or ip address (may be repeated for multiple AMC13) | | -i, --id | string | connection file ID prefix (requires connection file too) | ---+++ Startup The tool make be started with no command-line options, in which case it will immediately enter interactive mode without establishing communication with any AMC13. Typically the first interactive command would then be "connect" to attach an AMC13. ---++++ Specifying AMC13 Modules #ModuleId Use the *-c* argument to specify AMC13 modules to communicate with. *IP Address* The argument after *-c* may be a numeric I/P address, in the standard form e.g. =192.168.1.120=. To specify the control hub protocol, append */c* e.g. =192.168.1.120/c=. _Specify the T2 board (lower) IP address._ The tool will automatically connect to the address specified + 1 for T1. If you specify an IP address, you must also tell the tool where to find the IPBus address tables. You can either set the environment variable =AMC13_ADDRESS_TABLE_PATH= or use the *-p* option on the command line to do this. The path must be the name of a directory containing the two files *AMC13_T1.xml* and *AMC13_T2.xml*. (In the standard source distribution these are symlinks in the directory =...amc13/etc/amc35= below the top level. In the RPM distribution they are in =/opt/cactus/etc/amc13=). *Connection File* Alternatively you may specify the name of a connection file. See [[https://svnweb.cern.ch/trac/cactus/wiki/uhalQuickTutorial#CreatingaConnectionFile][Cactus Tutorial]] for details. If you specify a connection file, by default it must contain the entries with ID *T1* and *T2* for one AMC13. If you have multiple ID in the same file, name them with different prefixes and pairs ending in *.T1* and *.T2*. Then specify the ID prefix with the *-i* command-line argument. ---++++ Running Scripts A script file may be created with a list of *AMC13Tool2* commands. A script may be executed in two ways: 1. By specifying the file name after *-X* (note capitol X) on the command line 1. By executing the command =include <file_name>= in interactive mode or from within another script After executing a script the tool will normally return to interactive mode. If you wish the tool to exit (e.g. so you can run scripts from within a shell script) just terminate the script with the command *quit*. ---+++ Interactive Mode The tool will enter interactive mode after executing any scripts specified. A *>* prompt is displayed. Type *h* for a list of commands. Type *h <command>* for detailed help, or *h ** for detailed help on all commands. Generally, interactive commands consist of a command word followed by optional arguments. The command words are case-sensitive. Each command may have aliases (alternative names) given in parenthesis in the help. Numeric arguments are interpreted as decimal unless prefixed with *0x* in which case they are interpreted as hexadecimal. Tab completion and history editing are provided by the GNU readline library. Tab completion is particularly useful for command words and address table entries. Wildcards are permitted in address table entries in certain cases. For example, the command *readT1 stat*ttc*err* will read and display all address table entries matching the expression with wildcards. Wildcards are simple shell-style by default, where *** matches any string. An argument may be preceded with the string *perl:* to force full perl-style regular expression matching. ---++++ Detailed Command List ---+++++ help (h) Display list of commands. A command name may be given for a longer description of a particular command. ---+++++ quit (q, exit) Exit the program. ---+++++ echo Echo the arguments after the command to the terminal (useful in scripts) ---+++++ sleep Delay execution for the specified time in seconds. Decimal values may be used. ---+++++ connect <module_id> Connect to an AMC13 using the specified IP address or connection file. See [[#ModuleId][section above]] for details on the syntax. ---+++++ list (fv) List all connected AMC13 modules with firmware version, serial number and IP addresses. The module currently accepting commands is marked with a *-* character. For example: <pre> >list Connected AMC13s *0: SN: 86 T1v: 0211 T2v: 0021 cf: 192.168.1.82 1: SN: 82 T1v: 4007 T2v: 0021 cf: 192.168.1.90 </pre> ---+++++ sel <number> Select an AMC13 to accept commands. Specify a number as shown in the output of the list command. ---+++++ readT1 (rv) <address> [<count>] ---+++++ readT2 (rs) <address> [<count>] Read from a register on the T1 or T2 board. <address> may be any of the following: * a numeric address (remember to use *0x* prefix for hex * the name of one address table item * an expression containing wildcard characters An optional count may be given if the address specifies a single register. The specified number of 32-bit words will be read and displayed. All displayed values are in hex. <pre> writeT1 (wv) : Write from AMC13 T1 board writeT2 (ws) : Write from AMC13 T2 board i (en) : Initialize AMC13 Usage: i <inputs> <options> inputs: list of inputs e.g. '1-12' '*' enables all inputs which show AMC link ready options: T to enable loop-back TTC on TTS output fiber F to generate fake events in AMC13 N to leave AMC13 out of run mode after initialization daq : Enable DAQ outputs Usage: daq 1|2|3 d 1 - enable SFP0 (top) DAQ fiber for AMC1-AMC12 readout 2 - enable SFP0 for AMC1-AMC6, SFP1 for AMC7-AMC12 3 - enable SFP0 for AMC1-AMC4, SFP1 for AMC5-AMC8, SFP2 for AMC9-AMC12 d - disable all fibers note: recommend doing 'rd' (daq reset) after changing configuration localL1A : Configure local L1A generator Usage: localL1A <options> <burst> <rate> options: o specifies one trigger per <rate> orbits b specifies one trigger per <rate> BX r specifies random triggers in <rate> * 2 Hz d disable local L1A burst: number of triggers per burst in single-burst mode rate: number of orbits or BX between triggers or random rate in 2Hz units prescale : set prescale mode and factor Usage: prescale <mode> <factor> mode: 0 for simple prescale (record every n events, n from 1...0x10000) 1 to match EvN with n low bits =0 where n from 5..20 factor: if mode=0, 1...0x10000 if mode=1, 5..20 lt : Send/enable/disable local triggers lt <num> send <num> local trigger (bursts) in software loop lt e enable trigger generator lt d disable trigger generator lt c enable continuous mode (configure with localL1A) rg : General reset For firmwares before 0x20f/0x4006 this resets DAQ links too After this version, use 'rd' to reset DAQ separately rc : Counter reset rd : DAQ Link reset (firmware 0x20f/0x4006 and above) start : Enable run mode stop : Disable run mode nodes : List address table nodes -- list {T1|T2} <regex> re : Read next event from SDRAM df : Read events and write to binary file -- df file [count] printFlash : print flash data for testing only verifyFlash : verify flash data from file -- verifyFlash file address programFlash : program flash data from file -- programFlash file address reconfigureFPGAs : reconfigure FPGAs from flash verifyFlashFile : verify flash data from file -- verifyFlash file programFlashFile : program flash data from file -- programFlash file selectFileTest : test function for MCS file parsing -- selectFileTest file vfh : verify flash header -- vfh OR vfh <chip_type> vbs : verify flash golden -- vbs OR vbs <chip_type> vs : verify flash spartan -- vs OR vs <chip_type> vv (vk) : verify flash virtex/kintex -- vv OR vv <chip_type> pfh : program flash header -- pfh OR pfh <chip_type> pbs : program flash golden -- pbs OR pbs <chip_type> ps : program flash spartan -- ps OR ps <chip_type> pv (pk) : program flash virtex/kintex -- pv OR pv <chip_type> devstatus (dst) : Display AMC13 Status usage: status <level> <debug> level from 1..9 with 1 being least verbose debug if present enables lots of debug output for Eric status (st) : Display AMC13 Status usage: status <level> table_name level from 1..9 with 1 being least verbose (99 displays everything) table_name limits the display to the table named statusHTML : Display AMC13 status in basic HTML format usage: statusHTML <level> table_name level from 1..9 with 1 being least verbose (99 displays everything) table_name limits the display to the table named openStatusFile : Open a text file to stream status info to closeStatusFile : Close the text file </pre> -- Main.EricHazen - 18 Oct 2014
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r24
|
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r2 - 18 Oct 2014
-
EricHazen
Home
Site map
BUCMSPublic web
Main web
Sandbox web
TWiki web
BUCMSPublic Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
Edit
Attach
Copyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback