Skip to content

This repo is to inplemente the riscv soc on the xilinx pynq-z2 board

License

Notifications You must be signed in to change notification settings

JacoboJin/RISCV-on-PYNQ-Z2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PicoRV32-on-PYNQ-Z2

This repo is to achieve the picorv32 core on the xilinx PYNQ-Z2 board

Contributors Forks Stargazers Issues MIT License


Logo

PicoRV32 on Xilinx PYNQ-Z2

A "perfect" readme document for you to start the project!
Explore the documentation of this project. »

View Demo · Report Bug · Issue

Contents

Guide

Please replace all JacoboJin/RISCV-on-PYNQ-Z2 with your_github_name/your_repository

Requirements

Steps

  1. Clone the repo

    git clone https://github.com/JacoboJin/RISCV-on-PYNQ-Z2.git
  2. 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.)

  3. 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
  4. Packaging an Overlay

File Directory

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/

Project Summary

Picorv32 Utilization

Picorv32 Power

Contributors

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

Version Control

This project uses Git for version control. You can check the available versions in the repository.

Author

Jin.ZJ @Shanghai University

You can also check the list of contributors to see all the developers involved in this project.

License

This project is licensed under the MIT License. For details, please refer to the LICENSE file.

Acknowledgements

About

This repo is to inplemente the riscv soc on the xilinx pynq-z2 board

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published