Difference: AMC13Tool2 (1 vs. 21)

Revision 2131 Oct 2016 - EricHazen

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Line: 347 to 347
  ttc f on - ttc filter enable ttc f off - ttc filter disable ttc f clr - ttc filter clear
Changed:
<
<
ttc f s - set TTC filter list item
>
>
ttc f s ! ! - set TTC filter list item
  is item 0-15 to set is value to match for filtering commands is bits to ignore when filtering commands

Revision 2014 Dec 2015 - ColinJacob

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Line: 170 to 170
  N to leave AMC13 out of run mode after initialization
Added:
>
>
Using "F" will cause fake data of size determined by the T1 register CONF.AMC.FAKE_DATA_SIZE ( addr 0x18 ) to appear to come from the AMC slots given in the list of inputs. The list of inputs is comma delimited with no spaces, and you can use single numbers( 2,7,10 ), inclusive ranges indicated with a hyphen ( 1-7 ), or a combination of the two ( 1-3,5,7,9-12).

When using multiple event builders ( >daq 2 for example ), you must enable at least one AMC slot for each SFP channel. See the daq command for more info.

 
daq <config> (configure DAQ fiber output)

This command sets the configuration for the DAQ fiber (aka S-Link express, DAQLSC) outputs.

Line: 183 to 187
  Enter 'L' after number of DAQs to enable local mode (using local triggers). Example: >daq 2 L.

Added:
>
>
When initializing AMCs, at least one AMC from each SFP channel must be initialized.

 Note: recommend doing 'rd' (daq reset) after changing configuration

fed <link_no> <id>

Revision 1913 Dec 2015 - ColinJacob

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Line: 500 to 500
 
reconfigureFPGAs (reconfigure FPGAs from flash)
Added:
>
>

Troubleshooting

