Download presentation
Presentation is loading. Please wait.
Published byJohnathan Wells Modified over 8 years ago
1
Types of Micro-operation Transfer data between registers Transfer data from register to external Transfer data from external to register Perform arithmetic or logical operations, using registers for input and outputs
2
Functions of Control Unit Sequencing Causing the CPU to step through a series of micro-operations Execution Causing the performance of each micro- operation This is done using Control Signals
3
Model of Control Unit
4
Control Unit - input Clock This is how the control unit “keeps time” One micro-operation (or set of parallel micro- operations) per clock cycle (referred to as the processor cycle time) Instruction register Op-code and addressing mode of current instruction determine which micro-operations to be performed Flags State of CPU -Results of previous operations From control bus Interrupts -Acknowledgements
5
Control Unit - output Within CPU Cause data movement Activate specific ALU functions To control bus To memory To I/O modules
6
Example Control Signal Sequence - Fetch MAR ← (PC) Control signal to open gates between PC and MAR MBR ← (memory) Open gates between MAR and address bus Memory read control signal Open gates between data bus and MBR Control signal to logic that add 1 to the contents of the PC IR ← (MBR) opens gates between the MBR and the IR
7
Data Paths and Control Signals
8
Example
9
CPU with Internal Bus
10
Control unit implementation Hardwired implementation the control unit is essentially a state machine circuit. Its input logic signals are transformed into a set of output logic signals, which are the control signals Microprogrammed implementation the logic of the control unit is specified by a microprogram. A microprogram consists of a sequence of instructions in a microprogramming language
11
Control Unit with Decoded Inputs
12
Hardwired Implementation 1 Flags and control bus Each bit means something Instruction register Op-code causes different control signals for each different instruction Unique logic for each op-code Decoder takes encoded input and produces single output
13
Hardwired Implementation 2 Clock Repetitive sequence of pulses Useful for measuring duration of micro-ops Must be long enough to allow signal propagation Different control signals at different times within instruction cycle Need a counter with different control signals for t1, t2 etc.
14
Example Let us consider a single control signal, C5. This signal causes data to be read from the external data bus into the MBR. Then the following Boolean expression defines C5: C5 = P’Q’ t2 + P’Q t2
15
Problems With Hardwired Designs Complex sequencing & micro-operation logic Difficult to design and test Inflexible design due to the difficulty of adding new instructions
16
Micro-programmed Control A sequence of instructions is known as a microprogram or firmware A set of micro-operations occurring at one time is known as a micro- instruction Use sequences of micro-instructions to control complex operations of control unit
17
Implementation All the control unit does is generate a set of control signals Each control signal is on or off Represent each control signal by a bit Have a control word for each micro-op Have a sequence of control words for each machine code instruction Add an address to specify the next micro- instruction, depending on conditions
18
Typical Microinstruction Formats
19
Microinstruction operation To execute this microinstruction, turn on all the control lines indicated by a 1 bit; leave off all control lines indicated by a 0 bit. The resulting control signals will cause one or more micro-operations to be performed. If the condition indicated by the condition bits is false, execute the next microinstruction in sequence. Else the next microinstruction to be executed is indicated in the address field.
20
Organization of Control Memory
21
Control Unit Microarchitecture
22
Control Unit Organization
23
Control Unit Function Sequence logic unit issues read command Word specified in control address register is read into control buffer register Control buffer register contents generates control signals and next address information Sequence logic loads new address into control buffer register based on next address information from control buffer register and ALU flags
24
Advantages and Disadvantages of Microprogramming Simplifies design of control unit Cheaper Less error-prone Slower
25
RQ: 15.1, 15.2, 15.5, 15.6, 15.7, 15.8 P: 15.2, 15.3, 15.4 RQ: 16.1, 16.2, 16.3, 16.4, 16.6
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.