A new new new simple computer

Hey everyone,

I know, im that bad! This is my FIFTH CPU design. This time, im keeping to kiss (keep it simple stupid). I have spent time designing this one internal bus four bit computer. It has a small number of instructions as listed below:

Code:
Add(ab):
Adds the two registers A and B together and placing the result in a

Add(an):
Adds the operand to the register a and place the result into a

Sub(ab):
Subtracts the two registers A and B together and placing the result in a

Sub(an):
Subtracts the operand to the register a and place the result into a

LD A:
Sets register A to a value:

LD B:
Sets register B to a value:

LD (n),A:
Saves register A to location n:

LD A,(n):
Loads register A form location n:

JP Z:
Jump to n if the zero flag is set

JP NZ:
Jump to n if the negated zero flag is set

MOV AB:
Move A to B

MOV BA:
Move B to A

RESET:
Resets the registers, PC and just about everything

HLT:
Halt the program
Its was easy to design the initial design as i came up with a cool little idea. It may already be used by others but i have never seen it before.

Ok, so my problem was this. I want to beable to enable and disable buffers, but not by keeping the enable lines at a logic state but to toggle them. So i use a 4013 D type flip flop and connect the compliment Q to the data pin. So when you pulse a signal on the clock line it toggles state. That way, toggle it once, its on. Toggle the same line again, its off etc

I have finished the ALU today and i must say it works beautifully :D. Funny thing really i though the zero flag was not working but it turned out that because the 4585 comparator is connected in parallel to the LEDS on the output bus the LED's where like 0 ohm resistors and there for taking the current away from the 4585 input pins!

Today i started work on the register board which is also the main board that connects to the ALU and program control + flow board. Cant wait XD!!!

Oh, one more thing, here is a list of internal control lines

Code:
1 - Clock register A
2 - Clock register B
3 - Toggle Register A to data bus flag
4 - Toggle Register B to data bus flag
5 - Toggle Register B to ALU flag
6 - Toggle data bus to ALU flag
7 - Clock Work register
8 - Toggle Work register to data bus flag
9 - Toggle Zero Flag
10 - Toggle return address flag
11 - Clock return address
12 - Initiate jump (if zero)
13 - Increment PC
14 - TOggle Read Line
15 - TOggle write Line
16 - TOggle Enable Line
17 - Reset all flags
18 - Halt flag on
19 - Toggle enable word n
20 - Load PC
21 - Initiate jump (if not zero)
22 - Next instruction (all instructions have this at the end)
Any questions, just shout them out :D!!!

Blog entry information

Author
Robin Mitchell
Views
836
Comments
4
Last update

More entries in General

More entries from Robin Mitchell

Share this entry

Top