Utilities¶
ARTIQ Firmware Service (AFWS) client¶
This tool serves as a client for building tailored firmware and gateware from M-Lab’s servers and downloading the binaries in ready-to-flash format. It is necessary to have a valid subscription to AFWS to use it. Subscription also includes general helpdesk support and can be purchased or extended by contacting sales@
. One year of support is included with any Kasli carriers or crates containing them purchased from M-Labs. Additional one-time use is generally provided with purchase of additional cards to facilitate the system configuration change.
Static compiler¶
This tool compiles an experiment into a ELF file. It is primarily used to prepare binaries for the startup and idle kernels, loaded in non-volatile storage of the core device. Experiments compiled with this tool are not allowed to use RPCs, and their run
entry point must be a kernel.
usage: artiq_compile [-h] [--version] [--device-db DEVICE_DB]
[--dataset-db DATASET_DB] [-c CLASS_NAME] [-o OUTPUT]
FILE [ARGUMENTS ...]
Positional Arguments¶
- FILE
file containing the experiment to compile
- ARGUMENTS
run arguments
Named Arguments¶
- --version
print the ARTIQ version number
- --device-db
device database file (default: ‘“device_db.py”’)
- --dataset-db
dataset file (default: ‘“dataset_db.mdb”’)
- -c, --class-name
name of the class to compile
- -o, --output
output file
Flash storage image generator¶
This tool compiles key/value pairs (e.g. configuration information) into a binary image suitable for flashing into the storage space of the core device. It can be used in combination with artiq_flash
to configure the core device, but this is normally necessary at most to set the ip
field; once the core device is reachable by network it is preferable to use artiq_coremgmt config
.
usage: artiq_mkfs [-h] [-s KEY STRING] [-f KEY FILENAME] output
Positional Arguments¶
- output
output file
Named Arguments¶
- -s
add string
- -f
add file contents
Flashing/Loading tool¶
ARTIQ flashing/deployment tool
usage: artiq_flash [-h] [--version] [-n] [-H HOSTNAME] [-J JUMP] [-t TARGET]
[-I PREINIT_COMMAND] [-f STORAGE] [-d DIR] [--srcbuild]
[ACTION ...]
Positional Arguments¶
- ACTION
actions to perform, default: flash everything
Named Arguments¶
- --version
print the ARTIQ version number
- -n, --dry-run
only show the openocd script that would be run
- -H, --host
SSH host where the board is located
- -J, --jump
SSH host to jump through
- -t, --target
target board, default: “kasli”, one of: kasli efc kc705
- -I, --preinit-command
add a pre-initialization OpenOCD command. Useful for selecting a board when several are connected.
- -f, --storage
write file to storage area
- -d, --dir
look for board binaries in this directory
- --srcbuild
board binaries directory is laid out as a source build tree
Valid actions:
gateware: write main gateware bitstream to flash
bootloader: write bootloader to flash
storage: write storage image to flash
firmware: write firmware to flash
load: load main gateware bitstream into device (volatile but fast)
erase: erase flash memory
start: trigger the target to (re)load its gateware bitstream from flash. If your core device is reachable by network, prefer ‘artiq_coremgmt reboot’.
Prerequisites:
Connect the board through its/a JTAG adapter.
Have OpenOCD installed and in your $PATH.
Have access to the JTAG adapter’s devices. Udev rules from OpenOCD: ‘sudo cp openocd/contrib/99-openocd.rules /etc/udev/rules.d’ and replug the device. Ensure you are member of the plugdev group: ‘sudo adduser $USER plugdev’ and re-login.
Core device management tool¶
The core management utility gives remote access to the core device logs, the Flash storage, and other management functions.
To use this tool, it is necessary to specify the IP address your core device can be contacted at. If no option is used, the utility will assume there is a file named device_db.py
in the current directory containing the device database; otherwise, a device database file can be provided with --device-db
or an address directly with --device
(see also below).
usage: artiq_coremgmt [-h] [--version] [--device-db DEVICE_DB] [-D DEVICE]
{log,config,reboot,debug} ...
Positional Arguments¶
- tool
Possible choices: log, config, reboot, debug
Named Arguments¶
- --version
print the ARTIQ version number
- --device-db
device database file (default: ‘“device_db.py”’)
- -D, --device
use specified core device address instead of reading device database
Sub-commands¶
log¶
read logs and change log levels
artiq_coremgmt log [-h] {clear,set_level,set_uart_level} ...
Positional Arguments¶
- action
Possible choices: clear, set_level, set_uart_level
Sub-commands¶
clear¶
clear log buffer
artiq_coremgmt log clear [-h]
set_level¶
set minimum level for messages to be logged
artiq_coremgmt log set_level [-h] LEVEL
Positional Arguments¶
- LEVEL
log level (one of: OFF ERROR WARN INFO DEBUG TRACE)
set_uart_level¶
set minimum level for messages to be logged to UART
artiq_coremgmt log set_uart_level [-h] LEVEL
Positional Arguments¶
- LEVEL
log level (one of: OFF ERROR WARN INFO DEBUG TRACE)
config¶
read and change core device configuration
artiq_coremgmt config [-h] {read,write,remove,erase} ...
Positional Arguments¶
- action
Possible choices: read, write, remove, erase
Sub-commands¶
read¶
read key from core device config
artiq_coremgmt config read [-h] KEY
Positional Arguments¶
- KEY
key to be read from core device config
write¶
write key-value records to core device config
artiq_coremgmt config write [-h] [-s KEY STRING] [-f KEY FILENAME]
Named Arguments¶
- -s, --string
key-value records to be written to core device config
- -f, --file
key and file whose content to be written to core device config
remove¶
remove key from core device config
artiq_coremgmt config remove [-h] ...
Positional Arguments¶
- KEY
key to be removed from core device config
erase¶
fully erase core device config
artiq_coremgmt config erase [-h]
reboot¶
reboot the running system
artiq_coremgmt reboot [-h]
debug¶
specialized debug functions
artiq_coremgmt debug [-h] {allocator} ...
Positional Arguments¶
- action
Possible choices: allocator
Sub-commands¶
allocator¶
show heap layout
artiq_coremgmt debug allocator [-h]
Core device logging controller¶
ARTIQ controller for core device logs
usage: aqctl_corelog [-h] [--simulation] CORE_ADDR
Positional Arguments¶
- CORE_ADDR
hostname or IP address of the core device
Named Arguments¶
- --simulation
Simulation - does not connect to device
Device database template generator¶
ARTIQ RTIO monitor¶
ARTIQ RTIO monitor
usage: artiq_rtiomon [-h] CORE_ADDR CHANNEL [CHANNEL ...]
Positional Arguments¶
- CORE_ADDR
hostname or IP address of the core device
- CHANNEL
channel(s) to monitor
Moninj proxy¶
ARTIQ moninj proxy
usage: aqctl_moninj_proxy [-h] CORE_ADDR
Positional Arguments¶
- CORE_ADDR
hostname or IP address of the core device
RTIO channel name map tool¶
ARTIQ RTIO channel name map encoder tool
usage: artiq_rtiomap [-h] [--version] [--device-db DEVICE_DB] [--show] FILE
Positional Arguments¶
- FILE
write the result into the specified file, or read from it to show the map (see –show)
Named Arguments¶
- --version
print the ARTIQ version number
- --device-db
device database file (default: ‘“device_db.py”’)
- --show
show the channel mapping from the specified file, instead of writing to it
Core device RTIO analyzer tool¶
This tool converts core device RTIO logs to VCD waveform files that are readable by third-party tools such as GtkWave. See RTIO analyzer for an example, or artiq.test.coredevice.test_analyzer
for a relevant unit test. When using the ARTIQ dashboard, recorded data can be viewed or exported directly in the integrated waveform analyzer (the “Waveform” dock).
usage: artiq_coreanalyzer [-h] [--device-db DEVICE_DB] [-r READ_DUMP] [-p]
[-w WRITE_VCD] [-d WRITE_DUMP] [-u]
Named Arguments¶
- --device-db
device database file (default: ‘“device_db.py”’)
- -r, --read-dump
read raw dump file instead of accessing device
- -p, --print-decoded
print raw decoded messages
- -w, --write-vcd
format and write contents to VCD file
- -d, --write-dump
write raw dump file
- -u, --vcd-uniform-interval
emit uniform time intervals between timed VCD events and show RTIO event interval (in SI seconds) and timestamp (in machine units) as separate VCD channels
Core device RTIO analyzer proxy¶
This tool distributes the core analyzer dump to several clients such as the dashboard.
usage: aqctl_coreanalyzer_proxy [-h] CORE_ADDR
Positional Arguments¶
- CORE_ADDR
hostname or IP address of the core device
DRTIO routing table manipulation tool¶
ARTIQ DRTIO routing table manipulation tool
usage: artiq_route [-h] FILE {init,show,set} ...
Positional Arguments¶
- FILE
target file
- action
Possible choices: init, show, set
Sub-commands¶
init¶
create a new empty routing table
artiq_route init [-h]
show¶
show contents of routing table
artiq_route show [-h]
set¶
set routing table entry
artiq_route set [-h] DESTINATION [HOP ...]
Positional Arguments¶
- DESTINATION
destination to operate on
- HOP
hop(s) to the destination