Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture...

24
Chap. 8 Sequencing and Control Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control Multiple-Cycle Multiprogrammed Control Multiple-Cycle Multiprogrammed Control

Transcript of Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture...

Page 1: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Chap. 8 Sequencing and ControlChap. 8 Sequencing and Control

A Simple Computer ArchitectureA Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control Multiple-Cycle Multiprogrammed ControlMultiple-Cycle Multiprogrammed Control

Page 2: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

InstructionsInstructions InstructionInstruction

– A collection of bits that instructs the computer to A collection of bits that instructs the computer to perform a specific operationperform a specific operation

» Opcode: operation codeOpcode: operation code If the opcode consists of m bits, …If the opcode consists of m bits, …

» Instruction setInstruction set

ProgramProgram– A list of instructionsA list of instructions

Page 3: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Instruction formatsInstruction formats

R1 R2 – R3

R2 R7 + 3

Examples)

If R6 = 0,PC PC-20

Address offset

Page 4: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

SequencingSequencing

Two address in a microinstructionTwo address in a microinstruction– 분기가능한 두 가지 분기가능한 두 가지 addressaddress 를 준비를 준비

CAR: Counter with parallel loadCAR: Counter with parallel load– 분기할 주소 계산분기할 주소 계산– Program Counter (PC)Program Counter (PC)

Page 5: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Instruction formatsInstruction formats

If R6!=0,Then, …

Page 6: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

InstructionInstruction

InstructionOpcode

Micro-operation

Decoder

Page 7: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Storage ResourcesStorage Resources

Page 8: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Single-cycle Hardwired ControlSingle-cycle Hardwired Control

• Single-cycle computer; obtain and execute an instruction from the instruction memory all in a single clock cycle

Page 9: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Instruction DecoderInstruction Decoder

Cf) In micro-programmed control,Control memory

• PL=1 : jump or branch• PL=0 : PC++• PL=1, JB=1 : unconditional jump• PL=1, JB=0 : conditional branch

Condition for branch (BC) 000 : C 001 : N 010 : V 011 : Z 100 : /C 101 : /N 110 : /V 111 : /Z

Page 10: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Instruction DecoderInstruction DecoderBoolean eq. for decoding ?

Page 11: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Sample Instruction & ProgramSample Instruction & Program

16bit 로 확장

Page 12: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Limitations of Single-cycle ComputerLimitations of Single-cycle Computer

Require multiple clock cycles for performing complex Require multiple clock cycles for performing complex operationsoperations– Multiplication: add-and-shiftMultiplication: add-and-shift

Two read accesses of memory for executing an Two read accesses of memory for executing an instructioninstruction– Two types of memory: for instruction and dataTwo types of memory: for instruction and data– Load a data word from memory into a registerLoad a data word from memory into a register

» Two clock cycles are required.Two clock cycles are required.

Lower limit on the clock period based on a long worst Lower limit on the clock period based on a long worst case delay pathcase delay path– Pipelining controlPipelining control

Page 13: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Limitations of Single-cycle ComputerLimitations of Single-cycle Computer

A solution to the above limitationsA solution to the above limitations

–Multiple-cycle Micro-programmed ControlMultiple-cycle Micro-programmed Control

Page 14: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Multiple-Cycle Microprogrammed ControlMultiple-Cycle Microprogrammed Control

Page 15: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Multiple-Cycle Microprogrammed ControlMultiple-Cycle Microprogrammed Control

Page 16: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Multiple-Cycle Micro-programmed ControlMultiple-Cycle Micro-programmed Control

Page 17: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Microprogram DesignMicroprogram Design

Page 18: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Microprogram DesignMicroprogram Design

Page 19: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Microprogram DesignMicroprogram Design

Page 20: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Microprogram DesignMicroprogram Design

Page 21: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Hardwired AlternativeHardwired Alternative

Page 22: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Hardwired AlternativeHardwired Alternative

Page 23: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Pipeline ControlPipeline Control

Page 24: Chap. 8 Sequencing and Control A Simple Computer Architecture A Simple Computer Architecture Single-Cycle Hardwired Control Single-Cycle Hardwired Control.

Pipeline ControlPipeline Control