From c1b1af0b0e168710471c8fe716047a2cd6642f68 Mon Sep 17 00:00:00 2001 From: Egor Savkin Date: Thu, 16 May 2024 13:04:05 +0800 Subject: [PATCH 1/4] Add inclusivity/accessibility/user-friendliness tip into `Contributing` Signed-off-by: Egor Savkin --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 84daadc..b5dbdde 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,9 @@ Tips for adding hardware instructions: for images with transparent background) 3. Add link to the new chapter to the `src/SUMMARY.md` 4. Do not forget to tell about all hidden/non-obvious obstacles and pitfalls -5. Add testing steps, even the "obvious" ones -6. Add JSON sample if needed -7. Add hardware setup (e.g. pins, switches) steps if needed -8. View changed and added pages with `mdbook build` (see building instructions above) +5. Avoid using uncommon, complex, or hard-to-understand words, phrases, or grammar (e.g., ❌constituent -> ✔️component). + Keep in mind that these guides may be used by people with different backgrounds and levels of English proficiency. +6. Add testing steps, even the "obvious" ones +7. Add JSON sample if needed +8. Add hardware setup (e.g. pins, switches) steps if needed +9. View changed and added pages with `mdbook build` (see building instructions above) From 1c15fd3941c3c5598c1f140aa9621454848fb84c Mon Sep 17 00:00:00 2001 From: Egor Savkin Date: Mon, 3 Jun 2024 11:01:17 +0800 Subject: [PATCH 2/4] Fix almazny tip after driver fix Signed-off-by: Egor Savkin --- src/hw/mirny_almazny.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hw/mirny_almazny.md b/src/hw/mirny_almazny.md index ec673fd..6be98bf 100644 --- a/src/hw/mirny_almazny.md +++ b/src/hw/mirny_almazny.md @@ -97,4 +97,4 @@ You should also see differences in various modes, but that may require disabling ### Tips -Mirnies often fail `ValueError: MUXOUT not high`, in that case restart the tests or reboot the board(s). \ No newline at end of file +~~Mirnies often fail `ValueError: MUXOUT not high`, in that case restart the tests or reboot the board(s).~~ - fixed in [9569cfb](https://github.com/m-labs/artiq/commit/9569cfb26329c0acdc1705d3256d2506b7bccce5) \ No newline at end of file From 440f687bacb974794e6e62f837b9829458a76898 Mon Sep 17 00:00:00 2001 From: mwojcik Date: Mon, 3 Jun 2024 15:55:58 +0800 Subject: [PATCH 3/4] clarify Xilinx path, flake --- src/hw/mirny_almazny.md | 49 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/src/hw/mirny_almazny.md b/src/hw/mirny_almazny.md index 6be98bf..a66c16a 100644 --- a/src/hw/mirny_almazny.md +++ b/src/hw/mirny_almazny.md @@ -15,6 +15,49 @@ } ``` +## Building firmware + +Once you get your hands on the firmware, you will need to work around few shortcomings of Nix, mainly not being able to run dynamically linked executables. + +You will need: +- Xilinx ISE 14.7 installed on your system (this guide is assuming ``/opt/Xilinx`` path), +- an environment with Migen. + +One way to do it is to create an FHS environment, like ARTIQ does for Vivado, within ARTIQ's ``flake.nix`` (to leverage Migen already being there), by adding these lines: + +``` +iseEnv = pkgs.buildFHSEnv { + name = "ise-env"; + targetPkgs = vivadoDeps; +}; + +ise = pkgs.buildFHSEnv { + name = "ise"; + targetPkgs = vivadoDeps; + profile = "set -e; source /opt/Xilinx/14.7/ISE_DS/settings64.sh"; + runScript = "ise"; +}; +``` + +Add them below ``vivadoEnv``. Then add ``iseEnv`` and ``ise`` to the dev shell's build inputs. Call ``nix develop`` on that. + +Then you can build Mirny: + +```shell +nix develop +ise-env +cd ../mirny # or wherever your source is at +source /opt/Xilinx/14.7/ISE_DS/settings64.sh +python mirny_impl.py +``` + +### Flashing + +```shell +nix-shell -p xc3sprog +xc3sprog -c jtaghs2 -m /opt/Xilinx/14.7/ISE_DS/ISE/xbr/data -v build/mirny.jed +``` + ## Testing ### Without Almazny @@ -49,7 +92,7 @@ After running `artiq_sinara_test`: ![](../img/mirny_gqrx.png) -### With Almazny +### With Almazny (ARTIQ 7) At first, `artiq_sinara_test` will prompt you for testing Mirnies as the would be without Almazny. After that, it will prompt you with testing the Almazny: @@ -97,4 +140,6 @@ You should also see differences in various modes, but that may require disabling ### Tips -~~Mirnies often fail `ValueError: MUXOUT not high`, in that case restart the tests or reboot the board(s).~~ - fixed in [9569cfb](https://github.com/m-labs/artiq/commit/9569cfb26329c0acdc1705d3256d2506b7bccce5) \ No newline at end of file +~~Mirnies often fail `ValueError: MUXOUT not high`, in that case restart the tests or reboot the board(s).~~ - fixed in [9569cfb](https://github.com/m-labs/artiq/commit/9569cfb26329c0acdc1705d3256d2506b7bccce5) + +For Almazny v1.2+ support, CPLD firmware above 0.3.0 (with fixes) must be flashed onto Mirny. \ No newline at end of file From 6bdd0b61ac2cd4f5d7a367bd23584fb0a000b2e6 Mon Sep 17 00:00:00 2001 From: mwojcik Date: Wed, 5 Jun 2024 10:10:49 +0800 Subject: [PATCH 4/4] mirny: add firmware --- src/extra/mirny/mirny-0.3.1.zip | Bin 0 -> 8187 bytes src/hw/mirny_almazny.md | 14 +++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 src/extra/mirny/mirny-0.3.1.zip diff --git a/src/extra/mirny/mirny-0.3.1.zip b/src/extra/mirny/mirny-0.3.1.zip new file mode 100644 index 0000000000000000000000000000000000000000..cd625ec130b6dd5bf1c278fe8039c4b95079149e GIT binary patch literal 8187 zcmZ{pc|4SF*TC%=OIgN*2xBZ$gi$0*4TfPXSwm$@L)Nmd(HM*^Owx>O$-ZY$60&6* zvS*i+os>P>d-r>u=Y8IP-nl>LKG)|y*LCKf^S#cwu5%MZ&j6-j2A%=S77LpH^8?Wc z)3`nGbPu@XeBZ&xpOuD|;SW6x4TA$P$IO(S=9IvdyVwhW{MA!;Z$F!=Nh%u;87#k= zP*>K)v>Q9)s$&4>xm}s=nY-iWs(+^low}+y-Lqb9lSrd;=Y6!el0RqHNSar}e7pF2 z+RIPG_vU}ierc~eBeX8$5&9uC=%jmX#V^x+X8P!8EVj;Y_w9?5!!7^a?)-zdHq#9u zd;SM=9zq_90dt3#vWDb&anjAt8Asi_GfvVxC*Q_)J>D75el}cI=+(44-GaWe`I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