r/FPGA • u/Falcon731 FPGA Hobbyist • Jul 27 '26
Something more than a basic RISC-V
Enable HLS to view with audio, or disable this notification
There have been a few posts recently asking for ideas of what could be the next step after building a basic pipelined RISC-V. So here is what I've been playing with for the past year or so - to give an idea of what is possible at the hobbyist level.
This system has
- Softcore CPU - loosely based on RISC-V, but my own ISA.
- Runs at 125Mhz on a CycloneV FPGA (DE1-SOC but not using the HPS side)
- 4-stage pipeline, plus scoreboard to track inflight instructions and avoid hazards
- Integer and floating point ops
- DCache and ICache, plus region based memory protection
- My own programming language and compiler to target it
- SDRAM controller connected to 64Mb of external memory
- DMA based VGA system
- 640*480 display in 8 bit indexed color
- A hardware blitter (DMA based)
- Can do draw lines / rectangles / and image copy
- Supports X/Y scaling (12 bit fixed point precision) and transparency
- Amiga-style Copper, used to change color palette synced to scanlines
- 8 channel audio (8 bit samples at 44Khz)
- DSP to do frequency scaling, interpolation, volume and mixing
- PS2 mouse / keyboard
- UART (used to load game assets from host PC)
For the software running on it, I've used the game assets (sprites, sounds and track layout) from ReAssembler's port of Outrun to the Amiga, and used them in a fairly simple track racing game.
Sorry for the wobbly video - I was holding phone in one hand whilst playing the game in the other.
EDIT: No AI was used in writing the rtl or the game code (other than autocomplete in vscode). Some AI was used for testcase generation, brainstorming ideas, and for converting the file formats of the game assets.
18
u/dettus_Xx_ Jul 28 '26
What? No question about your CV? 😄
Love the game!!!!
7
u/HuyenHuyen33 Jul 27 '26
Did you run OS on it before running game (software) ?
10
u/IQueryVisiC Jul 27 '26
Wasn’t didn’t every blitter access memory directly ( through Agnes)?
4
u/dmpk2k Jul 28 '26
I dig it. You even made your own language.
Where does your ISA deviate from RISC-V? What was the most painful part of development? Since you're pushing pixels and samples, any thoughts about vector processing? And roughly how many hours a week did you spend on this?
2
u/tudor088 Jul 28 '26
how many bits is the cpu?
1
u/moviefotodude Jul 28 '26
Very nice work. Open source?
1
u/DimensionMaximum988 Jul 29 '26
How many hours did it took you to build it from scratch?
1
u/murixum Jul 29 '26
Impressive. Very nice. Let's see Paul Allen's FPGA.
1
u/Myndale Jul 29 '26
I can hear the music in my head when I watch this.
1
u/Mean_Assistance_5498 Aug 16 '26
This is a lot like what I'm doing...only you are much farther along and actually have a game running on it! I'd love to see what else is possible on your platform.