2023-02-03 17:58:13 +08:00
|
|
|
# Build and test firmware
|
|
|
|
|
|
|
|
## Kasli standalone
|
|
|
|
|
|
|
|
### Checklist
|
|
|
|
|
|
|
|
1. Build firmware (see commands below)
|
|
|
|
2. Flash firmware and settings
|
|
|
|
3. Test hardware
|
|
|
|
4. Create a flash-drive with `device_db.py` file for customers (FAT32)
|
|
|
|
|
|
|
|
### CLI commands
|
|
|
|
|
|
|
|
```shell
|
|
|
|
mkdir <variant>
|
|
|
|
cd <variant>/
|
|
|
|
git clone git@github.com:m-labs/artiq.git
|
|
|
|
cd artiq/
|
|
|
|
git checkout origin/release-7
|
|
|
|
nix develop
|
|
|
|
artiq_mkfs -s ip 192.168.1.75 kasli.config
|
|
|
|
artiq_flash storage -f kasli.config
|
|
|
|
artiq_ddb_template -o device_db.py <variant>.json
|
|
|
|
python -m artiq.gateware.targets.kasli_generic <variant>.json
|
|
|
|
artiq_flash --srcbuild -d artiq_kasli/<variant>/
|
|
|
|
artiq_sinara_tester
|
|
|
|
```
|
|
|
|
|
|
|
|
Follow `artiq_sinara_tester` instructions for testing the hardware. For more detailed information,
|
2023-02-13 14:15:36 +08:00
|
|
|
you can use this book's pages, or if there is no instruction for testing your hardware, please add them to this book.
|
|
|
|
|
|
|
|
## Kasli-SoC (zynq)
|
|
|
|
|
|
|
|
### Checklist
|
|
|
|
|
|
|
|
1. Build firmware (see commands below) for SD card variant
|
|
|
|
2. Copy `results/boot.bin` to the SD card
|
|
|
|
3. Insert SD card to the Kasli-SoC and boot
|
|
|
|
4. Change IP from the default one: `artiq_coremgmt -D 192.168.1.56 config write -s ip 192.168.1.75`
|
|
|
|
5. Reboot and check it works on new IP address
|
|
|
|
6. Test hardware
|
|
|
|
7. Create a flash-drive with `device_db.py` file for customers (FAT32)
|
|
|
|
|
|
|
|
### CLI commands
|
|
|
|
|
|
|
|
```shell
|
|
|
|
mkdir <variant>
|
|
|
|
cd <variant>/
|
|
|
|
git clone gitea@git.m-labs.hk:M-Labs/artiq-zynq.git
|
|
|
|
cd artiq-zynq/
|
|
|
|
git checkout origin/release-7
|
|
|
|
nix develop
|
|
|
|
artiq_ddb_template -o device_db.py <variant>.json
|
|
|
|
nix build -L --impure --expr 'let fl = builtins.getFlake "git+file://<path to artiq_zynq repo>"; in (fl.makeArtiqZynqPackage {target="kasli_soc"; variant="[master, standalone, satellite]"; json=<path to the json description>;}).kasli_soc-[master, standalone, satellite]-sd'
|
|
|
|
# copy `results/boot.bin` to the SD card
|
|
|
|
# insert SD card to the Kasli-SoC and boot
|
2023-04-06 16:43:52 +08:00
|
|
|
artiq_coremgmt -D 192.168.1.56 config write -s ip 192.168.1.75 # or just place extra/CONFIG.TXT near the boot.bin on SD card
|
2023-03-07 13:31:51 +08:00
|
|
|
# update firmware
|
|
|
|
artiq_coremgmt config write -f boot result/boot.bin
|
2023-02-13 14:15:36 +08:00
|
|
|
# reboot via power supply
|
|
|
|
artiq_sinara_tester
|
|
|
|
```
|
|
|
|
|
2023-04-14 11:40:19 +08:00
|
|
|
### Known issues
|
|
|
|
|
|
|
|
* [artiq-zynq#197](https://git.m-labs.hk/M-Labs/artiq-zynq/issues/197) - some cards (Sampler, Mirny, Zotino and others)
|
|
|
|
do not work properly with some EEM ports. You might need to reconnect the card to the other ports until it gets working.
|
|
|
|
|
2023-02-13 14:15:36 +08:00
|
|
|
## Master-satellite setups
|
|
|
|
|
|
|
|
1. Change `base` in JSON to the respective `master` or `satellite`, add `"enable_sata_drtio": true` if needed to the master,
|
|
|
|
remove `core_addr` in satellites
|
|
|
|
2. Build and flash firmware for each crate with JSONs (see instructions above)
|
|
|
|
3. Create composed `device_db.py`: `artiq_ddb_template -o device_db.py -s 1 <satellite1>.json -s 2 <satellite2>.json <master>.json`
|
|
|
|
4. Connect satellite crates to the master respective to their numbers via the fiber (see example picture)
|
|
|
|
![](img/master_sat_connection.jpg)
|
|
|
|
5. Ethernet is needed only for master
|
|
|
|
6. Test hardware as it would be one crate
|