harry porter s relay computer
play

Harry Porters Relay Computer Harry Porter, Ph.D. Portland State - PowerPoint PPT Presentation

Slides to Accompany a Video Tutorial on Harry Porters Relay Computer Harry Porter, Ph.D. Portland State University November 7, 2007 +V Double Throw Relay Double Throw Relay +V Four Pole, Double Throw Relay Four Pole, Double Throw


  1. Slides to Accompany a Video Tutorial on Harry Porter’s Relay Computer Harry Porter, Ph.D. Portland State University November 7, 2007

  2. +V

  3. Double Throw Relay

  4. Double Throw Relay +V

  5. Four Pole, Double Throw Relay

  6. Four Pole, Double Throw Relay +V

  7. Schematic Diagrams Assume other terminal is connected to ground

  8. Schematic Diagrams +V Assume other terminal is connected to ground

  9. The “NOT” Circuit in out 1 out +V 0 in in out 0 1 1 0 Convention: “1” = +12V “0” = not connected

  10. The “NOT” Circuit in out 0 out +V 1 in in out 0 1 1 0 Convention: “1” = +12V “0” = not connected

  11. The “OR” Circuit b b or c c +V b c OUT b 0 0 0 b or c 0 1 1 1 0 1 1 1 1 +V c

  12. An Optimization? b b b or c c b or c c

  13. An Optimization? b b b or c b or c c c or d c d c or d d

  14. An Optimization? b b b or c b or c c c or d c d c or d d Whoops!

  15. An Optimization? b b b or c b or c c +V c or d c or d c d d

  16. 1-Bit Logic Circuit b c NOT AND OR XOR 0 0 1 0 0 0 0 1 1 0 1 1 1 0 0 0 1 1 1 1 0 1 1 0 NOT b AND OR c XOR

  17. 1-Bit Logic Circuit b c NOT AND OR XOR 0 0 1 0 0 0 0 1 1 0 1 1 1 0 0 0 1 1 V 1 1 0 1 1 0 NOT b AND OR c XOR

  18. 1-Bit Logic Circuit b c NOT AND OR XOR 0 0 1 0 0 0 0 1 1 0 1 1 1 0 0 0 1 1 V 1 1 0 1 1 0 NOT b AND OR c XOR

  19. 1-Bit Logic Circuit b c NOT AND OR XOR 0 0 1 0 0 0 0 1 1 0 1 1 1 0 0 0 1 1 V 1 1 0 1 1 0 NOT b AND OR c XOR

  20. 1-Bit Logic Circuit b c NOT AND OR XOR 0 0 1 0 0 0 0 1 1 0 1 1 1 0 0 0 1 1 V 1 1 0 1 1 0 NOT b AND OR c XOR

  21. 1-Bit Logic Circuit b c NOT AND OR XOR 0 0 1 0 0 0 0 1 1 0 1 1 1 0 0 0 1 1 V 1 1 0 1 1 0 NOT b AND OR c XOR

  22. Eight 1-bit circuits can be combined to build an... 8-Bit Logic Circuit B7 C7 B1 C1 B0 C0 Logic Logic Logic • • • Circuit Circuit Circuit XOR 1 XOR 0 XOR 7 OR 1 OR 0 OR 7 AND 1 AND 0 AND 7 NOT 1 NOT 0 NOT 7

  23. The “Full Adder” Circuit Cy in B C Cy out Sum B C 0 0 0 0 0 0 0 1 0 1 Carry out Carry in 0 1 0 0 1 Full 0 1 1 1 0 Adder 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 Sum 1 1 1 1 1

  24. 8 full-adders can be combined to build an... 8-Bit Adder B 7 C 7 B 1 C 1 B 0 C 0 Carry Carry Carry Full Full Full 0 • • • Adder Adder Adder Sum 7 Sum 1 Sum 0 8 B 8 Sum + 8 Carry C

  25. The Zero-Detect Circuit Zero V+ Result Bus

  26. The Zero-Detect Circuit Zero V+ Result Bus Sign

  27. Enable Circuit Enable

  28. B XOR C Enable Circuit x 7 x 6 x 5 x 4 x 3 x 2 x 1 x 0 Enable Result Bus

  29. B Shift Left Circular (SHL) b 7 b 6 b 5 b 4 b 3 b 2 b 1 b 0 Enable Result Bus

  30. 3-to-8 Decoder f 0 f 1 f 2 OUTPUT 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 0 0 0 0 1 ADD INC AND OR XOR NOT V SHL f 0 <unused> f 1 f 2

  31. Arithmetic Logic Unit (ALU) B 8 C 8 Function 3 8-bit 8-bit Adder Logic ADD SHL INC AND XOR NOT OR 3-to-8 Decoder Enable En En En En En En Data Bus 8 Zero-Detect Sign Carry Zero

  32. An 8-Bit ALU 3 Function Code 000 add 001 inc 010 and 8 B 011 or 8 Result 100 xor ALU 101 not 110 shl 8 C 111 <nop> Carry Sign Zero

  33. Register Storage +V A

  34. Register Storage • • • +V A 7 A 6 A 0

  35. Register Storage • • • +V A 7 A 6 A 0 Select Enable Bus

  36. Register Storage • • • A 7 A 6 A 0 Load Select Enable Bus

  37. Register Storage • • • A 7 A 6 A 0 Load Select Enable Bus

  38. 8-Bit Registers “Y” Register “X” Register Load Load Select Select 8-Bit “Data” Bus

  39. 16-Bit “Address” Bus Load Select “Y” Register “X” Register Load Load Select Select 8-Bit “Data” Bus

  40. A B 8-bit ALU C D Z Cy S M 1 M M 2 8-bit Data Bus X XY 16-bit Address Bus Y System J 1 J J 2 Architecture Inst PC Inc 16-bit Increment Memory Addr Data

  41. 32K Byte Static RAM Chip LEDs 8 FET Power Transistors (to drive relays during a memory-read operation)

  42. A B 8-bit ALU C D Z Cy S M 1 M M 2 8-bit Data Bus X 16-bit Address Bus XY Y Example: J 1 J J 2 The ALU Inst PC Instruction Inc 16-bit Increment Memory Addr Data

  43. A B 8-bit ALU C D Z Cy S M 1 M M 2 8-bit Data Bus X 16-bit Address Bus XY Step 1: Y J 1 J Fetch Instruction J 2 Inst PC LOAD Inc MEM-READ SELECT 16-bit Increment Memory Addr Data

  44. A B 8-bit ALU C D Z Cy S M 1 M M 2 8-bit Data Bus X 16-bit Address Bus XY Step 2: Y J 1 J Increment PC J 2 Inst PC Inc SELECT 16-bit LOAD Increment Memory Addr Data

  45. A B 8-bit ALU C D Z Cy S M 1 M M 2 8-bit Data Bus X 16-bit Address Bus XY Y Step 3: J 1 J J 2 Update PC Inst PC Inc LOAD 16-bit SELECT Increment Memory Addr Data

  46. A B 8-bit ALU C LOAD D Z Cy S M 1 M LOAD M 2 FUNCTION 8-bit Data Bus X 16-bit Address Bus XY Y J 1 J Step 4: J 2 Inst Execute Instruction PC Inc 16-bit Increment Memory Addr Data

  47. Clock +V Output Switch +V

  48. Clock +V Output Switch +V Charging

  49. Clock +V Output Switch +V Discharging

  50. Clock +V Output Switch +V

  51. Clock +V +V +V +V A B C D

  52. Clock On On +V +V +V +V A B C D Discharging Charging

  53. Clock On On +V +V +V +V A B C D Discharging Charging

  54. Clock On On +V +V +V +V A B C D Discharging Charging

  55. Clock On On +V +V +V +V A B C D Discharging Charging

  56. Clock On On +V +V +V +V A B C D Discharging Charging

  57. Clock Timing Diagram A B C D Clock Clock = (A and B) or (C and D)

  58. Finite State Machine clock 1 2 3 4 5 6 7 8 t 1 t 2 t 3 t 4 t 5 t 6 t 7 t 8 Outputs

  59. Output from FSA 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 t 1 t 2 t 3 t 4 t 5 t 6 t 7 t 8

  60. Instruction Timing - ALU Instruction 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 Select PC Memory Read Load Instr Load Inc Select Inc Load PC ALU Function Load A Load Cond.Code Reg.

  61. Instruction Timing - ALU Instruction 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 Select PC Fetch Memory Read Load Instr Load Inc Select Inc Load PC ALU Function Load A Load Cond.Code Reg.

  62. Instruction Timing - ALU Instruction 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 Select PC Increment Memory Read Load Instr Load Inc Select Inc Load PC ALU Function Load A Load Cond.Code Reg.

  63. Instruction Timing - ALU Instruction 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 Select PC Memory Read Load Instr Load Inc Select Inc Execute Load PC ALU Function Load A Load Cond.Code Reg.

  64. Instruction Decoding Finite State Machine Instruction Register • • • 7 6 5 4 3 2 1 0 1 2 3 4 5 6 Combinational Logic Control Signals (Load, Select, Mem-Read, etc.)

  65. Instruction Timing - 16-bit Move 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 9 10 1 Select PC (Same as Memory Read before) Load Instr Load Inc Select Inc Load PC Select Source-Register Load Dest-Register

  66. Finite State Machine 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

  67. Instruction Decoding and Control Clock Data Bus Finite State Instruction Machine Register Instruction Decoding Control Lines

  68. The Instruction Set Move ddd = destination register sss = source register 0 0 d d d s s s (A, B, C, D, M 1 ,M 2 ,X or Y) ALU r = destination register (A or D) 1 0 0 0 r f f f fff = function code (add, inc, and, or, xor, not, shl) Load Immediate r = destination register (A or B) ddddd = value (-16..15) 0 1 r d d d d d 16-bit Increment XY ← XY + 1 1 0 1 1 0 0 0 0

  69. The Instruction Set Load rr = destination register (A, B, C, D) reg ← [M] 1 0 0 1 0 0 r r Store rr = source register (A, B, C, D) 1 0 0 1 1 0 r r [M] ← reg Load 16-bit Immediate 1 1 0 0 0 0 0 0 v v v v v v v v v v v v v v v v Load the immediate value into M (i.e., M 1 and M 2 ) Halt 1 0 1 0 1 1 1 0

  70. The Instruction Set Goto 1 1 1 0 0 1 1 0 a a a a a a a a a a a a a a a a Branch to the given address Call 1 1 1 0 0 1 1 1 a a a a a a a a a a a a a a a a Branch to the given address Save return location in XY register Return / Branch Indirect PC ← XY 1 0 1 0 1 0 1 0 16-Bit Move d = destination register (PC or XY) ss = source register (M, XY or J) 1 0 1 0 d s s 0

Recommend


More recommend