About Legion CPU

Discrete Logic Home Computer

Note that any description here is subject to change, and suggestions for improvements are welcome

Legion is a designed from scratch, home built computer using discrete TTL Logic. It's a personal project (meaning: no deadlines, no promises) to learn about computer design. The end goal is to produce a working 'home computer' with a CPU, video output, keyboard and joystick input.

Inspired by some of the many awesome projects to build working computers starting with the most basic components, Legion is a new hobbby computer and CPU.

Goals

These are the key goals of the project

There are also some 'non-goals'

Key Features

To meet these goals, and my limited ability, these are the key features of Legion.

RISC Instruction Set

Legion has a load and store, RISC instruction set. In fact there are planned to be only two instructions - a conditional operate-and-move, and a memory access instruction. In order to keep performance high, there is no microcode (avoiding microcode lookup penalties). The instruction bit pattern completely describes the data and operations needed to execute the instruction.

The consequence is that Legion uses a wide instruction format - 16 bits. Move instructions take a single cycle, and memory access instructions take two.

Memory Structure

Supporting the 16 bit instruction format, and keeping memory access logic simple, Legion has a 16 bit data bus. It's easier to have two 8 bit memory chips than complex logic to read instructions in two parts.

In order to make it easy to write code directly, Legion avoids a Harvard Architecture, instead having a unified memory map (ROM and RAM) and 16 bit address bus. Code can be loaded and executed from anywhere in memory.

Video Output

To simplify Video output, Legion is synchronised to a standard 25.175 MHz video clock (though the clock is divided down to 3.125MHz). Video access is shared with CPU access, with video data being read on clock-high and instruction/memory access on clock-low.

Therefore, in a clock cycle, a 16 bit word of pixel data can be read. This is output as four, four bit pixels (ie. a 12.5Mhz pixel clock). This gives a resolution of 320x240 - which is compatible with the standard 640x480 VGA mode.

A stretch goal is to have a simple palette look up to enable a wider colour palette (eg. 2 or 3 bit RGB)

Construction

Legion will be built as modules that plug into a 'motherboard'. The motherboard combines busses, power and some control logic. Hopefully incrementally building and testing each module will make the design process more managable. The module construction will be the largest concession to modern techniques, with four plane PCBs that should be more reliable and resistant to noise.