Posts

Control Design: Fetch and Increment

Image
The design of the computer's memory, incrementer and program counter are now complete but there's one last piece of the 'puzzle' required to get the computer running a program. The controller now needs updating to orchestrate the 'fetch and increment' cycle. This cycle retrieves the next instruction from memory (into the instruction register) and then increments the program counter to point at the next instruction in memory. In this post I'll cover the changes needed to the controller cards to implement this cycle.

The fetch/increment cycle consists of the following steps:
Select Program Counter on to Address Bus and whilst keeping selected:Read Memory on to Data Bus and whilst keeping read:Load Instruction RegisterLoad Increment Register (from incremented address bus value)Select Increment Register and whilst keeping selected:Load Program Counter Visualising these steps as a timing diagram we get the following:
As with the ALU, SETAB and MOV-8 instruction …

Memory Design (Part 2 of 2)

Image
In my last post I started the design for the computer's memory unit which is spread over two cards. With the lower memory card design in place its now time to finish the job and design the upper card which will interface the rest of the computer with the memory chip of the lower card.

Let's dive straight in by bringing up the board interconnects from the lower card:
The left two columns bring up the address bus for the memory chip which needs to be at 5V for a logic 1 and at ground for a logic 0. The third column brings up the outbound data bus which will sink 12V to ground for a logic 1 but holds at 12V for a logic 0 (effectively an inverse of what you'd expect). The fourth column brings up the inbound data bus which takes 5V for 1 and ground for 0 along with the write enable (WE) control line and output enable (OE) line which work in reverse (5V for disabled and ground for enabled). The last three connects to the right are power at 12V, ground for 5V and finally 5V. As y…

Memory Design (Part 1 of 2)

Image
In my last post I explained my decision to use a 'modern' memory chip in my relay computer ... I also alluded to there being some complexities in interfacing the rest of the computer with that memory chip. The memory unit will be spread over two cards and in this post I cover the design of the first half and expand on those 'complexities' a bit.

The memory chip I'm using is from the '62' family of CMOS 256Kbit (32K x 8) Static RAM ... effectively meaning it can store 32,768 separate 8 bit values referenced by a 15bit address bus. Buying chips can be a bit of a 'needle in a haystack' when you're buying through one of the larger electronics suppliers (I use Mouser). Knowing the chip number isn't enough to actually buy one and doing a search on Mouser for '62256 memory' narrows it down to 61 matches. I can narrow it down further as I know I need through-hole mounting (not surface mount) and that gets me to 6 matches. Next choice is acc…

The problem with memory

Image
It's time, at last, to start looking at the design for the computer's memory and this is a bit of a game changer as it's the final part of the jigsaw that lets the computer run a program. However, it's also the part of the computer that leaves me in a bit of a quandary.

The problem with memory is that typically you need quite a lot of it and that's something that doesn't come easy with relays. In a way the registers already present in the computer are a kind of memory ... they store a single byte of data. So, effectively you can get two bytes worth of storage on one of the usual computer cards. You can maybe see where this is going.

Each instruction in a program takes a byte of memory therefore a 10 line program needs 10 bytes of memory. How long does a program need to be? Well is depends but for this kind of computer 20 to 30 wouldn't be unreasonable it you're going to do something 'interesting'. It's not just the instructions that need sto…

More Laser Cut Parts

Image
I've nearly got the design for the memory cards done and ready to share but once that's out the way it'll be time to get on with some construction again. With that in mind I cracked out the credit cards and got buying more relays plus some other bits and bobs and whilst I was in a spending mood I decided it was high time to treat the computer to some more laser cut parts.

The two displays (A and B) in the upper enclosure have been looking a bit 'unfinished' and it was always my intention to get some laser cut panels made up eventually which would surround the switches and LEDs and give it a more 'polished' look. Additionally the panels would also carry an engraved legend to explain what each group of switches/LEDs represents in the displays. The process for making these is just the same as before when I got the laser cut panel for the primary switches.

As before I've chosen to get my laser cutting done through RazorLab who provide starter templates for …

Incrementer Design

Image
In my last post I covered the design of the 16-bit half adder which takes whatever value is currently on the address bus and increments it by one. To make this incremented value useable we need to create a register so that we can store the value ready for pushing back on to the address bus. Typically this incremented value would then be loaded into the program counter to get it ready for the next instruction in memory.

By now you're probably sick of seeing register designs (I know I am) and this particular register is similar to all the other registers seen so far in the computer. Just like the program counter this register holds a single 16-bit value which can be gated on to the address bus. The main difference here is that the register is loaded directly from the 16-bit half adder via an inter-card connector. Here's the design for this register:
As with other register cards the relays that latch each bit value are on the bottom half of the card with bit 0 at the bottom righ…

Incrementer Design: 16-bit Half Adder

Image
In the last post I introduced the design for the 1-bit Half Adder. This post covers connecting sixteen of these units together to make the 16-bit Half Adder.

So, diving straight in, here is what sixteen of the 1-bit Half Adder units look like all together on the usual 55 x 40 hole pad board:
Each half adder bit is made up of two relays (as seen in the previous blog post) and starting at the bottom right of the diagram above the bit stages run upwards from 0 to 3 and then continuing on in rising columns to the left until bit 15 at the top left. Between each bit the carry out lines of the prior bit are connected to the carry in and the carry out lines connect to the carry in of the next bit effectively chaining each bit together to form a ripple carry adder circuit.

We can now connect up the inputs and outputs of the 16-bit half adder as follows:
Each bit of the half adder is directly connected to the address bus meaning that the adder is always active even when the output isn't ne…