Simple CPU design

Figure 1: the SimpleCPU processor

Welcome to the world of tomorrow (Link), the past and the present of computer architectures, with a small sprinkling of flashing LEDs. All good computers have to have banks of flashing lights. This web site was inspired by an article by Alan Clements (Link), in this he discusses the pressures faced in teaching computer architectures. After teaching this topic for about 20 years i also came to the same conclusions, although being an electronic engineer i still embrace the power of ICs, wires and LEDs as teaching tools :). Therefore, to hopefully support computer architectures teaching i have created the resources below.

For those who have not taught computer architectures before this may seem an outdated, or redundant topic i.e. why do students need to know what happens inside a CPU, very few students will go on design one? To me this way of thinking highlights the misunderstanding of the purpose of teaching computer architectures. To steal a quote from Alan:

"Computer architecture is awash with concepts that are fundamental to computer science generally and which do not appear in other parts of the undergraduate curriculum. A course in computer architecture can provide a suitable forum for incorporating fundamental principles in the CS curriculum."

Computer architectures for me was never really about hardware design (although its the bit i enjoy the most), its about understanding the complete system, software and hardware. How the software we write is translated into results we can use. I'm a great believer in that you don't truly understand something until you can build it yourself and use it to solve a real world problem. To often i find students that are taught computer science at A-level know the words, but have not had the opportunity of apply this knowledge, therefore, have not had the chance to make those all important final steps to upstanding what the words really mean. Therefore, i designed the SimpleCPU architecture. Over a series of labs students design and implement this architecture using Xilinx's ISE schematic tools, so that you see the wires, not HDL :), configure FPGA boards and program these systems using assembler and macros to solve image processing problems e.g. find Bob the Bug, shown below.

Figure 2 : Bob

To me this is how computer architectures should be taught, a journey from being to end, no hidden details, just simple fundamental computer science, that hopefully everyone can understand. To conclude, i'm not saying that every student has to be able to understand Intels latest and greatest beasts (architectures) to use them, but if you don't have a basic understanding of how data is represented, or how instructions are processed, very strange things can happen when you try to run your code. At best it may just take a little longer to execute, at worst it can take down the whole machine.

Number representations

Boolean Logic

A Simple CPU

Below are a series of blog type discussions on the development of the SimpleCPU processor, their aim is to give an insight into the design decisions made when implementing these machines. To often when discussing computer architectures we use adjectives such as complex, simple e.g. CISC (Link) and RISC (Link). I've grownup with this machine evolution, programmed them and designed a few, so i can place these words into a software and hardware context. For people new to this topic these are just words. What is simple? What is complex? How do you measure/compare these design philosophies? To me this disconnect is a problem. Therefore, being an engineer the only valid solution to teach people these ideas is: build it. In the past building your own processor was a little on the tricky side, but with the advent of programmable logic devices it now a possibility. I hope the source files and discussions below will be the starting point for people wanting to design their own processors and machine languages. These are not intended to be a complete set of notes on computer architectures, rather an introduction to this topic through the implementation of this processor in either SPLD or FPGA devices. A starting point, a foot on the road to CPU design, hopefully highlighting questions about computer architectures people have not considered before. Have fun and don't under estimate he power of the flashing LED, there is nothing more satisfying than convincing a processor to do what you tell it to :).

Teaching Material

Announcements

UPDATE: 26/02/2024 a general update, mostly on the assembler, simpleCPUv1a1, processor datasheets and the simpleCPU_v1e.
UPDATE: 14/02/2024 we were down, now we are back up again, sorry :(.
UPDATE: 01/01/2023 started work on a pipelined version of the SimplCPU.
UPDATE: 13/09/2022 TTL computer. Started to implement a TTL version of the SimpleCPU, however, where i work have "issues" with me using a soldering iron, so work on hold, sometimes i'm lost for words :(
UPDATE: 29/05/2022 SNES controller interface
UPDATE: 23/05/2022 added game of life
UPDATE: 12/04/2022 added a work in progress, space invaders
UPDATE: 27/11/2021 its been a while, joys of Covid, added a new simpleCPU_v1a hello-world example

Contact email: mike@simplecpudesign.com