- Board: Cyclone IV EP4CE6E22C8
- Peripherals: * 4-digit 7-segment LED display
- UART interface
- 64 Mbit SDRAM
- Software: Intel Quartus Prime 25.1 (Lite/Free Edition)
- Compile Firmware: Ensure the RISC-V firmware is built first (refer to the [Firmware] section below).
- Open Project: In Quartus, go to
File->Open Projectand selectriscv.qpf. - Start Compilation: Click
Processing->Start Compilation(or use the shortcutCtrl+L). - Program FPGA: Open
Tools->Programmerto write the compiled bitstream to your FPGA board.
Note: Please review the Pin Assignments (
Assignments->Assignment Editor) to ensure they match your specific hardware layout.
- 7-Segment LED: The display will cycle through sequences:
1234->5678-> ... ->CDEF. - UART Output: The same message will be sent via UART at a baud rate of 115200.
- Follow the hardware build steps (1–3) as described above.
- Ensure you are using the
epcs01_simfirmware configuration. - Go to
Tools->Run Simulation Tool->RTL Simulation. - The waveform viewer will open, allowing you to observe pin transitions and signal waves.
- Tip: You can use AI-LLM tools to help interpret specific waveform behaviors.
- OS: WSL2 (Windows Subsystem for Linux) or Native Ubuntu.
Run the following command to install the required compiler and utilities:
sudo apt update
sudo apt install gcc-riscv64-unknown-elf binutils-riscv64-unknown-elf
Generate the .mif (Memory Initialization File) and sync it to the SoC directory:
make clean
make
The build script will automatically copy the generated files to the ../../soc folder.
To inspect the generated assembly code and verify the build, use objdump:
# View the first 60 lines of the assembly code
riscv64-unknown-elf-objdump -d hello.elf | head -n 60