dump (wu) (dump register values in Mr. Wu's format)
dump (wu): dump registers in Mr. Wu's format to .txt file with a status (st) command at the end
             Usage:
             wu OR wu <filename> OR wu <status_verbosity_level> OR wu <filename> <status_verbosity_level>
 -- EricHazen - 18 Oct 2014

Revision 1811 Dec 2015 - ColinJacob

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Line: 12 to 12
 
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
Changed:
<
<
-c, --connect file name or ip address connection file name or ip address (may be repeated for multiple AMC13)
>
>
-c, --connect file name, ip address, or serial number connection file name, ip address, or AMC13 serial number (may be repeated for multiple AMC13)
 
-i, --id string connection file ID prefix (requires connection file too)

Startup

Line: 26 to 26
  Use the -c argument to specify AMC13 modules to communicate with.
Changed:
<
<
IP Address
>
>
IP Address or Serial Number
  The argument after -c may be a numeric I/P address, in the standard form e.g. 192.168.1.120, or simply the serial number e.g. 67.
Changed:
<
<
To specify the control hub protocol, append /c e.g. 192.168.1.120/c (67/c). Always specify the T2 board (lower) IP address or serial number. The tool will automatically connect to the address specified + 1 for T1.
>
>
To specify the control hub protocol, append /c e.g. AMC13Tool2.exe -c 192.168.1.120/c (AMC13Tool2.exe -c 67/c). Always specify the T2 board (lower) IP address or serial number. 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
Line: 179 to 179
 
  • 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
Added:
>
>
  • 0 - disable all fibers

Enter 'L' after number of DAQs to enable local mode (using local triggers). Example: >daq 2 L.

  Note: recommend doing 'rd' (daq reset) after changing configuration

Revision 1710 Nov 2015 - EricHazen

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Line: 182 to 182
  Note: recommend doing 'rd' (daq reset) after changing configuration
Added:
>
>
fed <link_no> <id>

Set Source_ID or FED number for link 0-3.

 
localL1A <mode> <burst> <rate> (Configure local L1A generator)

Revision 1631 Jul 2015 - ZachCollins

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Line: 465 to 465
  chip_type: specifies firmware file suffix denoting T2 chip type
pfh (Program Flash Header)
Changed:
<
<
>
>
pfh:    program flash header\n" \
             Usage:\n" \
             pfh OR pfh <chip_type>\n" \
             chip_type: specifies firmware file suffix denoting T2 chip type
 
pbs (Program Backup Spartan, e.g. Golden)
Changed:
<
<
>
>
pbs:   program flash backup spartan (golden)
             Usage:
             pbs OR pbs <chip_type>
             chip_type: specifies firmware file suffix denoting T2 chip type
 
ps (Program Spartan, e.g. T2)
Changed:
<
<
>
>
ps:     program flash spartan
             Usage:
             ps OR ps <chip_type>
             chip_type: specifies firmware file suffix denoting T2 chip type
 
pk (or pv) (Program Kintex/Virtex, e.g. T1)
Changed:
<
<
>
>
pv:     program flash virtex/kintex
             Usage:
             pv OR pv <chip_type>
             chip_type: specifies firmware file suffix denoting T2 chip type
 
reconfigureFPGAs (reconfigure FPGAs from flash)

-- EricHazen - 18 Oct 2014

Revision 1531 Jul 2015 - ZachCollins

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Line: 29 to 29
 IP Address

The argument after -c may be a numeric I/P address, in the standard form e.g. 192.168.1.120, or simply the serial number e.g. 67.

Changed:
<
<
To specify the control hub protocol, append /c e.g. 192.168.1.120/c (67/c). Specify the T2 board (lower) IP address. The tool will automatically connect to the address specified + 1 for T1.
>
>
To specify the control hub protocol, append /c e.g. 192.168.1.120/c (67/c). Always specify the T2 board (lower) IP address or serial number. 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
Line: 59 to 59
 

Interactive Mode

Changed:
<
<
The tool will enter interactive mode after executing any scripts specified. A > prompt is displayed.
>
>
The tool will enter interactive mode after executing any scripts specified. A &Launcher::AMC13VerifyFlashHeader, "*>* prompt is displayed.
 Type h for a list of commands. Type h <command> for detailed help, or h * for detailed help on all commands.
Line: 266 to 267
 
>nodes t1 *ttc*error*
9 nodes matched

Changed:
<
<
0: STATUS.TTC.BCNT_ERROR (addr=00000000 mask=00000040) r
>
>
0: STATUS.TTC.BCNT_ERROR chip_type: specifies firmware file suffix denoting T2 chip type (addr=00000000 mask=00000040) r
  1: STATUS.TTC.BCNT_ERRORS_HI (addr=00000045 mask=0000ffff) r 2: STATUS.TTC.BCNT_ERRORS_LO (addr=00000044 mask=ffffffff) r 3: STATUS.TTC.MULT_BIT_ERROR (addr=00000000 mask=00000100) r
Line: 436 to 437
 For detailed recipe for updating firmware follow this link: Firmware Update Recipe

vfh (Verify Flash Header)
Changed:
<
<
>
>
vfh:    verify flash header
             Usage:
             vfh OR vfh <chip_type>
             chip_type: specifies firmware file suffix denoting T2 chip type
 
vbs (Verify Backup Spartan, e.g. Golden)
Changed:
<
<
>
>
vbs:    verify flash backup spartan (golden) \n" \
             Usage:
             vbs OR vbs <chip_type>
             chip_type: specifies firmware file suffix denoting T2 chip type
 
vs (Verify Spartan, e.g. T2)
Changed:
<
<
>
>
vs:      verify flash spartan
             Usage:
             vs OR vs <chip_type>
             chip_type: specifies firmware file suffix denoting T2 chip type
 
vk (or vv) (Verify Kintex/Virtex, e.g. T1)
Changed:
<
<
>
>
vv:      verify flash virtex/kintex
             Usage:
             vv OR vv <chip_type>
              chip_type: specifies firmware file suffix denoting T2 chip type
 
pfh (Program Flash Header)

pbs (Program Backup Spartan, e.g. Golden)

Revision 1431 Jul 2015 - ZachCollins

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Line: 28 to 28
  IP Address
Changed:
<
<
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.
>
>
The argument after -c may be a numeric I/P address, in the standard form e.g. 192.168.1.120, or simply the serial number e.g. 67. To specify the control hub protocol, append /c e.g. 192.168.1.120/c (67/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
Line: 103 to 103
 
connect <module_id>
Changed:
<
<
Connect to an AMC13 using the specified IP address or connection file.
>
>
Connect to an AMC13 using the specified IP address, serial number, or connection file.
 See section above for details on the syntax.

list (fv)

Revision 1313 Jul 2015 - EricHazen

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Line: 29 to 29
 IP Address

The argument after -c may be a numeric I/P address, in the standard form e.g. 192.168.1.120.

Changed:
<
<
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.
>
>
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

Revision 1211 Jun 2015 - EricHazen

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Line: 344 to 344
  ttc f dis - disable specific filter by number
Added:
>
>
The TTC history capture must be enabled with ttc h on. Using the default settings (no filters) the history will fill with BC0 commands. To set up a filter to ignore BC0, use the following command:

  > ttc f s 1 0xfe
 For example:


Line: 389 to 395
 >
Added:
>
>
The detailed documentation for the following commands hasn't been written yet, but in general they should be used only by expert users.
 
 vfh                 :   verify flash header -- vfh OR vfh 
 vbs                 :   verify flash golden -- vbs OR vbs 

Revision 1126 Mar 2015 - EricHazen

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Line: 252 to 252
 
start (Enable run mode)
stop (Disable run mode)
Changed:
<
<
nodes {T1|T2} <regex> (list address table nodes)
>
>
nodes {T1|T2} <regex> <options> (list address table nodes)
  This traverses the IPBus address table for either T1 or T2 board and displays all items matching the specified regular expression. The regular expression format is rather simple; '*' matches any string.
Added:
>
>
Option "V" will display a description of each item.

Option "D" provides debugging output.

 For example:


Line: 274 to 279
 >
Added:
>
>
Verbose option to display descriptions:

>nodes t1 status*tts_state v
2 nodes matched
    0: STATUS.AMC_TTS_STATE                                         (addr=00000019 mask=001f0000)  r
       encoded TTS from enabled AMCs
    1: STATUS.T1_TTS_STATE                                          (addr=00000019 mask=0000f000)  r
       Current T1 overall TTS state
>
 
re <all> (read/display event from SDRAM)

This command will read the next event from the SDRAM and display

Revision 1025 Feb 2015 - DavidZou

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Line: 403 to 403
  selectFileTest : test function for MCS file parsing -- selectFileTest file
Added:
>
>

Flash Programming Commands (for firmware updates, etc.)

Flash programming commands uses the board's serial number to identify the relevant firmware chip-type for the user indicated flash region. It then looks for matching mcs files in the current directory and lists them for the user to pick from. Once the user selects the mcs file to use, the flash action (verify or program) will be carried out.

When reprogramming, once the flash has been programmed, load the new firmware using 'reconfigureFPGAs'

For detailed recipe for updating firmware follow this link: Firmware Update Recipe

vfh (Verify Flash Header)

vbs (Verify Backup Spartan, e.g. Golden)

vs (Verify Spartan, e.g. T2)

vk (or vv) (Verify Kintex/Virtex, e.g. T1)

pfh (Program Flash Header)

pbs (Program Backup Spartan, e.g. Golden)

ps (Program Spartan, e.g. T2)

pk (or pv) (Program Kintex/Virtex, e.g. T1)

reconfigureFPGAs (reconfigure FPGAs from flash)
 -- EricHazen - 18 Oct 2014

Revision 911 Feb 2015 - EricHazen

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Line: 193 to 193
 
burst number of triggers per burst in single-burst mode
rate number of orbits or BX between triggers or random rate in Hz units
Added:
>
>

setOcrCommand (set orbit count reset TTC command)

Specify the TTC command to use for orbit count reset. Note that the low two bits must be zero as they have predefined meanings (bit 0=BcR; bit 1=EcR)

setOrbitGap <start> <end> (set orbit gap for local triggers)

Triggers generated by the local L1A generator will not occur in this range of BCN.

<start> must be in the range 0-3562

<end> must be in the range 1-3563

prescale <mode> <factor> (set local event capture mode/prescale)

This command sets the parameters for capture of selected events in the SDRAM buffer for readout over IPBus using the commands re and df or other means.

    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 <mode/count> (Enable/disable local L1A generator)

If <mode/count> is an integer, send that many bursts of triggers

Line: 210 to 237
 enabled (e.g. lt 5 would generate 5 bursts) but it does not start to run continuously unless you enter lt e. To stop continuous triggers, enter lt d.
Deleted:
<
<
 prescale            :   set prescale mode and factor
                          Usage:
                          prescale  
                            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     send  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)

Reset most AMC13 logic. For firmwares before 0x20f/0x4006 this resets DAQ links too. After this version, use 'rd' to reset DAQ separately

Line: 238 to 249
  DAQ Link reset (firmware 0x20f/0x4006 and above)
Added:
>
>
start (Enable run mode)
stop (Disable run mode)

nodes {T1|T2} <regex> (list address table nodes)

This traverses the IPBus address table for either T1 or T2 board and displays all items matching the specified regular expression. The regular expression format is rather simple; '*' matches any string. For example:

>nodes t1 *ttc*error*
9 nodes matched
    0: STATUS.TTC.BCNT_ERROR                                        (addr=00000000 mask=00000040)  r
    1: STATUS.TTC.BCNT_ERRORS_HI                                    (addr=00000045 mask=0000ffff)  r
    2: STATUS.TTC.BCNT_ERRORS_LO                                    (addr=00000044 mask=ffffffff)  r
    3: STATUS.TTC.MULT_BIT_ERROR                                    (addr=00000000 mask=00000100)  r
    4: STATUS.TTC.MULT_BIT_ERRORS_HI                                (addr=00000043 mask=0000ffff)  r
    5: STATUS.TTC.MULT_BIT_ERRORS_LO                                (addr=00000042 mask=ffffffff)  r
    6: STATUS.TTC.SGL_BIT_ERROR                                     (addr=00000000 mask=00000080)  r
    7: STATUS.TTC.SGL_BIT_ERRORS_HI                                 (addr=00000041 mask=0000ffff)  r
    8: STATUS.TTC.SGL_BIT_ERRORS_LO                                 (addr=00000040 mask=ffffffff)  r
>

re <all> (read/display event from SDRAM)

This command will read the next event from the SDRAM and display the first 10 words and last 5 words of the event. If the argument all is given, the entire event is displayed. The read pointer is advanced to the next event.

rev (read/display event using new vector interface)

This command is equivalent to re except that it uses (tests) the new vector-based function to read events.

df <file> <count> (read events to file)

This command reads events from the SDRAM buffer and writes them to a binary file. The file argument specifies the file to write. The count argument specifies the number of events (default is 1).

The file format is defined as a list of 64-bit words in little-endian byte order as follows. See AMC13CommonFirmwareProposal for detailed description of AMC13 payload format.

  badc0ffeebadcafe   magic number present at start of each event
  cccccccccccccccc   size of event in 64-bit words
  510000781f412308   CMS common data format header
  104101401a540110   AMC13 header, specifying 4 AMCs
  0f00040300010000
    ...
  c62b8d9c000781f4   AMC13 trailer with CRC
  a0001014c3590000   CMS command data format trailer

ttc <options> (control TTC history capture)

Usage:
   ttc h on                 - ttc history enable
   ttc h off                - ttc history disable
   ttc h clr                - ttc history clear
   ttc h d             - ttc history display  items or all
   ttc f on                 - ttc filter enable
   ttc f off                - ttc filter disable
   ttc f clr                - ttc filter clear
   ttc f s    - set TTC filter list item
            is item 0-15 to set
             is value to match for filtering commands
            is bits to ignore when filtering commands
   ttc f list               - list currently-defined filters
   ttc f ena             - enable specific filter by number
   ttc f dis             - disable specific filter by number

For example:

[hazen@cms4 amc13]$ AMC13Tool2.exe -c 192.168.1.176
  ...
>en 1-4 f t
parsed list "1-4" as mask 0xf
Enabling fake data
Enabling TTS as TTC for loop-back
AMC13 out of run mode
AMC13 is back in run mode and ready
>ttc h on                         (turn on TTC history)
>ttc h d 5                        (display 5 commands)
History buffer has 512 entries
NOTE:  TTC history capture disabled before readout
    Cmd --Orbit- BcN --EvN-
  0: 01 0003cf4e dea 000001       (these are all Bc0 and uninteresting)
  1: 01 0003cf4f dea 000001
  2: 01 0003cf50 dea 000001
  3: 01 0003cf51 dea 000001
  4: 01 0003cf52 dea 000001
>ttc f s 0 0x01 0xfe              (set filter item 0 to 0x01 with mask 0xfe)
>ttc f on                         (turn on filtering)
>ttc h clr                        (clear the history)
>ttc h on                         (turn history back on)
>ttc h d 5                        (display 5 entries)
History buffer has 0 entries
>ttc h on                         (turn history back on)
>wv ACTION.LOCAL_TRIG.SEND_OCR    (send OcR command)
>wv ACTION.LOCAL_TRIG.SEND_OCR    (twice for fun)
>ttc h d 5                        (display 5 entries)
History buffer has 2 entries
NOTE:  TTC history capture disabled before readout
    Cmd --Orbit- BcN --EvN-
  0: 28 00021c6b a17 000001
  1: 28 000203d5 b65 000001
>ttc f list                       (list the items being filtered)
Item Ena CMD Mask
   0 On   01 fe
   1 Off  00 00
     ...
  15 Off  00 00
>
 

Deleted:
<
<
start : Enable run mode stop : Disable run mode nodes : List address table nodes -- list {T1|T2} 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 vbs : verify flash golden -- vbs OR vbs vs : verify flash spartan -- vs OR vs
Line: 259 to 381
  pbs : program flash golden -- pbs OR pbs ps : program flash spartan -- ps OR ps pv (pk) : program flash virtex/kintex -- pv OR pv
Deleted:
<
<
devstatus (dst) : Display AMC13 Status usage: status 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 table_name
Line: 276 to 393
  table_name limits the display to the table named openStatusFile : Open a text file to stream status info to closeStatusFile : Close the text file
Added:
>
>

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
 

-- EricHazen - 18 Oct 2014 \ No newline at end of file

Revision 823 Jan 2015 - EricHazen

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Line: 75 to 75
 Tab completion is particularly useful for command words and address table entries.

Wildcards are permitted in address table entries in certain cases.

Changed:
<
<
For example, the command *readT1 stat*ttc*err* will read and
>
>
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.

Revision 714 Jan 2015 - EricHazen

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Line: 183 to 183
 Note: recommend doing 'rd' (daq reset) after changing configuration
Changed:
<
<
localL1A <mode> <burst> <rate> (Configure local L1A generator)
>
>
localL1A <mode> <burst> <rate> (Configure local L1A generator)
 
Option Function Note
mode "o" specifies one trigger per <rate> orbits
Line: 193 to 193
 
burst number of triggers per burst in single-burst mode
rate number of orbits or BX between triggers or random rate in Hz units
Added:
>
>
lt <mode/count> (Enable/disable local L1A generator)

If <mode/count> is an integer, send that many bursts of triggers (typically you would want to set the burst size to 1 using the localL1A command if using this feature).

If <mode/count> is a letter, perform one of these functions:

Mode Function
e Enable local trigger generator
d Disable local trigger generator
c Start continuous triggers

If you set up the trigger generator using localL1A it is automatically enabled (e.g. lt 5 would generate 5 bursts) but it does not start to run continuously unless you enter lt e. To stop continuous triggers, enter lt d.

 
 prescale            :   set prescale mode and factor
                          Usage:

Revision 621 Nov 2014 - DavidZou

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Line: 188 to 188
 
Option Function Note
mode "o" specifies one trigger per <rate> orbits
mode "b" specifies one trigger per <rate> BX
Changed:
<
<
mode "r" specifies random triggers in <rate> * 2 Hz
>
>
mode "r" specifies random triggers in <rate> Hz
 
mode "d" disable local L1A
burst number of triggers per burst in single-burst mode
Changed:
<
<
rate number of orbits or BX between triggers or random rate in 2Hz units
>
>
rate number of orbits or BX between triggers or random rate in Hz units
 
 prescale            :   set prescale mode and factor

Revision 521 Oct 2014 - EricHazen

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Line: 170 to 170
  N to leave AMC13 out of run mode after initialization
Changed:
<
<
daq <config>
>
>
daq <config> (configure DAQ fiber output)

This command sets the configuration for the DAQ fiber (aka S-Link express, DAQLSC) outputs. Options:

  • 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 <mode> <burst> <rate> (Configure local L1A generator)

Option Function
<-- -->
Sorted ascending
Note
mode "d" disable local L1A
rate number of orbits or BX between triggers or random rate in 2Hz units
burst number of triggers per burst in single-burst mode
mode "b" specifies one trigger per <rate> BX
mode "o" specifies one trigger per <rate> orbits
mode "r" specifies random triggers in <rate> * 2 Hz
 

Deleted:
<
<
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: o specifies one trigger per orbits b specifies one trigger per BX r specifies random triggers in * 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

Revision 420 Oct 2014 - EricHazen

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Line: 157 to 157
  Will correctly reset the T1 board.
Added:
>
>
i (en) <inputs> <options> (initialize AMC13 for data taking)
 
 i (en)              :   Initialize AMC13
                           Usage:

Line: 166 to 168
  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
Added:
>
>

daq <config>


  daq : Enable DAQ outputs Usage: daq 1|2|3 d
Line: 195 to 202
  lt e enable trigger generator lt d disable trigger generator lt c enable continuous mode (configure with localL1A)
Changed:
<
<
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)
>
>

