Switching Register
P1001-002 - Switching Register


The major change between Ben Eater’s CPU and mine is I want 16bits on the bus. Which means the registers need to be 16bits. But as Ben’s CPU splits the 8bits into 4bits of memory, and 4bit instruction set. I want a 8 bit instruction set, which means that I had choice between a 8 bit memory space or a 16bit. I decided on the 16bit. Which means that sometimes I want to deal with 8bits and sometimes I want to deal with 16.

When an instruction is read in, the ALU can use the upper bits of the memory address. However, since they are in the upper bits, I need a way to move the upper bits to the lower bits, to process them. So, I’m creating a register that can move data in four ways. The lower 8 bits to the lower 8 bits, the upper 8 bits to the upper 8 bits. Then two other paths, which can put the lower 8 bits into the upper, and the upper to the lower. Sometimes these crossing needs to happen on the input and sometimes on the output.

In the image above the center column is the raw register, it looks very close to Ben’s but 16bits instead of 8 bits. In front of this column is the switchers, which can be inputs to outputs. The lower right section is the register display. This is where I cheat a bit. I want a hex display instead of a line of LEDs. Doing this with raw chips is very big, to shrink this up, I’m using an Atmel Mega to set the LEDs.

The upper right are the gates to decode what direction the front chips move data. The decoders can do a lot of things, however, the control lines, don’t have enough space to do everything, so I’m allowing four outputs: all 16 bits in order, just the low bits, just the high bits, and 16 bits swapped. Though this register board will be used in six locations, only the A and B registers allow five inputs, all 16 bits, just the lower bits (preserving the higher), the higher (preserving the lower) from high to low (preserving high) and low to high (preserving low), and input can clear the register.

Copyright 2018 by James Wright. All Rights Reserved.