top of page
Writer's pictureJoshua McKelvey

Beginning of an Ambitious Computer

Updated: Feb 16, 2020


I have started working on a new project where I intend to create an entire modern computer from scratch. As this is a rather ambitious goal, I have broken it up into milestones that will measure how advanced my computer design is relative to historical computers. The major milestones include getting Linux running on this computer, enabling a great amount of “real” software to be ported. The next major milestones are a series of game engines created by id software, the DOOM through DOOM 3 engines. I like these as benchmarks because they have great historical significance for being some of the most advanced game engines of their time (1993-2004), but more importantly that they have been open sourced and can be ported to any architecture. While getting the DOOM 3 engine to run may be too large a goal for me to realistically finish, the intent of this project is for me to design as powerful a system as I can. I do not know how far I will be able to get, but I am sure the journey will be enlightening! I have included estimated processor features that I expect that I will need before being able to achieve the accompanying milestone, these being features specific to the processor architecture and implementation. I have also included additional computer features which lists possible peripherals and controllers that I might need to achieve the milestones.

The major focus of the computer design will be on the processor architecture, progressing from a simple in-order microprogrammed version to an out of order superscalar version with a full cache hierarchy. I will also focus on designing a fast memory hierarchy with DRAM controllers. The processor ISA that I will be designing for will be RISC-V, starting with a 32 bit version (RV32I) and working up to a full general purpose version (RV64G). RISC-V is a new, cleanly designed architecture with a great amount of support behind it, making it relatively easy to get software for. The architecture is also an open one, so anyone can design for it. All of these features make it almost the obvious choice for this type of project. While I would have liked to design an ISA from scratch as well, I want to focus on designing hardware and do not want to have to port all of the compilers to it myself.

One of the problems that I will have to figure out is how to approach running the game engines. For DOOM, I will just run the entire engine on the main processor as this was how it was originally designed to work. The later games however are much more demanding; Quake was designed to be able to run on a CPU as well, but Quake III and later are designed to run with OpenGL hardware acceleration. Some options are: using software OpenGL, creating a separate graphics processor with specialized versions of the main processor core, or designing a custom graphics processor. One project already addressing this is https://libre-riscv.org/3d_gpu/microarchitecture/, and is at least a starting point for how I will begin to design this part of the project.

I will be implementing all of these designs in FPGAs starting with less powerful ones featuring ~5K-50K logic elements and potentially reaching designs that use 500K logic elements or more, scaling the designs as the project grows. I will start off using FPGA development boards like the Terasic DE2 as they feature a good amount of logic elements to start off with (35K) and also include a large amount of peripherals such as VGA and SD card ports as well as SRAM and SDRAM. I may eventually design custom PCBs to enable having multiple FPGAs dedicated to CPU, graphics processor, and peripheral controller. I would eventually want to use these designs as a normal computer system, such as a desktop or laptop, so creating custom boards would help enable that.

I have already finished working on a simulation version of the RV32I processor, though I will have to work on simulating some of the other basic components of the computer such as the RAM. The next task to start on is making the first version of the RV32I processor that can run on a FPGA.


18 views0 comments
bottom of page