2015-01-23 00:52:13 +08:00
Utilities
=========
2016-01-19 12:41:42 +08:00
.. Sort these tool by some subjective combination of their
typical sequence and expected frequency of use.
2015-01-23 00:52:13 +08:00
Local running tool
------------------
.. argparse ::
:ref: artiq.frontend.artiq_run.get_argparser
:prog: artiq_run
2015-04-07 15:41:32 +08:00
Static compiler
---------------
This tool compiles an experiment into a ELF file. It is primarily used to prepare binaries for the default experiment 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.
.. argparse ::
:ref: artiq.frontend.artiq_compile.get_argparser
:prog: artiq_compile
2015-04-30 20:03:11 +08:00
Flash storage image generator
-----------------------------
This tool compiles key/value pairs into a binary image suitable for flashing into the flash storage space of the core device.
.. argparse ::
:ref: artiq.frontend.artiq_mkfs.get_argparser
:prog: artiq_mkfs
2015-05-07 23:47:48 +08:00
2024-06-05 16:53:01 +08:00
.. _flashing-loading-tool:
2016-01-19 12:41:42 +08:00
Flashing/Loading tool
---------------------
.. argparse ::
:ref: artiq.frontend.artiq_flash.get_argparser
:prog: artiq_flash
2018-07-20 11:59:07 +08:00
.. _core-device-management-tool:
2015-05-07 23:47:48 +08:00
2018-05-23 02:56:04 +08:00
Core device management tool
---------------------------
The artiq_coremgmt utility gives remote access to the core device logs, the :ref: `core-device-flash-storage` , and other management functions.
2024-06-05 17:08:12 +08:00
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).
2018-05-23 02:56:04 +08:00
To read core device logs::
$ artiq_coremgmt log
2015-05-07 23:47:48 +08:00
2018-05-23 05:32:00 +08:00
To set core device log level and UART log level (possible levels are `` TRACE `` , `` DEBUG `` , `` INFO `` , `` WARN `` and `` ERROR `` )::
2015-05-07 23:47:48 +08:00
2018-05-23 02:56:04 +08:00
$ artiq_coremgmt log set_level LEVEL
$ artiq_coremgmt log set_uart_level LEVEL
2018-05-23 05:32:00 +08:00
Note that enabling the `` TRACE `` log level results in small core device slowdown, and printing large amounts of log messages to the UART results in significant core device slowdown.
2015-05-07 23:47:48 +08:00
To read the record whose key is `` mac `` ::
2018-05-23 02:56:04 +08:00
$ artiq_coremgmt config read mac
2015-05-07 23:47:48 +08:00
To write the value `` test_value `` in the key `` my_key `` ::
2018-05-23 02:56:04 +08:00
$ artiq_coremgmt config write -s my_key test_value
$ artiq_coremgmt config read my_key
2015-05-07 23:47:48 +08:00
b'test_value'
2015-11-01 00:24:44 +08:00
You can also write entire files in a record using the `` -f `` parameter. This is useful for instance to write the startup and idle kernels in the flash storage::
2015-05-07 23:47:48 +08:00
2018-05-23 02:56:04 +08:00
$ artiq_coremgmt config write -f idle_kernel idle.elf
$ artiq_coremgmt config read idle_kernel | head -c9
2015-05-29 22:30:32 +08:00
b'\x7fELF
2015-05-07 23:47:48 +08:00
You can write several records at once::
2018-05-23 02:56:04 +08:00
$ artiq_coremgmt config write -s key1 value1 -f key2 filename -s key3 value3
2015-05-07 23:47:48 +08:00
To remove the previously written key `` my_key `` ::
2021-07-19 12:05:24 +08:00
$ artiq_coremgmt config remove my_key
2015-06-18 23:07:03 +08:00
You can remove several keys at once::
2021-07-19 12:05:24 +08:00
$ artiq_coremgmt config remove key1 key2
2015-05-07 23:47:48 +08:00
To erase the entire flash storage area::
2018-05-23 02:56:04 +08:00
$ artiq_coremgmt config erase
2015-05-07 23:47:48 +08:00
2015-12-24 18:51:11 +08:00
You do not need to remove a record in order to change its value, just overwrite it::
2015-05-07 23:47:48 +08:00
2018-05-23 02:56:04 +08:00
$ artiq_coremgmt config write -s my_key some_value
$ artiq_coremgmt config write -s my_key some_other_value
$ artiq_coremgmt config read my_key
2015-05-07 23:47:48 +08:00
b'some_other_value'
.. argparse ::
2018-05-23 02:56:04 +08:00
:ref: artiq.frontend.artiq_coremgmt.get_argparser
:prog: artiq_coremgmt
2015-12-24 18:51:11 +08:00
2019-04-20 00:21:54 +08:00
Core device logging controller
------------------------------
.. argparse ::
:ref: artiq.frontend.aqctl_corelog.get_argparser
:prog: aqctl_corelog
2022-03-18 17:01:51 +08:00
Moninj proxy
------------
.. argparse ::
:ref: artiq.frontend.aqctl_moninj_proxy.get_argparser
:prog: aqctl_moninj_proxy
2022-12-02 16:27:03 +08:00
.. _rtiomap-tool:
RTIO channel name map tool
--------------------------
.. argparse ::
:ref: artiq.frontend.artiq_rtiomap.get_argparser
:prog: artiq_rtiomap
2022-03-18 17:01:51 +08:00
2016-02-16 05:43:02 +08:00
.. _core-device-rtio-analyzer-tool:
2015-12-24 18:51:11 +08:00
Core device RTIO analyzer tool
------------------------------
2019-01-10 13:01:36 +08:00
:mod: `~artiq.frontend.artiq_coreanalyzer` is a tool to convert core device RTIO logs to VCD waveform files that are readable by third-party tools such as GtkWave. This tool extracts pre-recorded data from an ARTIQ core device buffer (or from a file with the `` -r `` option), and converts it to a standard VCD file format. See :ref: `rtio-analyzer-example` for an example, or :mod: `artiq.test.coredevice.test_analyzer` for a relevant unit test.
2015-12-24 18:51:11 +08:00
.. argparse ::
:ref: artiq.frontend.artiq_coreanalyzer.get_argparser
:prog: artiq_coreanalyzer
2015-08-17 15:44:40 +08:00
2018-11-26 17:53:28 +08:00
.. _routing-table-tool:
2023-12-08 18:55:07 +08:00
Core device RTIO analyzer proxy
-------------------------------
:mod: `~artiq.frontend.aqctl_coreanalyzer_proxy` is a tool to distribute the core analyzer dump to several clients such as the dashboard.
.. argparse ::
:ref: artiq.frontend.aqctl_coreanalyzer_proxy.get_argparser
:prog: aqctl_coreanalyzer_proxy
2018-11-26 17:53:28 +08:00
DRTIO routing table manipulation tool
-------------------------------------
.. argparse ::
:ref: artiq.frontend.artiq_route.get_argparser
:prog: artiq_route