1 IKI10230 Pengantar Organisasi Komputer Bab 7: Control Unit 28 Mei 2003 Bobby Nazief Qonita Shahab bahan kuliah:

Slides:



Advertisements
Similar presentations
Control path Recall that the control path is the physical entity in a processor which: fetches instructions, fetches operands, decodes instructions, schedules.
Advertisements

Arithmetic Logic Unit (ALU)
CS1104: Computer Organisation School of Computing National University of Singapore.
Topics covered: CPU Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.
1 IKI20210 Pengantar Organisasi Komputer Kuliah Minggu ke-5c: Prosesor 11 Oktober 2002 Bobby Nazief Johny Moningka
1 IKI10230 Pengantar Organisasi Komputer Kuliah no. 11: Control Unit Sumber: 1. Paul Carter, PC Assembly Language 2. Hamacher. Computer Organization, ed-5.
Computer Architecture
1 ITCS 3181 Logic and Computer Systems 2014 B. Wilkinson Slides8.ppt Modification date: Nov 3, 2014 Random Logic Approach The approach described so far.
Microprogramming. S 2/e C D A Computer Systems Design and Architecture Second Edition© 2004 Prentice Hall Microprogramming Main Points/Terminology Difference.
361 multicontroller.1 ECE 361 Computer Architecture Lecture 11: Designing a Multiple Cycle Controller.
Chapter 16 Control Unit Operation No HW problems on this chapter. It is important to understand this material on the architecture of computer control units,
CS364 CH17 Micro-programmed Control
Topics covered: CPU Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.
Basic Processing Unit (Chapter 7)
Chapter 16 Control Unit Implemntation. A Basic Computer Model.
Chapters 5 - The LC-3 LC-3 Computer Architecture Memory Map
Chapter 15 IA 64 Architecture Review Predication Predication Registers Speculation Control Data Software Pipelining Prolog, Kernel, & Epilog phases Automatic.
Chapter 7. Basic Processing Unit
Class 9.1 Computer Architecture - HUJI Computer Architecture Class 9 Microprogramming.
S. Barua – CPSC 440 CHAPTER 5 THE PROCESSOR: DATAPATH AND CONTROL Goals – Understand how the various.
Computer Organization and Architecture
Computer Architecture Lecture 12 Fasih ur Rehman.
Micro-operations Are the functional, or atomic, operations of a processor. A single micro-operation generally involves a transfer between registers, transfer.
Chapter 7 Processing Unit
1 Computer Organization Today: First Hour: Computer Organization –Section 11.3 of Katz’s Textbook –In-class Activity #1 Second Hour: Test Review.
Lecture 16 Today’s topics: –MARIE Instruction Decoding and Control –Hardwired control –Micro-programmed control 1.
Introduction to Computer Organization and Architecture Micro Program ภาษาเครื่อง ไมโครโปรแกรม.
Multiple-bus organization
EXECUTION OF COMPLETE INSTRUCTION
Computer Architecture Lecture 09 Fasih ur Rehman.
1 Control Unit Operation and Microprogramming Chap 16 & 17 of CO&A Dr. Farag.
25/05/12 1 Lecture 3: CPUs; The SHC1, Simple Hypothetical CPU #1 Ian McCrumRoom 5B18,
5-1 Chapter 5—Processor Design—Advanced Topics Computer Systems Design and Architecture by V. Heuring and H. Jordan © 1997 V. Heuring and H. Jordan Chapter.
In1210/01-PDS 1 TU-Delft The Processing Unit. in1210/01-PDS 2 TU-Delft Problem f y ALU y Decoder a instruction Reg ?
Computer architecture
Computer Architecture Lecture 03 Fasih ur Rehman.
UNIT-III CONTROL UNIT DESIGN
September 26, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 2: Implementation of a Simplified Computer Jeremy R. Johnson Wednesday,
Lecture 15 Microarchitecture Level: Level 1. Microarchitecture Level The level above digital logic level. Job: to implement the ISA level above it. The.
Chapter 3 Basic Processing Unit.
Basic Elements of Processor ALU Registers Internal data pahs External data paths Control Unit.
Please see “portrait orientation” PowerPoint file for Chapter 7 Figure 7.1. Single-bus organization of the datapath inside a processor.
Chapter 10 Control Unit Operation “Controls the operation of the processor”
Jeremy R. Johnson William M. Mongan
Types of Micro-operation  Transfer data between registers  Transfer data from register to external  Transfer data from external to register  Perform.
Functions of Processor Operation Addressing modes Registers i/o module interface Memory module interface Interrupts.
Design a MIPS Processor (II)
Controller Implementation
Control Unit Design.
Computer Organization and Architecture + Networks
Control Unit Operation
Computer Organization & Design Microcode for Control Sec. 5
William Stallings Computer Organization and Architecture
Overview Control Memory Comparison of Implementations
UNIT 4 Control Unit. UNIT 4 Control Unit Single CPU Bus CPU Bus MUX Temp PC R0 R(n-1) Instruction Decoder IR MAR MDR Z Y ALU Carry In Address Lines.
Basic Processing Unit Unit- 7 Engineered for Tomorrow CSE, MVJCE.
Computer Organization and Design
Controller Implementation--Part II
Some Fundamental Concepts
Control Unit Introduction Types Comparison Control Memory
Chapter 7. Basic Processing Unit
Chapter 7. Basic Processing Unit
William Stallings Computer Organization and Architecture 8th Edition
Computer Architecture
Basic Processing Unit UNIT-5.
Multi-Cycle Datapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
UNIT – III Microprogrammed Control
Chapter 4 The Von Neumann Model
Presentation transcript:

