Hi!

I am looking to compile my own binaries for ARTIQ-7 so I can modify ARTIQ code. I first tried python -m artiq.gateware.targets.kasli, but a NotImplementedError (asked about that here) keeps me from successfully building.

It would make more sense to build for my own variant specifically anyway (artiq.gateware.targets.kasli_generic file.json), but what I do not have is the .json description of my variant. What I do have is a device_db_<myvariant>.py description. Now - is this the same thing? Can I just write a script to read that file and dump it as a .json? Or do I have to write it myself?

Any help much appreciated!

Thanks!

I would also love to have a complete documentation for what possible inputs there are for the hardware description json or find the part in the artiq source code where it is validated. The only resource I could find are the examples here. https://git.m-labs.hk/M-Labs/sinara-systems-legacy

Thanks for that link - thats a start! I could take apart my setup and write my own file, does not seem like too much work.

The JSON files describing crates are validated using the JSON schema at artiq/coredevice/coredevice_generic.schema.json. The schema is the most complete documentation for the format at the moment.

The device_db is usually a superset of what can be described in the JSON file. That is, you can generate a device_db from the JSON file (artiq_ddb_template crate.json > device_db.py - this utility uses the schema linked above the validate the input before starting the device_db generation) but in general not all the information contained in a device_db can be mapped back to a JSON file (for example information about non-realtime controllers).

Of course, you can reconstruct the JSON file by hand from the device_db but this is tedious (because you'll need to know which devices correspond to which boards, and how to map RTIO (base) addresses back to EEM port numbers). The JSON file is easier to write directly by looking at the connections inside the crate and adding the hardware options you have (e.g. Urukul AD9910 vs AD9912, clock sources, potential SUServos, etc.).

  • nx- likes this.