RISC-V Education

Creating Project

In this tutorial, you will learn how to develop a basic RISC-V project within the ChipInventor platform. We will cover everything from creating the project and setting up the main modules (processor, memories, registers, etc.) to simulating and testing on hardware. The structure follows the same pattern used in previous tutorials (such as “Distance Sensor” or “DC Motor”).

Initial Steps:

This environment is where you will add all the blocks (Verilog modules) and make the necessary connections to have a functional RISC-V system.

 

Understanding the Project and the Blocks Used

Below are the main blocks that make up our RISC-V project, in a structure similar to the previous tutorials.

The central processor, responsible for fetching, decoding, and executing instructions, as well as handling memory/register reads and writes.

 

Finally, a top module integrates all these components, mapping outputs to physical pins.

 

Connecting the Blocks

To assemble your project in the ChipInventor block diagram:

 

Project Simulation

Before programming your FPGA board, validate the RISC-V operation in simulation:

 

FPGA Synthesis and Programming

After confirming your simulation is correct:

  1. Go to the Synthesize tab.

  2. Select Start Synthesis.

  3. Check that all items turn green (successful synthesis).

  4. Connect your FPGA board to the computer via USB.

  5. Choose the appropriate serial port (often labeled “Enhanced”).

  6. Click Flashing to program the FPGA with the bitstream.

 

Hardware Validation

With the FPGA programmed, proceed to practical testing:

  1. If you use an external clock, ensure it is at the desired frequency. If using one_hz_clock, confirm it is generating a 1 Hz signal.

  2. If you have LEDs or a screen, check if they show expected behavior (e.g., a LED lighting up when the processor writes to memory).

  3. If you have a reset button, verify that pc and registers reset appropriately.

  4. If there is a UART, connect it to a serial interface to observe possible messages or output values.

  5. Adjust the contents of imem (the RISC-V program) or system parameters (clock, reset, bus widths) if needed.

 

Wrapping Up

Congratulations! You have built a basic RISC-V project in ChipInventor. This process included:

From here, you can:

Keep exploring ChipInventor and creating increasingly sophisticated digital design and RISC-V projects!