1 IKI10230 Pengantar Organisasi Komputer Bab 7: Control Unit 28 Mei 2003 Bobby Nazief Qonita Shahab bahan kuliah: Sumber: 1. Hamacher. Computer Organization, ed Materi kuliah CS152/1997, UCB.

2 Pengendalian Eksekusi Instruksi: Hardwired Control

3 Prosesor: Control & Datapath Processor (active) Computer Control (“brain”) Datapath (“brawn”) Memory (passive) (where programs, data live when running) Devices Input Output

4 Review: Organisasi Prosesor (Single-bus) Y Z MDR MAR PC TEMP R(n-1) R0 IR Instruction Decoder ALU Carry-in Add Sub XOR Address lines Data lines Control lines Memory bus ALU control lines Control Unit Datapath Unit

5 Interaksi Control  Datapath STEPCONTROL SIGNALS 1.PC out, MAR in, Read, Clear Y, Set carry-in to ALU, Add, Z in 2.Z out, PC in, WMFC 3.MDR out, IR in 4.R3 out, MAR in, Read 5.R1 out, Y in, WMFC 6.MDR out, Add, Z in 7.Z out, R1 in, End Control Instruction Datapath IR Conditions Control Signals PC out MAR in ADD Ri in

6 Organisasi Unit Pengendali Decoder/ Encoder Control Step Counter Clock IR Status Flags Condition Codes CLK Control Signals             

7 Pemisahan Decoder & Encoder Encoder Control Step Counter Clock IR Status Flags Condition Codes Instruction Decoder Step Decoder LDI CLK    T 1 T 2    T n    Control Signals              LD INS n Run End Reset

8 Contoh Struktur Encoder untuk sinyal Z in °Fungsi Logika: Z in = T 1 + T 6  ADD + T 5  BR + … °Z in akan terjadi pada: T 1 : untuk setiap instruksi (instruksi berikut: PC+1) T 5 : untuk instruksi ADD T 6 : untuk instruksi BR ADD BR T5T5 T6T6 T1T1  Z in

9 Interaksi Memori  [Control,Datapath] Data Out Clk 5 RwRaRb Registers Rd ALU Clk Data In Data Address Ideal Data Memory Instruction Address Ideal Instruction Memory Clk PC 5 Rs 5 Rt 32 A B Next Address Control Datapath Control Signals Conditions

10 Pengendalian Eksekusi Instruksi: Microprogrammed Control

11 Microprogramming °Control is the hard part of processor design ° Datapath is fairly regular and well-organized ° Memory is highly regular ° Control is irregular and global Microprogramming: -- A Particular Strategy for Implementing the Control Unit of a processor by "programming" at the level of register transfer operations Microarchitecture: -- Logical structure and functional capabilities of the hardware as seen by the microprogrammer Historical Note: IBM 360 Series first to distinguish between architecture & organization Same instruction set across wide range of implementations, each with different cost/performance

12 Microinstructions STEPCONTROL SIGNALS 1.PC out, MAR in, Read, Clear Y, Carry-in to ALU, Add, Z in 2.Z out, PC in, WMFC 3.MDR out, IR in 4.R3 out, MAR in, Read 5.R1 out, Y in, WMFC 6.MDR out, Add, Z in 7.Z out, R1 in, End IR in PC in PC out MAR in MDR out Y in R1 in R1 out R3 out Z in Z out Clear Y Carry-in Add Read WMFC End

13 Organisasi Microprogrammed Control Unit IR in PC in PC out MAR in MDR out Y in R1 in R1 out R3 out IR Starting Address Generator ClockμPC Control Store Control Word

14 Organisasi μProgrammed Control Unit: Branching IR Starting Address Generator ClockμPC Control Store Control Word Status Flags Condition Codes Addr.Microinstruction 0PC out, MAR in, Read, Clear Y, Carry-in to ALU, Add, Z in 1Z out, PC in, WMFC 2MDR out, IR in 3Branch to starting addr. of appropriate μroutine ……………………………………………………………………………. 25PC out, Y in, if N=0 then branch to μinstruction 0 26Offset-field-of-IR out, Add, Z in 27Z out, R1 in, End