rg (general reset)

Reset most AMC13 logic. For firmwares before 0x20f/0x4006 this resets DAQ links too. After this version, use 'rd' to reset DAQ separately

rc (counter reset)

Reset AMC13 counters.

rd (DAQ reset)

DAQ Link reset (firmware 0x20f/0x4006 and above)


  start : Enable run mode stop : Disable run mode nodes : List address table nodes -- list {T1|T2}

Revision 320 Oct 2014 - EricHazen

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Line: 143 to 143
  All displayed values are in hex.
Added:
>
>
writeT1 (wv) <address> [<data>]
writeT2 (ws) <address> [<data>]

Write to an address on T1 or T2 board. Address may be numeric or an address table item. Data must be numeric.

Data may be omitted in which case a special masked write is performed. This is typically used for address table items with names starting with ACTION.. For example:

wv ACTION.RESETS.GENERAL

Will correctly reset the T1 board.

 

Deleted:
<
<
writeT1 (wv) : Write from AMC13 T1 board writeT2 (ws) : Write from AMC13 T2 board
  i (en) : Initialize AMC13 Usage: i

Revision 218 Oct 2014 - EricHazen

Line: 1 to 1
 
META TOPICPARENT name="AMC13CppProductionSoftware"
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.
Added:
>
>
 

