; Simple Computer Implemented as Gates -- 2003 October 29Rev. 2003 November 6
1600,40,3,40,44 ; run,ClkRate,PonDly,Trate,TrDly
;*DB* 2 ; enables debug mode; RAM circuit:
Mem RAM 16 Mad.11 - - - - - - - - - - - mwr \
Ac.0 + + + + + + + + + + + + + + + ; write from Acc
0 DATA 06003 02005 04007 00004 08007 0F005 0C003 15
; Ld i3
; Add i5
; And dat
;i3 Shr
; Sto dat
;i5 BZ i5
; Jmp i3
;dat 15
mwr = Store/
Mad.* Mux1 Exec PC.* IR.*
11 *; Timing circuits
Exec FF Fech CLK
Fech = Exec.1 ; 180 out of phase with Exec
Egad gate Exec CLK
Egate gate Egad
ExPls Pulse Egate ; a (low) pulse late in Exec cycle
DoIt gate ExPls ; a high pulse slightly later
Ftime gate Fech CLK
Fgate gate Ftime
Finc Pulse Fgate ; a (low) pulse late in Fech cycle
Fclk gate Finc ; a high pulse slightly later; Program Counter
PC Renum PC0.0 + + + PC4.0 + + + PC8.0 + + + PCC.0 + + +
PC0 Cnt4 IR.0 + + + Fech Jinc
PC4 Cnt4 IR.4 + + + Fech Jmid
PC8 Cnt4 IR.8 + + + Fech Jhi
Fmid gate Fclk PC.0 + + + ; enables PC mid to count
Fhi gate Fclk PC.0 + + + + + + + ; enables PC high to count
Jhi gate Fhi Jump/ BZ/
Jmid gate Fmid Jump/ BZ/
Jinc gate Finc Jump/ BZ/
BZ/ gate DoIt IR.13 + + Inv.0 + + + + + + + + + + + + + + +; Instruction Register & decode
IR Renum Ir0.0 + + + Ir4.0 + + + Ir8.0 + + + IrC.0 + + +
Ir0 Cnt4 Mem.0 + + + 0 Fclk
Ir4 Cnt4 Mem.4 + + + 0 Fclk
Ir8 Cnt4 Mem.8 + + + 0 Fclk
IrC Cnt4 Mem.12 + + + 0 Fclk
Op Decode IR.13 + + DoIt 1 1 ; decode the opcode:
Store/ = Op.4
Jump/ = Op.6; ALU + Acc:
Ac Renum Ac0.0 + + + Ac4.0 + + + Ac8.0 + + + AcC.0 + + +
Ac0 Cnt4 AWD.0 + + + 0 AcUp
Ac4 Cnt4 AWD.4 + + + 0 AcUp
Ac8 Cnt4 AWD.8 + + + 0 AcUp
AcC Cnt4 AWD.12 + + + 0 AcUp
AcUp gate Op.0 Op.1 Op.2 Op.3
AWD.* Mux2 IR.13 IR.14 OpZ.* Sum.* And.* Mem.*
15 *
Nand.* gate Ac.* Mem.*
15 *
And.* gate Nand.*
15 *
AcAd.* Add Ac.* Mem.* Cy.*
15 *
Cout.* = AcAd.*.0
15 *
Sum.* = AcAd.*.1
15 *
Cy Renum 0 Cout.0 + + + + + + + + + + + + + +
OpZ.* Mux2 IR.1 IR.2 Ac.* Inv.* Shr.* 0
15 *
Inv.* gate Ac.*
15 *
Shr Renum Ac.1 + + + + + + + + + + + + + + ~; Display...
ReBar gate RESET
CR HEX ReBar Exec CLK 0 0 DoIt Fclk
PC HEX PC.11 - - - - - - - - - - -
Inst HEX IR.15 - - - - - - - - - - - - - - -
Ac HEX Ac.15 - - - - - - - - - - - - - - -
Add HEX Sum.15 - - - - - - - - - - - - - - -
AcMx HEX AWD.15 - - - - - - - - - - - - - - -
Adr HEX Mad.11 - - - - - - - - - - -
Mem HEX Mem.15 - - - - - - - - - - - - - - -
w HEX mwr
;