Download presentation
Presentation is loading. Please wait.
Published byBarnaby Day Modified over 8 years ago
2
Basic Concepts Microinstructions The control unit seems a reasonably simple device. Nevertheless, to implement a control unit as an interconnection of basic logic elements is no easy task. The design must include logic for sequencing through micro-operations, for executing microoperations, for interpreting opcodes, and for making decisions based on ALU flags. An alternative, which has been used in many CISC processors, is to implement a microprogrammed control unit.
4
In addition to the use of control signals, each micro-operation is described in symbolic notation. This notation looks suspiciously like a programming language known as a microprogramming language. Each line describes a set of micro-operations occurring at one time and is known as a microinstruction. A sequence of instructions is known as a microprogram, or firmware. Microprogram is midway between hardware and software. Easier to design in firmware than hardware, but more difficult to write a firmware program than a software program.
5
For each micro-operation, all that the control unit is allowed to do is generate a set of control signals. Thus, for any micro-operation, each control line emanating from the control unit is either on or off. This condition can, of course, be represented by a binary digit for each control line. So we could construct a control word in which each bit represents one control line. Then each micro-operation would be represented by a different pattern of 1s and 0s in the control word. String together a sequence of control words to represent the sequence of micro-operations performed by the control unit.
6
Control words in a memory, with each word having a unique address. Add an address field to each control word, indicating the location of the next control word to be executed if a certain condition is true. Add a few bits to specify the condition. The result is known as a horizontal microinstruction.
7
Typical Microinstruction Formats
8
Micro-instruction Types Each micro-instruction specifies single (or few) micro- operations to be performed (vertical micro-programming) Each micro-instruction specifies many different micro-operations to be performed in parallel (horizontal micro-programming)
9
Vertical Micro-programming Width is narrow n control signals encoded into log 2 n bits Limited ability to express parallelism Considerable encoding of control information requires external memory word decoder to identify the exact control line being manipulated
10
Horizontal Micro-programming Wide memory word High degree of parallel operations possible Little encoding of control information
11
Organization of Control Memory These control words or microinstructions could be arranged in a control memory. The microinstructions in each routine are to be executed sequentially. Each routine ends with a branch or jump instruction indicating where to go next. There is a special execute cycle routine whose only purpose is to signify that one of the machine instruction routines (AND,ADD, and so on) is to be executed next, depending on the current op-code.
12
Control words or microinstruction could be arranged in a control memory. It defines the sequence of micro-operations to be performed during each cycle (fetch, indirect, execute, interrupt), Specifies the sequencing of these cycles.
13
Control Unit Micro-architecture The control unit functions as follows: 1. To execute an instruction, the sequencing logic unit issues a READ command to the control memory. 2. The word whose address is specified in the control address register is read into the control buffer register. 3. The content of the control buffer register generates control signals and next address information for the sequencing logic unit. 4. The sequencing logic unit loads a new address into the control address register based on the next-address information from the control buffer register and the ALU flags.
14
Depending on the value of the ALU flags and the control buffer register, one of three decisions is made: Get the next instruction: Add 1 to the control address register. Jump to a new routine based on a jump microinstruction: Load the address field of the control buffer register into the control address register. Jump to a machine instruction routine: Load the control address register based on the op-code in the IR.
15
Control Unit
16
Control Unit Function Sequence login 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 login loads new address into control buffer register based on next address information from control buffer register and ALU flags
17
Next Address Decision Depending on ALU flags and control buffer register Get next instruction Add 1 to control address register Jump to new routine based on jump microinstruction Load address field of control buffer register into control address register Jump to machine instruction routine Load control address register based on opcode in IR
18
Functioning of Microprogrammed Control Unit
19
Wilkes Control 1951 Matrix partially filled with diodes During cycle, one row activated Generates signals where diode present First part of row generates control Second generates address for next cycle
20
Wilkes's Microprogrammed Control Unit
21
Advantages The principal advantage of the use of microprogramming to implement a control unit is that it simplifies the design of the control unit. Thus, it is both cheaper and less error prone to implement. A hardwired control unit must contain complex logic for sequencing through the many micro-operations of the instruction cycle. On the other hand, the decoders and sequencing logic unit of a microprogrammed control unit are very simple pieces of logic.
22
Disadvantages The principal disadvantage of a microprogrammed unit is that it will be somewhat slower than a hardwired unit of comparable technology. Microprogramming is the dominant technique for implementing control units in pure CISC architectures, due to its ease of implementation. RISC processors, with their simpler instruction format, typically use hardwired control units.
23
Microinstruction Sequencing 2 basic Tasks Done By Micro-programmed Control Unit Microinstruction sequencing Microinstruction execution
24
Design Considerations Size of microinstructions Minimizing the size of the control memory reduces the cost of that component Address generation time To execute microinstructions as fast as possible
25
Sequencing Techniques Based on current microinstruction, condition flags, contents of IR, control memory address must be generated. Based on format of address information Two address fields Single address field Variable format
26
Branch Control Logic: Two Address Fields
27
Branch Control Logic: Single Address Field
28
Branch Control Logic: Variable Format
29
Variable format This approach provides the two entirely different microinstruction formats. In 1st format, the some bits are used to activate control signals. In the 2nd format, some bits used for the branch logic module, and the remaining bits provide the address With the first format, the next address is either the next sequential address or an address derived from the instruction register. With the second format, either a conditional or unconditional branch is being specified. One disadvantage of this approach is that one entire cycle is consumed with each branch microinstruction.
30
Que. Explain Micro-instruction Execution The cycle is the basic event Each cycle is made up of two events Fetch Execute
31
Work Of Execution Effect is to generate control signals Some control points internal to processor Rest go to external control bus or other interface
32
Control Unit Organization
33
A Taxonomy of Microinstructions Vertical/horizontal Packed/unpacked Hard/soft microprogramming Direct/indirect encoding
34
Improvements over Wilkes Wilkes had each bit directly produced a control signal or directly produced one bit of next address More complex address sequencing schemes, using fewer microinstruction bits, are possible Require more complex sequencing logic module Control word bits can be saved by encoding and subsequently decoding control information
35
Specific Encoding Techniques Microinstruction organized as set of fields Each field contains code Activates one or more control signals Organize format into independent fields Field depicts set of actions (pattern of control signals) Actions from different fields can occur simultaneously Alternative actions that can be specified by a field are mutually exclusive Only one action specified for field could occur at a time
36
Microinstruction Encoding Direct Encoding
37
Microinstruction Encoding Indirect Encoding
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.