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 to connect to Serial Number 9 (at Boston University):

  • e.g. 11_9_1:
       cd ${HOME}/src/11_9_2/hcal/hcalUpgrade/amc13
       source ~daqowner/dist/etc/env.sh
       export AMC13_SERIAL_NO=9
       ./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 from the release are used.
  • You can copy the executable to your ${HOME}/bin directory if you don't want to specify the path explicitly

Functionality

Command-line Arguments

  • -h: get list of allowed command-line arguments
  • -x: execute an AMC13Tool script file
  • -u: disable the use of uHAL ControlHub
  • -n: Manually set the AMC13 serial number (overriding the environment variable AMC13_SERIAL_NO)
  • -s: Manutally set the AMC13 slot number
  • -vi: Manually set the T1 IP address. If used, the Spartan IP address must be set manually as well
  • -si: Manually set the T2 IP address. If used, the Kintex IP address must be set manually as well
  • -i: Manually set the Spartan IP address to the one specified, and implicitly set the Kintex IP address to one LSB higher
  • -va: Manually set the T1 Address table path. If used, the Spartan Address table path must be set manually as well
  • -sa: Manually set the T2 Address table path. If used, the Kintex Address table path must be set manually as well

General Commands

  • 'q': quit program
  • 'do <file>': execute an AMC13Tool command script
  • 'sh <command>': execute a shell <command>

Run Control Commands

  • '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

Commands for Register Access

  • 'rs(v) <add> [count]': read registers from the Spartan (Virtex) chip
    • '<add>' is the address to be read. Can either be the numeric register address or the register name from the Address Table
    • '[count]' is the number of words to be read from the chip. The addresses are read incrementally starting from <add> (default to 1)
    • e.g.
            Pick an action (h for menu): rv 0x0 10
            Reading T1 from address 0x0 to address 0x9:
              00000000: 0300004b
              00000001: 00170001
              00000002: 00000000
              00000003: 04100410
              00000004: 12340111
              00000005: 0be90000
              00000006: 00000018
              00000007: 00000000
              00000008: 00000000
              00000009: 0d800d80
            
  • '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)
    • '<add>' is the starting address of the block write
    • '[<data_list>]' is the comma/space/hyphen separated list of data to be written
    • e.g.
            Pick an action (h for menu): bwv CONTROL0 1,2 3-5
            Block writing to T1 from address 0x0 to address 0x4:
              00000000: 00000001
              00000001: 00000002
              00000002: 00000003
              00000003: 00000004
              00000004: 00000005
            
  • 'qws(v) <add> [<data_list>]': queued write to Spartan (Virtex) chip
    • '<add>' is the starting address for the queued write
    • '[<data_list>]' is the comma/space/hyphen separated list of data to be written
    • e.g.
            Pick an action (h for menu): qwv CONTROL0 1,2 3-5
            Queue writing to T1 from address 0x0 to address 0x4:
              00000000: 00000001
              00000001: 00000002
              00000002: 00000003
              00000003: 00000004
              00000004: 00000005
            
  • 'fws(v) <add> [<data_list>]': FIFO write to Spartan (Virtex) chip
    • '<add>' is the address to be FIFO written to
    • '[<data_list>]' is the comma/space separated list of data to be written
    • e.g.
            Pick an action (h for menu): fwv CONTROL0 1,2 3-5
            FIFO writing to T1 at address 0x0:
              00000000: 00000001 00000002 00000003 00000004 00000005 
            

DAQ Commands

  • '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 Commands

  • '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) (M)': program Spartan (Virtex) Flash, flash address 0x200000 (0x400000)
    • If 'M' is present, file selection rules will be bypassed and the user will be able to choose from a list of all MCS files in the current directory
  • 'L': load Spartan and Virtex chips from Flash Memory

Commands for 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

Edit | Attach | Watch | Print version | History: r18 < r17 < r16 < r15 < r14 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r16 - 14 May 2013 - CharlieHill
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback