This repo is to achieve the picorv32 core on the xilinx PYNQ-Z2 board
A "perfect" readme document for you to start the project!
Explore the documentation of this project. »
View Demo
·
Report Bug
·
Issue
Please replace all JacoboJin/RISCV-on-PYNQ-Z2
with your_github_name/your_repository
- Vivado 2021.1 on Windows/Linux
- Serial/SSH softwate (WindTerm)
- PYNQ-Z2 Board (For imagefile, We use PYNQ Image 3.0)
- Git (Windows & Linux Tutorial)
-
Clone the repo
git clone https://github.com/JacoboJin/RISCV-on-PYNQ-Z2.git
-
Create A BitStream
- Firstly, you need to create the vivado project for packaging the pico32 core as picorv32_tut ip. (You can follow those operations outlined in the
notebooks/tutorial/2-Creating-A-Bitstream.ipynb
to complete this task). - Secondly, we have provided an efficient method to complete the overall design by
.tcl
scripts.run ./scripts/pico_processor.tcl
run ./scirpts/pico_bit.tcl
After running the above commands, you must create a wrapper for the design, add constraint files.
- Finally, generate the BitStream file.
You can get more details to the whole project in the
notebooks/tutorial
Folder. Meanwhile, you can also refer to the original project RISC-V-On-PYNQ( Due to some errors in the referenced project in terms of details and code, we have made fixes in this project. We have successfully resolved the issues. Therefore, if there are still any problems, please feel free to create an issue for further discussion.)
- Firstly, you need to create the vivado project for packaging the pico32 core as picorv32_tut ip. (You can follow those operations outlined in the
-
Compiling the RISC-V GCC Toolchain on your PYNQ Board
- connect to the pynq-z2 board by ssh
- run command
cd /home/xilinx/riscv-gnu-toolchain ./configure --prefix=/opt/riscv32imc --with-arch=rv32imc make
- Configure the generated
/opt/riscv32imc/bin
into an environment variable~/.bashrc
by executing the following code in Jupyter Notebooks:
import os path = os.environ['PATH'].split() riscv_path = '/opt/riscv32imc/bin' if(riscv_path not in path): print('Updating /etc/environment file... ',end="") !sed -i 's/PATH=\"\(.*\)\"/PATH=\"\/opt\/riscv32imc\/bin:\1\"/' /etc/environment print('done') else: print("/etc/environment file already updated")
- reboot PYNQ-Z2
shutdown -r now
- Confirm that the RISC-V toolchain has been successfully installed
riscv32-unknown-elf-gcc --version
-
Packaging an Overlay
File Tree
├── ARCHITECTURE.md
├── LICENSE
├── README.md
├── /constrs/
│ ├── PYNQ_Z2.xdc
├── /gold_ip/
│ ├── /pcpi_v1_0/
│ ├── /picobram_if/
│ ├── /picobridge/
│ ├── /picorv32_axi/
│ ├── /picorv32_bram/
├── /ip/
│ ├── /pcpi_v1_0/
│ ├── /picobram_if/
│ ├── /picobridge/
│ ├── /picorv32_axi/
│ ├── /picorv32_bram/
│ ├── /picorv32_tut/
├── /notebooks/
│ ├── /examples/
│ ├── /tutorial/
| │ ├── /pictures/
| │ ├── 0-How-To-RISC-V.ipynb
| │ ├── 1-Downloading-And-Configuring.ipynb
| │ ├── 2-Creating-A-Bitstream.ipynb
| │ ├── 3-Compiling-RISC-V-GCC-Toolchain.ipynb
| │ ├── 4-Packaging-An-Overlay.ipynb
├── /picorv32/
├── /ReadMe-deps/
├── /scripts/
│ ├── build.tcl
│ ├── pico_bit.tcl
│ ├── pico_processor.tcl
├── /templates/
├── useless.md
├── LICENSE
├── README.md
└── /util/
Please read CONTRIBUTING.md to find the developers who have made contributions to this project.
Contributions make the open-source community an excellent place for learning, inspiration, and creativity. Any contributions you make are greatly appreciated.
How to Get Involved in Open Source Projects
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
This project uses Git for version control. You can check the available versions in the repository.
Jin.ZJ @Shanghai University
You can also check the list of contributors to see all the developers involved in this project.
This project is licensed under the MIT License. For details, please refer to the LICENSE file.