Homebrew CPU

Homemade 8 bit CPU with self invented architecture. The processor is built from elementary components like OR, AND and NOT gates. Only in a few modules, like in the memory, more complex components were used because this would save us a significant amount of time. The CPU is stable for speeds up to 4MHz. The interface to the outside world is a serial port, to which a terminal can be attached. The self constructed design also implicated a self made machine language. Several games, like chopper, falldown and snake were written in this language to prove the operation of the cpu.

Untitled-1.psd

The "boxed" edition

teddy12

State of the art terminal

The processor has no registers, all operations are executed directly on the RAM memory. In- and output to the serial port passes through an UART that is coupled to a specific memory address. Writing to that address results in writing to the UART. A single processing instruction consists of four bytes in the stack, and therefore takes up 4 clock pulses:
Byte 2 & 3 contain the memory addresses at which the input for the arithmetic logic unit (ALU) can be found. The fourth byte contains the memory address to which the output of the ALU should be written. The fist byte, or so called ‘instruction byte’ uses 5 bits to code the operation to perform by the ALU. The two LSBs of this byte indicate whether the first and second ALU input pointer bytes do not contain a memory address, but a constant value that should be used. The MSB of this instruction byte indicates a conditional jump. In this case the fourth byte is not a memory address but a stack address to which the stack pointer should be set when the condition was met (or to be more specific: the LSB of the ALU output was 1. This is a rather unconventional choice, but saved us some soldering). In the figure below the timing of the control unit is displayed.

Programmaregel

Timing control unit

The control unit in the center in the processor takes care of the information flow between the different components.

Controle eenheid

Controle eenheid

Started in May 2003.
In cooperation with Freek van Walderveen.
Programmageheugen & -counter, Control Unit, Memory & I/O. Meer info