Running DOOM on NEORV32 #1496
Replies: 3 comments 1 reply
-
|
This is very cool, well done! |
Beta Was this translation helpful? Give feedback.
-
|
I've always wanted to port Doom... It's practically a must-have. 😅 So this is really really cool! 👍 2.4 FPS sounds pretty good. What clock speed is the CPU running at? I see that you have quite a few ISA extensions enabled. Does this result in a noticeable performance gain? And do you really need the FPU? Where is the current bottleneck in terms of FPS? |
Beta Was this translation helpful? Give feedback.
-
|
Thank you @stnolting :) The cpu is running at 83.33 MHz. It is the clock derived from the Memory Interface Controller (MIG) which interfaces the SDRAM. Everything is clocked from the MIG except the VGA controller. I have now disabled the FPU in the block design, doom is integer/fixed-point only and also the Makefile didn't use the extension. I capture HPM counters for each frame and print telemetry over UART every 60 frames. The bottleneck is write-through stores to DDR3. Each of the 256k per-frame framebuffer writes stalls the CPU ~39 cycles because there's no store coalescing. A hardware store buffer would probably result in the biggest performance gain. Doom is running a continuous loop of game logic, rendering, and frame buffer conversion. During rendering, it writes the frame into a internal framebuffer The NEORV32 spends 75% of cycles for each frame in To isolate store stalls from load stalls during The loads are nearly identical so the computation pipeline should be fully preserved.
So even though the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey!
I've been having a lot of fun with the NEORV32 on my Arty A7-100 FPGA lately. I recently got the DDR3 SDRAM hooked up to the NEORV32 over AXI, using it for both code and data. This meant I suddenly had 256 MB at my disposal. Naturally, that got me wondering what I could do with all that space. And since DOOM gets ported to pretty much everything, I figured why not to this RISC-V soft-core?
I wrote a VGA subsystem in VHDL for this. There's a DMA engine that pulls the framebuffer out of DDR3, and a VGA controller that pushes out 640x480 @ 60 Hz through a PMOD connector. The WAD file gets loaded off an SD card over SPI at boot, and the game renders into a double-buffered framebuffer sitting in DDR3. Right now it's running at around 2.4 FPS.
https://github.com/vogma/neodoom
doom.mp4
Beta Was this translation helpful? Give feedback.
All reactions