Homebrewing a digital computer

From: Kevin Schoedel <schoedel_at_kw.igs.net>
Date: Sat Nov 11 01:19:59 2000

>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.

Neat. I occasionally spend a little time working toward building myself a
simple processor. My priorities are rather different, though; I want to
make the 'moving parts' visible as far down as is practical and
affordable (which for me will probably mean SSI TTL, except for the
memory), rather than to make the programming model simple.

>[....] In an ideal world the output display would be three
>nixie tubes on the top but that will be difficult to achieve.

Could one build "nixie tube emulators", for instance using seven-segment
LEDs, and then borrow real ones from some other device for special
occasions?

>4 - CLEAR
> Reset the accumulator (and flags).
> Example: 400 - clears the state of the machine.
> Note: This seems a waste of a major opcode.

I've tentatively decided that I'll go for a store-and-clear operation, ?
la EDSAC and PDP8, since, in the few sample programs I tried, the value
in the accumulator was still needed after fewer than half the stores.
This might conflict with your goal of simplicity, but on the other hand,
the question of how to retain (regain) the accumulator after a store
might make a good 'Exercise 1'.

Alternatively you could clear with a STORE,SUB pair, at the cost of a
scratch location.

>7 - READ

After several partial designs than included IN and OUT operations, I
decided to punt I/O almost completely. In my current plans, one operation
can take the switch register as source, and the accumulator lights
(and/or other lights) are the only output.

>9 - CALL

I have provisionally punted the CALL, too, as a separate operation;
instead, the same operation that can load the switch register into the
accumulator can similarly load the PC. Unfortunately my current design
requires the PC to then be adjusted explicitly in the subroutine.


I'm still at the stage of designing and "building" fragments in a
simulator, since I have no real experience; I keep making things too
complicated, and then backtracking to simply again. (And I don't work on
it very often.) My current plan is roughly an 8-bit,
stripped-down-PDP8-ish architecture:

   [0|0|0| | | | | ] halt
   [0|0|1|u|_|_|n|z] skip if u = U then PC := PC + 1 fi
                                where U := (n = sgn(AC)) and (z = (AC=0))
   [0|1|0|_|src|c|s] lac AC := if s then rshift(T) else T fi
                                where T := if c then ~S else S fi
                                where S := {1,AC,PC,SW}[src]
   [0|1|1| | | | | ] -
   [1|0|0|i|p| m] and AC := AC & M[MA]
   [1|0|1|i|p| m] add AC := AC + M[MA]
   [1|1|0|i|p| m] dca M[MA] := AC, AC := 0
   [1|1|1|i|p| m] jmp PC := MA
     where MA := if i then M[TA] else TA fi
     where TA := if p then PC+signext(m) else zeroext(m) fi

Any bits in the instruction may of course end up complemented depending
on the nature of available gates :-) I want to hard-wire this one; if I
eventually finish it, next will come a 16-bit (or perhaps 12- or 18- or
24- bit) device with a more sophisticated instruction set and wide dumb
microcode in EEPROMs.


I do have a couple of devices in a similar spirit, both refugees from the
UW EE dept.

One is an 8-bit processor, built from TTL on an 8"x14" prototyping board,
with point-to-point soldered wire. The ALU is a pair of 74181s, and seems
to use 7475s for the registers. There are five sets of 8 LEDs -- memory
address register, program counter, instruction register, memory, and
accumulator -- plus seven state LEDs, all labelled with pen on masking
tape. There are [missing] eight data switches and eight control switches:
halt/run, halt/step, halt/step cycle, deposit, examine, "pcl" (pc load,
presumably), "acl" (accumulator load), and continue. There's also a
jumper area. Unfortunately the device is damaged; besides the missing
switches (and no sign of where they were wired in), some of the LEDs are
broken or torn off, and a few wires are hanging loose. The wiring is
mostly tied in tight bundles between the rows and columns of ICs, so it
won't be trivial for me to trace it out fully to repair it (and determine
the instruction set). I don't have any documentation. I do have a
schematic for (and not the device) an even lower-level 8-bit processor in
TTL, pushing everything through a bit-serial adder.

A somewhat related 'thing' I picked up last week is some sort of logic
trainer. In a clear plastic frame about 12" x 20" x 6" thick, it has six
*huge* flip-flops (built with power transistors) each with a pair of
output lamps, a jumper area for "programming", and input in the form of a
telephone-style dial. (I assume people here know what a telephone dial is
:-) Haven't traced this one out yet either, but at its scale it won't be
hard.


-- 
Kevin Schoedel
schoedel_at_kw.igs.net
Received on Sat Nov 11 2000 - 01:19:59 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:33:12 BST