Homebrewing a digital computer
For VCF next year I'm home brewing a digital computer. The goal is to
produce something akin to a CARDIAC that could be used by interested students.
This is what I have so far, comments/criticisms/suggestions are welcome:
-------------- next part --------------
The SIMPLEX Digital Computer V0.5 (November, 2000)
=====================================================
by Chuck McManis
The SIMPLEX digital computer is a computer educational tool for
teaching basic concepts in computation. It has a very easy to
understand architecture, a small instruction set, and can be
programmed to do several chores.
Description:
============
The computer consists of three rotary switches that can be set to
the values 0 throuh 9. I would like them to look like the digital
selectors on the front of the IBM 360 series machines. Above them is a
3 decimal digit display that is used for "display output". To one side
are LEDs that indicate different machine states (fetch, execute,
overflow, etc). In an ideal world the output display would be three
nixie tubes on the top but that will be difficult to achieve.
Architecture
============
The SIMPLEX is a decimal architecture computer (base-10 being easier
to understand than base-2) The store consists of 100 memory locations
each of which can hold 3 digits.
Instructions:
0 - TSKIP Test and Skip
Test the accumulator for a specified condition
and skip the next instruction if the condition
is true/not true
Second digit is condition
0 - no condtion
1 - Accumlator not zero
2 - overflow
3 - Accumulator is zero
4 - 9 reserved
Third digit is number of instructions to skip
0 - no instructions
1 - one instruction
...
9 - nine instructions.
Note: By this definition 000 is Test no condition skip no
instructions (ie NOP)
1 - ADD Add
Add the contents of memory referenced in the
instruction into the accumulator.
Example: 122 - Add contents of location 22 to the
accumulator.
2 - SUB Subtract
Subtract the contents of memory from the accumulator
leaving the result in the accumulator.
Example: 222 - Subtract the contents of memory
location 22 from the accumulator.
3 - STORE Store
Store the contents of the accumulator into
the referenced memory location.
Example: 340 - Store the contents of the accumulator
into memory location 40.
4 - CLEAR
Reset the accumulator (and flags).
Example: 400 - clears the state of the machine.
Note: This seems a waste of a major opcode.
5 - BRANCH
Load the Program Counter with the number
in the instruction
Example: 505 - Cause the next instruction fetch to come
from memory location 5.
6 - BRANCHI Branch Indirect
Load the Program Counter from the contents
of memory referenced by the instruction
Example: 600 - Cause the next instruction to
be fetched from the location stored in
memory location 00.
7 - READ
Read the contents of an I/O Register into the Accumulator
Like the x80 series of machines and others the SIMPLEX has
a separate I/O space from memory space. Location '00' in
I/O space is the switch register and location 00 as an output
is the display. Plans include a drum like I/O device that could
be used to load programs into memory.
Example: 700 - Read the contents of the switch register
and store them into the accumulator.
8 - WRITE
Write the contents of the accumulator into an I/O Register.
The analog of read but of course the other direction, this
instruction copies the accumulator into I/O "space."
Example: 800 - Write the contents of the accumulator
to the display.
9 - CALL
Writes the "next" PC to memory location 0, then jumps
to the indicated address. This is the mechanism by which
subroutines are called, however there is no stack. So
subroutines have to deal with their own re-entrancy issues.
Example: 950 - Store the current PC into address 0 and
branch to location 50.
Note: The "return" instruction is simply a branch indirect
from location 0.
Memory
------
Memory is addressed as 00 through 99. Each location holds three
digits. The accumulator is also three digits.
I/O Addresses are two digits, I/O Contents are three digits.
The I/O Switch register and display are at I/O location 0
700 - write to display
600 - read switch register
Load address
Deposit
Deposit-next
Examine
Examine-next
Run/Halt - momentary up or down.
Displays:
Accumulator + Flags
Switch Register
Program Couner + Memory Contents
Add all of the numbers from 1 to 100:
CLEAR
ADD 99
STORE COUNT
STORE TOTAL
CLEAR
ADD 1
STORE DECREMENT
LOOP:
CLEAR
ADD COUNT
SUB DECREMENT
STORE COUNT
ADD TOTAL
STORE TOTAL
TSKIPO ZERO,1
BRANCH LOOP
WRITE 0,TOTAL
BRANCH * ; halt
CLEAR
ADD 100
STORE COUNT
The SIMPLEX PGA
================
The SIMPLEX computer is implemented in a single PGA the I/O pins are
as follows:
4 bits -> Digit select
8 bits -> Display data
7 bits -> Memory/IO address
12 bits ->memory/IO data
0 bits -> switch register data (muxed on mem bus)
1 bit -> RD
1 bit -> WR
1 bit -> *IO
2 bits -> deposit / deposit next
2 bits -> examine / examine next
2 bits -> load address / clear all
2 bits -> run/halt
1 bit -> single step
1 bit -> clock
---
44 bits of I/O resources needed.
System schematic should consist of the switch register gate, 128 x 12
RAM, Display drivers (8 pnp transistors?) Four center off toggles, one
momentary toggle.
-------------- next part --------------
Received on Fri Nov 10 2000 - 16:10:22 GMT
This archive was generated by hypermail 2.3.0
: Fri Oct 10 2014 - 23:33:12 BST