This project provides a framework for implementing a single-cycle RISC-V processor. It is designed as an educational tool, allowing users to practice writing a CPU by completing the missing components. The framework includes a basic structure with memory and a simple testbench, but requires users to implement core functionalities such as the ALU, register file, and control logic.
- Pre-configured environment for implementing a single-cycle RISC-V CPU.
- Provided components:
- Memory module (Instruction & Data Memory)
- Testbench for simulation
- Missing components that users need to implement:
- core (The single cycle cpu to implement)
- Simple test cases to verify implementation.
Before using this framework, ensure you have the following tools installed:
- Simulation Tools: Python3, Verilator, gtkwave
- For more information, visit - https://www.cocotb.org/, https://github.com/YosysHQ/oss-cad-suite-build
- Clone the repository:
git clone https://github.com/Kaveesha-98/single_cycle_riscv_verification_platform.git cd single_cycle_riscv_verification_platform
- Open the project in your preferred development environment and open the file rtl/core.v.
- Complete the module core.
- Run the simulation using the testbench.
cd sim/cocotb_env/ python -m venv venv cd riscv_test/ pip install -r requirements.txt make (insert file name from target_texts to load instructions) gtkwave dump.vcd
├── rtl
│ ├── core.v # single cycle core to be implemented
│ ├── sim_top.sv # simulation test bench
│
├── sim/cocotb_env/riscv_test
│ ├── target_texts # instructions to be written to memory
│ ├── Makefile # Makefile
│ ├── requirements.txt # python venv requirements
│ ├── sim_top.py # Testbench
│
└── README.md # Readme
Contributions are welcome! If you have improvements or additional test cases, feel free to submit a pull request.