From b0937e0b9ab8f09d912842c09dab0ee6df12d00c Mon Sep 17 00:00:00 2001 From: Filip Kokosinski Date: Tue, 8 Dec 2020 13:16:40 +0100 Subject: [PATCH] xc7: Add README for linux_litex_demo Signed-off-by: Filip Kokosinski --- xc7/linux_litex_demo/README.rst | 59 +++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 xc7/linux_litex_demo/README.rst diff --git a/xc7/linux_litex_demo/README.rst b/xc7/linux_litex_demo/README.rst new file mode 100644 index 0000000..950435d --- /dev/null +++ b/xc7/linux_litex_demo/README.rst @@ -0,0 +1,59 @@ +Linux LiteX demo +~~~~~~~~~~~~~~~~ + +This example design features a Linix-capable SoC based around VexRiscv soft +CPU. It also includes DDR and Ethernet controllers. To build the litex example, +run the following commands: + +.. code-block:: bash + :name: example-litex-deps + + wget https://raw.githubusercontent.com/enjoy-digital/litex/master/litex_setup.py; + chmod +x litex_setup.py; + ./litex_setup.py init; + ./litex_setup.py install; + wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.1.0-2019.01.0-x86_64-linux-ubuntu14.tar.gz; + tar -xf riscv64-unknown-elf-gcc-8.1.0-2019.01.0-x86_64-linux-ubuntu14.tar.gz; + export PATH=$PATH:$PWD/riscv64-unknown-elf-gcc-8.1.0-2019.01.0-x86_64-linux-ubuntu14/bin/; + pushd litex/litex/boards/targets && ./arty.py --toolchain symbiflow --cpu-type vexriscv --build && popd + +To build the linux-litex-demo example, depending on your hardware, run: + +.. code-block:: bash + :name: example-litex-a35t-group + + TARGET="arty_35" make -C linux_litex_demo + +.. code-block:: bash + :name: example-litex-a100t-group + + TARGET="arty_100" make -C linux_litex_demo + +Now you can upload the design with: + +.. code-block:: bash + + openocd -f ${INSTALL_DIR}/conda/share/openocd/scripts/board/digilent_arty.cfg -c "init; pld load 0 top.bit; exit" + +.. note:: + + LiteX on Linux demo excepts you to use IPv4 address of ``192.168.100.100/24`` + on your network interface. + +You should observe the following line in the OpenOCD output + +.. code-block:: bash + + Info : JTAG tap: xc7.tap tap/device found: 0x0362d093 (mfg: 0x049 (Xilinx), part: 0x362d, ver: 0x0) + +In the ``picocom`` terminal, you should observe the following output: + +.. image:: ../../docs/images/linux-example-console.gif + :align: center + :width: 80% + +Additionally, two LED's on the board should be turned on + +.. image:: ../../docs/images/linux-example-arty.jpg + :width: 49% + :align: center