Close

CPU Update: Sticking with 5-stage Pipeline

A project log for Kestrel Computer Project

The Kestrel project is all about freedom of computing and the freedom of learning using a completely open hardware and software design.

samuel-a-falvo-iiSamuel A. Falvo II 07/01/2016 at 00:200 Comments

After some considerations, and some calculations, and mind-experiments, I've decided to just stick with a 5-stage pipeline design. Decoding RISC-V into MISC instructions is certainly possible, and possibly might even use comparable numbers of LUTs and DFFs; however, it would require a 5-read-5-write register file design, which is more complex than your usual 2-read-1-write design for single-issue, in-order pipeline designs.

Oh well. It was worth some thought!

That said, on the flight home last night, I managed to get a significant portion of the RV32I instruction set decoded in a "decode stage" of a 5-stage pipeline. This includes conditional branches, loads, stores, register- and immediate-type ALU operations. Nothing else is decoded yet though, and illegal instructions are not detected.

The operating assumption is that the "execute" stage is just the ALU, and the "writeback" stage is just the register file. I have simple implementations for these stages already, as a part of an earlier design attempt at making a 5-stage pipe.

Things yet to get working include, but is not limited to, the following:

This seems like an awful lot of work, and it is admittedly non-trivial. However, only a few items on this list scare me. Most of this work seems like it ought to be easy to get working.

Discussions