m-labs / artiq

A leading-edge control system for quantum information experiments
https://m-labs.hk/artiq
GNU Lesser General Public License v3.0
422 stars 193 forks source link

phaser2 configure device using openocd #643

Closed jbqubit closed 7 years ago

jbqubit commented 7 years ago

This regards phaser2 branch.

jbqubit commented 7 years ago

@jordens from your email I resolved the second two

(phaser2) britton@britton1:~/artiq-dev-phaser2/artiq/artiq/examples/phaser$ artiq_mkfs phaser_config.bin -s mac 00:0a:35:03:1e:53 -s ip 192.168.1.71 -s startup_clock i -f startup_kernel startup_kernel.elf

(phaser2) britton@britton1:~/artiq-dev-phaser2/artiq/artiq/examples/phaser$ openocd -f board/kc705.cfg -s ~/anaconda3/envs/phaser2/share/openocd/scripts -c "init; jtagspi_program phaser_config.bin 0xb80000; xc7_program xc7.tap; exit"

Regarding test mode... Do you intend to dump test mode here forward?

jordens commented 7 years ago

There should be a jtagspi_init 0 /path/to/bscan_spi_xc7k325t.bit after the init.

Test mode was removed in the move to rust. I did like it and miss it as well but it was a bit tedious to maintain and hard to test itself.

whitequark commented 7 years ago

We can bring back test mode if there's enough interest, there's no fundamental reason for its removal.

jbqubit commented 7 years ago

Ah, thanks Robert.

(phaser2) britton@britton1:~/artiq-dev-phaser2/artiq/artiq/examples/phaser$ 
artiq_mkfs phaser_config.bin \
-s mac 00:0a:35:03:1e:53 \
-s ip 192.168.1.71 \
-s startup_clock i \
-f startup_kernel startup_kernel.elf

(phaser2) britton@britton1:~/artiq-dev-phaser2/artiq/artiq/examples/phaser$ 
openocd -f board/kc705.cfg -s ~/anaconda3/envs/phaser2/share/openocd/scripts -c "init; \
jtagspi_init 0 /home/britton/.migen/bscan_spi_xc7k325t.bit; \
jtagspi_program phaser_config.bin 0xb80000; \
xc7_program xc7.tap; \
exit"

I've found the Test Mode useful in a number of circumstances and would miss its absence. This is in part a result of familiarity with that path for configuring MAC/IP and doing simple LED/IO toggle tests. I can see that openocd is a clear alternate path for setting MAC/IP.