Presentation is loading. Please wait.

Presentation is loading. Please wait.

September 26, 2001Systems Architecture I1 Systems Architecture I (CS 281-001) Lecture 2: Implementation of a Simplified Computer Jeremy R. Johnson Wednesday,

Similar presentations


Presentation on theme: "September 26, 2001Systems Architecture I1 Systems Architecture I (CS 281-001) Lecture 2: Implementation of a Simplified Computer Jeremy R. Johnson Wednesday,"— Presentation transcript:

1 September 26, 2001Systems Architecture I1 Systems Architecture I (CS 281-001) Lecture 2: Implementation of a Simplified Computer Jeremy R. Johnson Wednesday, September 26, 2001

2 September 26, 2001Systems Architecture I2 Introduction Objective: To develop a simple model of a computer and its execution that is capable of executing RAM programs. To introduce the concept of abstraction in computer design. The model will be given schematically with timing sequences. RAL instructions will be implemented using microinstructions described in a notation called “Register Transfer Language” (RTL). The control logic for implementing microinstructions will be described at the gate level. References: Dewdney, The New Turing Omnibus (Chapter 48).

3 September 26, 2001Systems Architecture I3 SCRAM A Simple but Complete Random Access Machine. This computer can execute RAL instructions. 8-bit words 16 word memory (4 address bits) Instructions (4 bit opcode, 4 bit operand) 7 registers –PC (program counter) –IR (instruction register - IR(C) = instruction code, IR(O) = operand –MAR (memory address register) –MBR (memory buffer register) –AC (accumulator) –AD (register for addition internal to the ALU - arithmetic logic unit) Driven by the CLU (control logic unit) A timer T generates pulses that are decoded into separate input lines to the CLU

4 September 26, 2001Systems Architecture I4 Fetch and Execute A cycle of operation consists of two stages –The fetch cycle gets the next executable instruction and loads it into the IR –The execute cycle performs the instruction in the IR The fetch and execute cycles are written as a sequence of micro-instructions described in a notation called “Register Transfer Language” (RTL)

5 September 26, 2001Systems Architecture I5 MBR MAR AC ALU PC IR(C) IR(O) Memory MUX 0 1 2 3 MUX 0101 0101 01230123 t 9 t 8 t 7 t 6 t 5 t 4 t 3 t 2 t 1 t 0 q 9 q 8 q 7 q 6 q 5 q 4 q 3 q 2 q 1 x 13 x 12 x 11 x 10 x 9 x 8 x 7 x 6 x1x2x3x4x5x1x2x3x4x5 DecoderT s s s s LOAD LOAD AD READ/ WRITE INC CLEAR INC CLU

6 September 26, 2001Systems Architecture I6 Instruction Opcodes LDA 0001 X; Load contents of memory address X into the AC LDI 0010 X; Indirectly load contents of address X into the AC STA 0011 X; Store contents of AC at memory address X STI 0100 X; Indirectly store contents of AC at address X ADD 0101 X; Add contents of address X to the AC SUB 0110 X; Subtract contents of address X from the AC JMP 0111 X; Jump to the instruction labeled X JMZ 1000 X; Jump to instruction X if the AC contains 0

7 September 26, 2001Systems Architecture I7 MicroProgram Fetch cycle –t 0 : MAR  PC –t 1 : MBR  M; PC  PC + 1 –t 2 : IR  MBR Execute cycle (LDA) –q 1 t 3 : MAR  IR(O) –q 1 t 4 : MBR  M –q 1 t 5 : AC  MBR

8 September 26, 2001Systems Architecture I8 MicroProgram Execute cycle (LDI) –q 2 t 3 : MAR  IR(O) –q 2 t 4 : MBR  M –q 2 t 5 : MAR  MBR –q 2 t 6 : MBR  M –q 2 t 7 : AC  MBR Execute cycle (ADD) –q 5 t 3 : MAR  IR(O) –q 5 t 4 : MBR  M –q 5 t 5 : AD  MBR –q 5 t 6 : AD  AD + AC –q 5 t 7 : AC  AD

9 September 26, 2001Systems Architecture I9 Logic for the Fetch Cycle –t 0 : MAR  PC –t 1 : MBR  M; PC  PC + 1 –t 2 : IR  MBR t0t0 x 10 x4x4 t1t1 x7x7 x5x5 x 13 t2t2 x1x1 x2x2

10 September 26, 2001Systems Architecture I10 Logic for Loading the Accumulator t3t3 x 10 t4t4 x7x7 t5t5 x 11 q3q3 MAR  IR(0) MBR  M AC  MBR x4x4 x2x2 x5x5 x 12

11 September 26, 2001Systems Architecture I11 CLU Logic Some of the output lines from the two previous slides appear in both circuits. It is necessary to have some logic to connect and coordinate the individual outputs to the wires leaving the CLU.

12 September 26, 2001Systems Architecture I12 Exercises Write microprograms for STA, STI, and JMZ. Implement the microprograms in standard logic. Design the portion of the CLU that determines the two output lines labeled x 10. Input to this circuit will be one or both of the lines previously labeled x 10 in the individual circuits for LDA, LDI, and the other circuits. Convert the following program to the equivalent set of binary words, as indicated in this chapter. This is called machine code. Trace the execution of the program by listing the q, t, and x variables. –LDA 1 –ADD 2 –STA 3


Download ppt "September 26, 2001Systems Architecture I1 Systems Architecture I (CS 281-001) Lecture 2: Implementation of a Simplified Computer Jeremy R. Johnson Wednesday,"

Similar presentations


Ads by Google