From 5c05b0c59b51ff76081432bac6f5ac8b09063e0f Mon Sep 17 00:00:00 2001 From: R Veera Kumar Date: Fri, 15 Apr 2022 06:22:52 +0530 Subject: [PATCH] New and full instruction steps for ls2 Hello World microwatt --- HDL_workflow/ls2.mdwn | 76 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 62 insertions(+), 14 deletions(-) diff --git a/HDL_workflow/ls2.mdwn b/HDL_workflow/ls2.mdwn index 451102912..ceb844bab 100644 --- a/HDL_workflow/ls2.mdwn +++ b/HDL_workflow/ls2.mdwn @@ -1,14 +1,62 @@ -# TODO - -* use chroot -* run all nmigen and yosys dev-scripts hdl-dev-repos hdl-tools-yosys - install-hdl-apt-reqs -* run nextpnr-xilinx dev-script and nextpnr-ecp5-install -* run hdl-dev-ls2 dev-script -* git clone microwatt as well -* make hello_world.bin in microwatt and copy it to ls2 -* "make microwatt_external_core" in soc and copy external_core_top.v to ls2 -* plug in FPGA board (Arty A7-100t, VERSA_ECP5, other) -* run in 2nd terminal "minicom -D /dev/ttyUSB1" -* python3 src/ls2.py arty_a7 hello_world.bin (for an Arty A7-100t) -* OR python3 src/ls2.py versa_ecp5 hello_world.bin (for a VERSA_ECP5) +# Steps for Hello World Microwatt ls2 for fpga/boards + +* Currently works for Arty A7-100t, VERSA_ECP5 and in future others + +* Bugzilla page + +## Install Instructions + + git clone https://git.libre-soc.org/git/dev-env-setup.git + cd dev-env-setup + sudo bash + ./mk-deb-chroot ls2-hello-world + ./cp-scripts-to-chroot ls2-hello-world + schroot -c ls2-hello-world + cd ~/dev-env-setup + ./install-hdl-apt-reqs + ./hdl-dev-repos + ./hdl-tools-yosys + ./nextpnr-xilinx-install + export PATH=/usr/local/nextpnr-xilinx/bin:$PATH + export XRAY_DIR=/usr/local/nextpnr-xilinx + ./hdl-dev-ls2 + cd ~/src + cd tercel-qspi/ + cd hello_world/ + make + cp hello_world.bin ../../ls2 + cd ../.. + + pip3 install textx + + # somehow pip3 install of fasm fails, so we manually install + + apt-get install -y wget + wget https://files.pythonhosted.org/packages/78/4c/94fb3bdb87bea21406c0e5da375f0b10d7b1e4b5103cea453a2de23b5d61/fasm-0.0.2.post88.tar.gz + cd fasm-0.0.2.post88 + python3 setup.py install + cd .. + + cd soc + + # pip3 may install newer nmigen from repo which may cause error + # in next step. If so you can run "python3 setup.py develop" + # in nmigen source directory. + + make microwatt_external_core + cp external_core_top.v ../ls2 + cd ../ls2 + git checkout 426e2d9585cd4b1fb96a38987f97878285ee5ba7 + + # plug in FPGA board (Arty A7-100t, VERSA_ECP5, other) + # run in 2nd terminal "minicom -D /dev/ttyUSB1" + + python3 src/ls2.py arty_a7 hello_world.bin + +* this directly programs a tmp bitstream using xc3sprog to nexys4 board +* If needed modify sources to produce a fixed file bitstream and +* cp top.bit to board/server +* xc3sprog -c nexys4 top.bit +* minicom -D /dev/ttyUSB1 + +* Or python3 src/ls2.py versa_ecp5 hello_world.bin (for a VERSA_ECP5) -- 2.30.2