Usage:

AMC13Tool2.exe  [-p ] [-X ] [-i ] ...  [-c ] ...  [--] [--version] [-h]

Line: 19 to 21
 interactive mode without establishing communication with any AMC13. Typically the first interactive command would then be "connect" to attach an AMC13.
Changed:
<
<
Specifying AMC13 Modules
>
>

Specifying AMC13 Modules

Use the -c argument to specify AMC13 modules to communicate with.

IP Address

 
Changed:
<
<
Use the -c argument to specify AMC13 modules to communicate with. The argument may be a numeric I/P address or the name of a uHAL connection file (see Tutorial).
>
>
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 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
  2. By executing the command include 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 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:

>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

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.

 writeT1 (wv)        :   Write from AMC13 T1 board
 writeT2 (ws)        :   Write from AMC13 T2 board
 i (en)              :   Initialize AMC13
                           Usage:
                           i  
                             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:  o specifies one trigger per  orbits
                                    b specifies one trigger per  BX
                                    r specifies random triggers in  * 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:  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     send  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} 
 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 
 vbs                 :   verify flash golden -- vbs OR vbs 
 vs                  :   verify flash spartan -- vs OR vs 
 vv (vk)             :   verify flash virtex/kintex -- vv OR vv 
 pfh                 :   program flash header -- pfh OR pfh 
 pbs                 :   program flash golden -- pbs OR pbs 
 ps                  :   program flash spartan -- ps OR ps 
 pv (pk)             :   program flash virtex/kintex -- pv OR pv 
 devstatus (dst)     :   Display AMC13 Status
                         usage:
                         status  
                           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  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  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
  -- EricHazen - 18 Oct 2014

Revision 118 Oct 2014 - EricHazen

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="AMC13CppProductionSoftware"
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.

Usage:

AMC13Tool2.exe  [-p ] [-X ] [-i ] ...  [-c ] ...  [--] [--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

Use the -c argument to specify AMC13 modules to communicate with. The argument may be a numeric I/P address or the name of a uHAL connection file (see Tutorial).

-- EricHazen - 18 Oct 2014

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback