2020-12-08 07:16:40 -05:00
Linux LiteX demo
~~~~~~~~~~~~~~~~
2021-01-18 17:24:15 -05:00
This example design features a Linux-capable SoC based around VexRiscv soft
2020-12-08 07:16:40 -05:00
CPU. It also includes DDR and Ethernet controllers. To build the litex example,
run the following commands:
.. code-block :: bash
:name: example-litex-deps
2021-01-19 10:57:43 -05:00
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/
cd litex-boards/litex_boards/targets
2021-03-26 04:22:07 -04:00
./digilent_arty.py --toolchain symbiflow --cpu-type vexriscv --build
2021-01-19 10:57:43 -05:00
cd -
2020-12-08 07:16:40 -05:00
2021-06-01 16:40:57 -04:00
To build the linux-litex-demo example, first re-navigate to the directory that contains examples for Xilinx 7-Series FPGAs. Then depending on your hardware, run:
2020-12-08 07:16:40 -05:00
.. 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
2020-12-21 05:37:59 -05:00
At completion, the bitstreams are located in the build directory:
.. code-block :: bash
cd linux_litex_demo/build/<board>
2020-12-08 07:16:40 -05:00
Now you can upload the design with:
.. code-block :: bash
2020-12-21 05:37:59 -05:00
openocd -f ${INSTALL_DIR}/${FPGA_FAM}/conda/envs/${FPGA_FAM}/share/openocd/scripts/board/digilent_arty.cfg -c "init; pld load 0 top.bit; exit"
2020-12-08 07:16:40 -05:00
.. note ::
2021-03-03 20:50:38 -05:00
LiteX on Linux demo expects you to use IPv4 address of `` 192.168.100.100/24 ``
2020-12-08 07:16:40 -05:00
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