{"id":20981978,"url":"https://github.com/lowrisc/ibex-demo-system","last_synced_at":"2025-04-06T06:06:39.910Z","repository":{"id":64376766,"uuid":"572498260","full_name":"lowRISC/ibex-demo-system","owner":"lowRISC","description":"A demo system for Ibex including debug support and some peripherals","archived":false,"fork":false,"pushed_at":"2025-03-18T13:25:43.000Z","size":8144,"stargazers_count":62,"open_issues_count":31,"forks_count":54,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-03-30T05:03:33.879Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lowRISC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-30T12:05:08.000Z","updated_at":"2025-03-18T13:25:48.000Z","dependencies_parsed_at":"2023-10-16T20:50:55.020Z","dependency_job_id":"d933f238-b559-42f4-a4f0-1e5214a11bb2","html_url":"https://github.com/lowRISC/ibex-demo-system","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lowRISC%2Fibex-demo-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lowRISC%2Fibex-demo-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lowRISC%2Fibex-demo-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lowRISC%2Fibex-demo-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lowRISC","download_url":"https://codeload.github.com/lowRISC/ibex-demo-system/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441042,"owners_count":20939239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T05:42:06.697Z","updated_at":"2025-04-06T06:06:39.892Z","avatar_url":"https://github.com/lowRISC.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ibex Demo System\n\n![Ibex demo system block diagram](doc/IbexDemoSystemBlockDiagram.png \"Ibex demo system block diagram with in the center an Ibex processor connected by a memory bus to the RAM, GPIO, SPI, UART and debug module. Switches, buttons and LEDs are connected to the GPIO. The LCD is driven by SPI. The UART is used for a serial console. Finally, the debug module is used to drive the JTAG.\")\n\nThis an example RISC-V SoC originally targeting the Arty-A7 FPGA board. It comprises the\n[lowRISC Ibex core](https://www.github.com/lowrisc/ibex) along with the\nfollowing features:\n\n* RISC-V debug support (using the [PULP RISC-V Debug Module](https://github.com/pulp-platform/riscv-dbg))\n* UART\n* GPIO\n* PWM\n* Timer\n* SPI\n* A basic peripheral to write ASCII output to a file and halt simulation from software\n\nSupport has been added for several additional FPGA development boards:\n* Arty S7-25 and S7-50\n* Nexys A7-100T\n* Sonata\n* RealDigital Blackboard\n* RealDigital Boolean\n\nDebug can be used via a USB connection to the board. No external JTAG\nprobe is required.\n\n![Arty A7 FPGA showing the Mandelbrot set](doc/ArtyA7WithMandelbrot.png \"Arty A7 FPGA with a Mandelbrot fractal on the LCD screen.\")\n\n## Software Requirements\n\n* Xilinx Vivado - https://www.xilinx.com/support/download.html\n* rv32imc GCC toolchain - lowRISC provides one:\n  https://github.com/lowRISC/lowrisc-toolchains/releases\n  (For example: `lowrisc-toolchain-rv32imcb-20220524-1.tar.xz`)\n* cmake\n* python3 - Additional python dependencies in python-requirements.txt installed with pip\n* openocd (version 0.12.0 or above)\n* screen\n* srecord\n\n## Container Guide\n\nThere is a prebuilt container of tools available you may want to use to get started quickly.\nThere are instructions for building the container for either Docker/Podman located in ./container/README.md.\n\n**Linux/MacOS**\n\nA container image may be provided to you in the form of a tarball.\nYou can load the containerfile by running:\n```bash\nsudo docker load \u003c ibex_demo_image.tar\n# OR\npodman load \u003c ibex_demo_image.tar\n```\n\nIf you already have a container file, you can start the container by running:\n```bash\nsudo docker run -it --rm \\\n  -p 6080:6080 \\\n  -p 3333:3333 \\\n  -v $(pwd):/home/dev/demo:Z \\\n  ibex\n```\nOR\n```bash\npodman unshare chown 1000:1000 -R .\npodman run -it --rm \\\n  -p 6080:6080 \\\n  -p 3333:3333 \\\n  -v $(pwd):/home/dev/demo:Z \\\n  ibex\npodman unshare chown 0:0 -R .\n```\nTo access the container once running, go to [http://localhost:6080/vnc.html](http://localhost:6080/vnc.html).\n\nIf you want to program the FPGA from the container, let's find out which bus and device the Arty is on:\n```bash\n$ lsusb\n...\nBus 00X Device 00Y: ID 0403:6010 Future Technology Devices International, Ltd FT2232C/D/H Dual UART/FIFO IC\n...\n```\nWhere X and Y are numbers.\nPlease note down what X and Y is for you (this will change if you unplug and replug your FPGA).\n\nThen run Docker with the following parameters:\n```bash\nsudo docker run -it --rm \\\n  -p 6080:6080 \\\n  -p 3333:3333 \\\n  -v $(pwd):/home/dev/demo:Z \\\n  --privileged \\\n  --device=/dev/bus/usb/00X/00Y \\\n  --device=/dev/ttyUSB1 \\\n  ibex\n```\n\n**Windows**\n\nRun a command prompt in administrator mode and type:\n```powershell\ncd \"C:\\Program Files\\Docker\\Docker\"\n.\\DockerCli.exe -SwitchLinuxEngine\n```\n\nIn case you have a tarball of the docker image, run:\n```powershell\ndocker load -i ibex_demo_image.tar\n```\n\nGo to the folder where you have decompressed the demo system repository:\n```powershell\ndocker run -it --rm -p 6080:6080 -p 3333:3333 -v %cd%:/home/dev/demo:Z ibex\n```\n\n## Add udev rules for our device\nFor both the container and the native setups you will need to add user device permissions for our FPGA board.\nThe following instructions are for Linux-based systems and are needed for the programmer to access the development board.\n\nArty-A7\n```bash\n\nsudo su\ncat \u003c\u003cEOF \u003e /etc/udev/rules.d/90-arty-a7.rules\n# Future Technology Devices International, Ltd FT2232C/D/H Dual UART/FIFO IC\n# used on Digilent boards\nACTION==\"add|change\", SUBSYSTEM==\"usb|tty\", ATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"6010\", ATTRS{manufacturer}==\"Digilent\", MODE=\"0666\"\n\n# Future Technology Devices International, Ltd FT232 Serial (UART) IC\nACTION==\"add|change\", SUBSYSTEM==\"usb|tty\", ATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"6001\", MODE=\"0666\"\nEOF\n\nexit\n```\n\nRealDigital Boolean and Blackboard\n```bash\n\nsudo su\ncat \u003c\u003cEOF \u003e /etc/udev/rules.d/90-realdigital.rules\n# Future Technology Devices International, Ltd FT2232C/D/H Dual UART/FIFO IC\n# used on RealDigital boards\nACTION==\"add|change\", SUBSYSTEM==\"usb|tty\", ATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"6010\", ATTRS{manufacturer}==\"Xilinx\", MODE=\"0666\"\nEOF\n\nexit\n```\n\nopenFPGAloader\n```bash\nsudo su\ncat \u003c\u003cEOF \u003e /etc/udev/rules.d/99-openfpgaloader.rules\n# Copy this file to /etc/udev/rules.d/\n\nACTION!=\"add|change\", GOTO=\"openfpgaloader_rules_end\"\n\n# gpiochip subsystem\nSUBSYSTEM==\"gpio\", MODE=\"0664\", GROUP=\"plugdev\", TAG+=\"uaccess\"\n\nSUBSYSTEM!=\"usb|tty|hidraw\", GOTO=\"openfpgaloader_rules_end\"\n\n# Original FT232/FT245 VID:PID\nATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"6001\", MODE=\"664\", GROUP=\"plugdev\", TAG+=\"uaccess\"\n\n# Original FT2232 VID:PID\nATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"6010\", MODE=\"664\", GROUP=\"plugdev\", TAG+=\"uaccess\"\n\n# Original FT4232 VID:PID\nATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"6011\", MODE=\"664\", GROUP=\"plugdev\", TAG+=\"uaccess\"\n\n# Original FT232H VID:PID\nATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"6014\", MODE=\"664\", GROUP=\"plugdev\", TAG+=\"uaccess\"\n\n# Original FT231X VID:PID\nATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"6015\", MODE=\"664\", GROUP=\"plugdev\", TAG+=\"uaccess\"\n\n# anlogic cable\nATTRS{idVendor}==\"0547\", ATTRS{idProduct}==\"1002\", MODE=\"664\", GROUP=\"plugdev\", TAG+=\"uaccess\"\n\n# altera usb-blaster\nATTRS{idVendor}==\"09fb\", ATTRS{idProduct}==\"6001\", MODE=\"664\", GROUP=\"plugdev\", TAG+=\"uaccess\"\nATTRS{idVendor}==\"09fb\", ATTRS{idProduct}==\"6002\", MODE=\"664\", GROUP=\"plugdev\", TAG+=\"uaccess\"\nATTRS{idVendor}==\"09fb\", ATTRS{idProduct}==\"6003\", MODE=\"664\", GROUP=\"plugdev\", TAG+=\"uaccess\"\n\n# altera usb-blasterII - uninitialized\nATTRS{idVendor}==\"09fb\", ATTRS{idProduct}==\"6810\", MODE=\"664\", GROUP=\"plugdev\", TAG+=\"uaccess\"\n# altera usb-blasterII - initialized\nATTRS{idVendor}==\"09fb\", ATTRS{idProduct}==\"6010\", MODE=\"664\", GROUP=\"plugdev\", TAG+=\"uaccess\"\n\n# dirtyJTAG\nATTRS{idVendor}==\"1209\", ATTRS{idProduct}==\"c0ca\", MODE=\"664\", GROUP=\"plugdev\", TAG+=\"uaccess\"\n\n# Jlink\nATTRS{idVendor}==\"1366\", ATTRS{idProduct}==\"0105\", MODE=\"664\", GROUP=\"plugdev\", TAG+=\"uaccess\"\n\n# NXP LPC-Link2\nATTRS{idVendor}==\"1fc9\", ATTRS{idProduct}==\"0090\", MODE=\"664\", GROUP=\"plugdev\", TAG+=\"uaccess\"\n\n# NXP ARM mbed\nATTRS{idVendor}==\"0d28\", ATTRS{idProduct}==\"0204\", MODE=\"664\", GROUP=\"plugdev\", TAG+=\"uaccess\"\n\n# icebreaker bitsy\nATTRS{idVendor}==\"1d50\", ATTRS{idProduct}==\"6146\", MODE=\"664\", GROUP=\"plugdev\", TAG+=\"uaccess\"\n\n# orbtrace-mini dfu\nATTRS{idVendor}==\"1209\", ATTRS{idProduct}==\"3442\", MODE=\"664\", GROUP=\"plugdev\", TAG+=\"uaccess\"\n\nLABEL=\"openfpgaloader_rules_end\"\n\nEOF\n\nexit\n\n```\n\nRun the following to reload the rules:\n\n```bash\nsudo udevadm control --reload-rules\nsudo udevadm trigger\n```\n\nAdd user to plugdev group:\n```bash\nsudo usermod -a $USER -G plugdev\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eInstalling environment using Nix (*alternative*)\u003c/summary\u003e\n\n## Nix Environment Setup\n\nAn alternative system for installing all of the project dependencies is\nprovided using the Nix package manager. Once installed and the dependencies\nare fetched from the internet, you can enter a shell with all of the software\nrequired for building by running the command `nix develop` in the root\ndirectory of the project. To leave this environment, simply run `exit`.\n\n### Installing\n\n#### Installing Nix\n```bash\n# Run the recommended nix multi-user installation\n# https://nixos.org/download.html\n# This is an interactive installer, just follow the prompts...\nsh \u003c(curl -L https://nixos.org/nix/install) --daemon\n\n# Add some global configuration to nix to make use of the flakes and CLI experimental features.\nmkdir -p $HOME/.config/nix\ncat \u003c\u003cEOF \u003e $HOME/.config/nix/nix.conf\nexperimental-features = nix-command flakes\nwarn-dirty = false\nEOF\n\n# Disable signatures when using nix copy to import from a store\n# This allows us to easily import from a cache on a local USB\nsudo su\nmkdir -p /etc/nix\ncat \u003c\u003cEOF \u003e\u003e /etc/nix/nix.conf\nrequire-sigs = false\nEOF\nexit\n\n# Reload the nix daemon to commit the config above\nsudo systemctl restart nix-daemon.service\n\n# You may now need to reload your shell, but check that nix is working by running this:\nnix --version\n\u003e nix (Nix) 2.12.0\n```\n\n#### Installing Vivado using Nix\n```bash\n# Go to the Xilinx.com website\n# https://www.xilinx.com/support/download.html\n# Download the 2022.2 Unified Installer for Linux\n# The link looks like:\n# \u003cXilinx Unified Installer 2022.2: Linux Self Extracting Web Installer (BIN - 271.02 MB)\u003e\n# The download link will be similar to:\n# https://www.xilinx.com/member/forms/download/xef.html?filename=Xilinx_Unified_2022.2_1014_8888_Lin64.bin\n# - You will need to register on the website to download this file.\n\n# Once the download is complete...\ncd \u003clocation/of/downloaded/file\u003e\n\n# Extract the installer to a local temporary directory\nPREFIX=/tmp/xilinx\nVERSION=2022.2\nINSTALLER=\"\u003cdownloaded/file\u003e\"  # This should match the download\nINSTALLER_EXTRACTED=\"${PREFIX}/extracted\"\nmkdir $PREFIX\nchown -R $USER:$USER $PREFIX $INSTALLER\nchmod +x $INSTALLER\n./$INSTALLER --keep --noexec --target $INSTALLER_EXTRACTED\n\n# Now run this installer graphically, to create a new bundled-installer with the device support we need for the Arty-A7.\nINSTALLER_BUNDLED=\"$PREFIX/bundled\"\npushd $INSTALLER_EXTRACTED\n./xsetup\npopd\n```\n\n- Running './xsetup' above should have popped up the graphical installation wizard.\n  1. Page '\u003cLANDING_PAGE\u003e'\n     1. Select 'Next \u003e'\n  2. Page 'Select Install Type'\n     1. Enter email/password for 'User Authentication' (register on Xilinx.com)\n     2. Select the radio-box 'Download Image (Install Seperately)'\n     3. Select the download directory as '/tmp/xilinx/bundled' (the value from $INSTALLER_BUNDLED, See above)\n     4. Under 'Download fields to create full image for selected platform(s)', select 'Linux' only.\n     5. Under 'Image Contents', select 'Selected Product Only'\n     6. Select 'Next \u003e'\n  3. Page 'Select Product to Install'\n     1. Select the radio-box 'Vivado' only\n     2. Select 'Next \u003e'\n  4. Page 'Select Edition to Install'\n     1. Select the radio-box 'Vivado ML Standard'\n     2. Select 'Next \u003e'\n  5. Page 'Vivado ML Standard'\n     1. Ensure only the following boxes are selected....\n        1. Design Tools - Vivado Design Suite - {Vivado, Vitis HLS}\n        2. Devices - Production Devices - 7 Series - {Artix7, Kintex7, Spartan7}\n        3. Installation Options\n     2. Select 'Next \u003e'\n  6. Page 'Download Summary'\n     1. Check the download is approx 13GB.\n     1. Select 'Download'\n\n```bash\n# Now we have created a bundled installer for Vivado, we need to add this to the nix store\n\n# The easiest way to get the data into the nix store is by creating an archive...\npushd $PREFIX\nBUNDLED_ARCHIVE=\"$PREFIX/vivado_bundled.tar.gz\"\n# (You may need to install 'pigz' for this step, e.g. 'sudo apt install pigz')\ntar cf $BUNDLED_ARCHIVE -I pigz --directory=$(dirname $INSTALLER_BUNDLED) ./$(basename $INSTALLER_BUNDLED)\n\n# Now add using 'nix-prefetch-url'\nVIVADO_BUNDLED_HASH=$(nix-prefetch-url --type sha256 file:$BUNDLED_ARCHIVE)\n\n# The value of this hash will be needed for the next step.\necho $VIVADO_BUNDLED_HASH\npopd\n```\n\n#### Install dependencies and activate our environment\nWe can use the nix flake.nix recipe to build our environment.\n```bash\ngit clone git@github.com:lowRISC/ibex-demo-system.git\ncd ibex-demo-system\n\n# [OPTIONAL]\n# Copy dependencies from a pre-prepared USB stick to compensate for bad internet\n# The hash below is the expected hash of the lab dependencies\nusb_path=\"\u003cpath/to/usb\u003e\" # e.g. \"/media/harry/KINGSTON\"\nnix copy \\\n  --no-require-sigs \\\n  --from file://${usb_path}/nix/store/ \\\n  /nix/store/kx1qnhs2b6ikn5s4mj7jpj84rasqwc2h-labenv\n\npushd dependencies \u0026\u0026 nix flake update \u0026\u0026 popd \u0026\u0026 nix flake update\nnix develop\n\n# Once it completes,you should see the lowRISC logo, followed by...\n# \u003e\u003e ------------------------------------------------- \u003c\u003c\n# \u003e\u003e Welcome the the ibex-demo-system nix environment! \u003c\u003c\n# \u003e\u003e ------------------------------------------------- \u003c\u003c\n\n# You are now in a shell with all the tools required to do the lab.\n\n# To exit this shell environment when you are done, simply run\nexit\n\n# Bonus Nix\n# Use nix-tree to interactively examine all dependencies of the demo.\nnix run nixpkgs#nix-tree -- .#devShells.x86_64-linux.default --derivation\n```\n\nVivado-specific change (only needed if enabled in flake.nix):\n```bash\n# Run this before the `nix flake update` above.\n\n# Update the flake.nix with the hash ($VIVADO_BUNDLED_HASH) of the vivado installer\n# (We need to update just the sha256 hash input of requireFile function.)\nsed -i -- \"s|sha256\\s=\\s\\\".*\\\";|sha256 = \\\"$VIVADO_BUNDLED_HASH\\\";|g\" dependencies/flake.nix\n```\n\n\u003c/details\u003e\n\n## Native Python Environment\n\n(NOT NEEDED IN THE CONTAINER ENVIRONMENT)\n\nTo install python dependencies use pip, you may wish to do this inside a virtual\nenvironment to avoid disturbing you current python setup (note it uses a lowRISC\nfork of edalize and FuseSoC so if you already use these a virtual environment is\nrecommended):\n\n```bash\n# Setup python venv\npython3 -m venv .venv\nsource .venv/bin/activate\n\n# Install python requirements\npip3 install -r python-requirements.txt\n```\n\nYou may need to run the last command twice if you get the following error:\n`ERROR: Failed building wheel for fusesoc`\n\n\n## Building Software\n\n### C stack\n\nFirst the software must be built.\nThis can be loaded into an FPGA to run on a synthesized Ibex processor, or passed\nto a verilator simulation model to be simulated on a PC.\n\n```\nmkdir sw/c/build\npushd sw/c/build\ncmake ..\nmake\npopd\n```\n\n### Rust stack\n\n```sh\npushd sw/rust\ncargo build --bin led\npopd\n```\nFor more details, please refer to [Ibex Rust stack](sw/rust/README.md).\n\nNote the FPGA build relies on a fixed path to the initial binary (blank.vmem) so\nif you want to create your build directory elsewhere you need to adjust the path\nin `ibex_demo_system.core`\n\n## Building Simulation\n\nThe Demo System simulator binary can be built via FuseSoC. From the Ibex\nrepository root run:\n\n```sh\nfusesoc --cores-root=. run --target=sim --tool=verilator --setup --build lowrisc:ibex:demo_system\n```\n\n## Running the Simulator\n\nHaving built the simulator and software, to simulate using Verilator we can use the following commands.\n`\u003csw_elf_file\u003e` should be a path to an ELF file  (or alternatively a vmem file)\nbuilt as described above. Use `./sw/c/build/demo/hello_world/demo` to run the `demo`\nbinary.\n\nRun from the repository root run:\n```sh\n# For example :\n./build/lowrisc_ibex_demo_system_0/sim-verilator/Vtop_verilator \\\n  --meminit=ram,./sw/c/build/demo/hello_world/demo\n\n# You need to substitute the \u003csw_elf_file\u003e for a binary we have build above.\n./build/lowrisc_ibex_demo_system_0/sim-verilator/Vtop_verilator [-t] --meminit=ram,\u003csw_elf_file\u003e\n```\n\nPass `-t` to get an FST trace of execution that can be viewed with\n[GTKWave](http://gtkwave.sourceforge.net/).\n\n```\nSimulation statistics\n=====================\nExecuted cycles:  5899491\nWallclock time:   1.934 s\nSimulation speed: 3.05041e+06 cycles/s (3050.41 kHz)\n\nPerformance Counters\n====================\nCycles:                     457\nNONE:                       0\nInstructions Retired:       296\nLSU Busy:                   108\nFetch Wait:                 20\nLoads:                      53\nStores:                     55\nJumps:                      21\nConditional Branches:       12\nTaken Conditional Branches: 7\nCompressed Instructions:    164\nMultiply Wait:              0\nDivide Wait:                0\n```\n\n## Building FPGA bitstream\n\nFuseSoC handles the FPGA build. Vivado tools must be setup beforehand. From the\nrepository root:\n\n```\nfusesoc --cores-root=. run --target=synth --setup --build lowrisc:ibex:demo_system\n```\n\nThe default board is the Arty A7, but you can also use different synthesis targets for supported boards.\nCurrently supported targets:\n\n| Board | Target |\n| -------- | ------- |\n| Arty S7-25 | `synth_artys7-25` |\n| Arty S7-50 | `synth_artys7-50` |\n| Nexys A7-100T | `synth_nexysa7` |\n| Sonata | `synth_sonata` |\n| Blackboard | `synth_blackboard` |\n| Boolean | `synth_boolean` |\n\n## Programming FPGA\n\nTo program the FPGA, either use FuseSoC again\n\n```\nfusesoc --cores-root=. run --target=synth --run lowrisc:ibex:demo_system\n\n# If the above does not work, try executing the programming operation manually with:\nmake -C ./build/lowrisc_ibex_demo_system_0/synth-vivado/ pgm\n```\n\nReplace `synth` in the fuseoc or make invocation with the appropriate target if you are use an alternative board.\n\nYou can also use [OpenFPGALoader](https://github.com/trabucayre/openFPGALoader), here are some example commands:\n```\n# Programming the Arty A7\n./openFPGALoader -b arty_a7_35t build/lowrisc_ibex_demo_system_0/synth-vivado/lowrisc_ibex_demo_system_0.bit\n\n# Programming the Sonata board\n./openFPGALoader -c ft4232 build/lowrisc_ibex_demo_system_0/synth_sonata-vivado/lowrisc_ibex_demo_system_0.bit\n\n# Programming the Blackboard board\n./openFPGALoader -c ft4232 build/lowrisc_ibex_demo_system_0/synth_blackboard-vivado/lowrisc_ibex_demo_system_0.bit\n\n# Programming the Boolean board\n./openFPGALoader -c ft4232 build/lowrisc_ibex_demo_system_0/synth_boolean-vivado/lowrisc_ibex_demo_system_0.bit\n```\n\n## Loading an application to the programmed FPGA\n\nThe `util/load_demo_system.sh` script can be used to load and run an application.\nYou can choose to immediately run it or begin halted, allowing you to attach a debugger.\n\n```bash\n# Run demo\n./util/load_demo_system.sh run ./sw/c/build/demo/hello_world/demo\n./util/load_demo_system.sh run ./sw/c/build/demo/lcd_st7735/lcd_st7735\n\n# Load demo and start halted awaiting a debugger\n./util/load_demo_system.sh halt ./sw/c/build/demo/hello_world/demo\n\n# Run demo on the Sonata board\n./util/load_demo_system.sh run ./sw/c/build/demo/hello_world/demo ./util/sonata-openocd-cfg.tcl\n\n# Run demo on the Blackboard board\n./util/load_demo_system.sh run ./sw/c/build/demo/hello_world/demo ./util/boolean-openocd-cfg.tcl\n\n# Run demo on the Boolean board\n./util/load_demo_system.sh run ./sw/c/build/demo/hello_world/demo ./util/boolean-openocd-cfg.tcl\n```\n\nTo view terminal output use screen:\n\n```bash\n# Look in /dev to see available ttyUSB devices\nscreen /dev/ttyUSB1 115200\n```\n\nIf you see an immediate `[screen is terminating]`, it may mean that you need super user rights.\nIn this case, you may try using `sudo`.\n\nTo exit from the `screen` command, you should press `ctrl-a` followed by `k`.\nYou will need to confirm the exit by pressing `y`.\n\n## Debugging an application\n\nEither load an application and halt (see above) or start a new OpenOCD instance:\n\n```\nopenocd -f util/arty-a7-openocd-cfg.tcl\n```\n\nThen run GDB against the running binary and connect to `localhost:3333` as a remote target:\n\n```bash\nriscv32-unknown-elf-gdb ./sw/c/build/demo/hello_world/demo\n\n(gdb) target extended-remote localhost:3333\n```\n\n## Board-specific notes\n\n### Realdigital Blackboard\n\nThe Blackboard uses a Zynq 7000 series SoC and the serial is routed to the PS rather than the PL.\nWhile it could be possible to access the serial through the PS using AXI, the current implementation maps serial to the PMODC header.\n\nThe mapping follows the [Pmod Interface Type 3 (UART) pinout](https://digilent.com/reference/_media/reference/pmod/pmod-interface-specification-1_3_1.pdf) for the Digilent Pmod USBUART interface ([Digilent 410-212](https://digilent.com/shop/pmod-usbuart-usb-to-uart-interface/)), but any 3.3V USB-UART interface can be used.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flowrisc%2Fibex-demo-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flowrisc%2Fibex-demo-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flowrisc%2Fibex-demo-system/lists"}