15 Encoding of Microinstruction 0000: No transfer 0001: PC out 0010: MDR out 0011: Z out 0100: R0 out 0101: R1 out 000: No transfer 001: PC in 010: IR in 011: Z in 100: R0 in 101: R1 in 0000: ADD 0001: SUB. 1111: XOR 000: No transfer 001: MAR in 010: MDR in 011: TEMP in 100: Y in F4 F2 F1 F3 (4 bits) (3 bits) (4 bits) (3 bits) °Most signals are not needed simultaneously °Many are mutually exclusive: ALU: 1 function at a time Data source is unique °Organization: Vertical Organization (Highly Encoded μInstruction) Horizontal Organization (otherwise)

16 Microprogram Sequencing: Branching Implementation °1 Machine Instruction  1 Set of μInstructions large total number of μInstruction large Control Store °Many Addressing Modes  many instruction combinations results in many duplications of common parts °If the common parts are to be shared  many branches results in longer execution time  Need efficient branching techniqe  Bit-ORing

17 Microprogram Sequencing (1/2): Add src,R dst MAR  [PC]; Read; Z  [PC]+1 PC  [Z]; WMFC IR  [MDR] Branch[InstDec,OR] MAR  [PC]; Read; Z  [PC]+1 Z  [Rsrc] - 4 MAR  [PC]; Read; Z  [PC]+1 MAR  [Rsrc]; Read PC  [Z]; WMFC MAR, Rsrc  [Z]; Read Z  [Rsrc]Branch[171]; WMFC Start Indexed Autodecrement Autoincrement Register indirect

18 Microprogram Sequencing (2/2): Add src,R dst Branch[170,OR]; WMFC Branch[170,OR]; WMFC Branch[170,OR]; WMFC Branch[171]; WMFC End Indexed Autodecrement Autoincrement Register indirect MAR  [MDR]; Read; WMFC 170 Y  [MDR] 171 Z  [Y] + [Rdst] 172 Rdst  [Z] 173

19 Branching in Microinstruction: Add (R src )+,R dst R dst OP code R src Addr.Microinstruction 000PC out, MAR in, Read, Clear Y, Set carry-in, Add, Z in 001Z out, PC in, WMFC 002MDR out, IR in 003μBranch {μPC  101; μPC 5,4  [IR 10,9 ]; μPC 3  [IR 10 ].[IR 9 ].[IR 8 ]} 121Rsrc out, MAR in, Read, Clear Y, Set carry-in, Add, Z in 122Z out, Rsrc in 123μBranch {μPC  170; μPC 0  [IR 8 ]}, WMFC 170MDR out, MAR in, Read, WMFC 171MDR out, Y in 172Rdst out, Add, Z in 173Z out, Rdst in, End ADD IR 10,9 = 01 (autoincrement) IR 8 = 0 (direct) Mode Bit ORing

20 Microinstruction Sequencing: Organization μAR Control Store μIR Status Flags Condition Codes IR Decoding Circuits Next Address μ Instruction Decoder    Control Signals

21 Encoding of Microinstruction w/ Next Address 000: No transfer 001: PC out 010: MDR out 011: Z out 100: Rsrc out 101: Rdst out 000: No transfer 001: PC in 010: IR in 011: Z in 100: Rsrc in 101: Rdst in 0000: ADD 0001: SUB. 1111: XOR 000: No transfer 001: MAR in 010: MDR in 011: TEMP in 100: Y in F3 F1 F0 F2 (3 bits) (8 bits) (3 bits) Address of next microinstruction F4 F9 (1 bit)... (4 bits) F8 (1 bit) 0: NextAdrs 1: InstDec 0: No action 1: OR mode F10 (1 bit) 0: No action 1: OR indsrc

22 Content of μStore F0F1F2F3F4F5 F6F6 F7F7 F8F8 F9F9 F10F

23 /Etc

24 “Macroinstruction” Interpretation Main Memory execution unit control memory CPU ADD SUB AND DATA User program plus Data this can change! AND microsequence e.g., Fetch Calc Operand Addr Fetch Operand(s) Calculate Save Answer(s) one of these is mapped into one of these

25 Control: Hardware vs. Microprogrammed °Control may be designed using one of several initial representations. The choice of sequence control, and how logic is represented, can then be determined independently; the control can then be implemented with one of several methods using a structured logic technique. Initial RepresentationFinite State Diagram Microprogram Sequencing ControlExplicit Next State Microprogram counter Function + Dispatch ROMs Logic RepresentationLogic EquationsTruth Tables Implementation TechniquePLAROM “hardwired control”“microprogrammed control”