0% found this document useful (0 votes)
3 views26 pages

Chapter 4

Uploaded by

rima
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views26 pages

Chapter 4

Uploaded by

rima
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Chapter 4: The

sequencer
Introduction
• In computer architecture, the control unit is responsible for directing the flow of data and
instructions within the CPU. There are two main approaches to implementing a control
unit: hardwired and micro-programmed.
Introduction
• A hardwired control unit is a control unit that uses a fixed set of logic gates and circuits to
execute instructions. The control signals for each instruction are hardwired into the control
unit, so the control unit has a dedicated circuit for each possible instruction. Hardwired
control units are simple and fast, but they can be inflexible and difficult to modify.

• On the other hand, a micro-programmed control unit is a control unit that uses a
microcode to execute instructions. The microcode is a set of instructions that can be
modified or updated, allowing for greater flexibility and ease of modification. The control
signals for each instruction are generated by a microprogram that is stored in memory,
rather than being hardwired into the control unit.
Hardwired Control Unit
• A hardwired control is a method of generating control signals with the help of Finite State
Machines (FSM). The control signals that are necessary for instruction execution control in
the Hardwired Control Unit are generated by specially built hardware logical circuits, and
we can’t change the signal production mechanism without physically changing the circuit
structure.
Hardwired Control Unit
Hardwired Control Unit
Characteristics of Hardwired Control Unit
• Two decoders, sequence counter and logic gates make up a Hardwired Control.
• The instruction register stores an instruction retrieved from the memory unit (IR).
• An instruction register consists of the operation code, the I bit, and bits 0 through 11.
• A 3 x 8 decoder is used to encode the operation code in bits 12 through 14.
• The decoder’s outputs are denoted by the letters D0 through D7.
• The bit 15 operation code is transferred to a flip-flop with the symbol I.
• The control logic gates are programmed with operation codes from bits 0 to 11.
• The sequence counter (or SC) can count from 0 to 15 in binary.
Designing of Hardwired Control Unit
The following are some of the ways for constructing hardwired control logic that have been
proposed:

• Sequence Counter Method − It is the most practical way to design a somewhat complex
controller.
Designing of Hardwired Control Unit
• Sequence Counter Method

• when Start = 1, because S is connected to Start, therefore Q becomes 1 and and Q’ becomes 0.

• Here the level triggering clock is used. Therefore, when clock = 1 or high and Start=1, as both outputs are connected to AND
gate, so if the resultant of both is 1 that will enable the counter and counter starts counting from 0 0 0 state. So the 0 0 0 state is
decoded by a decoder and produces output O1 , which will trigger the triggering point in the control circuit.

• As the clock becomes high again after 1 T-state. Therefore, when clock = 0, then the counter state is preserved(Q and Q’)
remains the same until the clock becomes high again. This makes sure that the counter changes its states after a gap of one-one
T state.

• Suppose the counter is 3 bits, it generates 23 = 8 states (000 001 ….. 111) . The first count 0 0 0 is given to 3:8 decoder. It will
active output number 1. This output is not a control signal but this will trigger the triggering point in the control unit circuit.

• As the clock becomes high again after a gap of one T state, therefore clock =1 and start = 1 ,then the counter is enabled and
changes it state to 001 and the counter decodes the count and makes O2 output high . And this will trigger a second triggering
point in the circuit.

• All counting states are decoded in the same manner.


Designing of Hardwired Control Unit
The following are some of the ways for constructing hardwired control logic that have been
proposed:

Delay Element Method Here the control unit behavior is represented in the form of a
flowchart.

• Each step in the flowchart represents a control signal that needs to be

produced for processing the instructions.

• If all the steps of the instructions are performed, this means the instruction

is executed completely.
Designing of Hardwired Control Unit
The following are some of the ways for constructing hardwired control logic that have been
proposed:

State Table Method − The standard algorithmic approach to designing the Notes controller
utilising the classical state table method is used in this method.
Micro-programmed control unit
• The programming approach is used to implement a microprogrammed control unit. A
program made up of microinstructions is used to carry out a series of micro-operations.
The control unit’s control memory stores a microprogram composed of microinstructions.
The creation of a set of control signals is dependent on the execution of a
microinstruction.
Micro-programmed control unit
Micro-programmed control unit
In the Microprogrammed control units, or micro-sequencers approach, control signals are
the output of the control data register, the control unit generates the control signals by
stepping through the correct sequence of control memory locations.
Each word of control memory is called a microinstruction. The sequence is initiated based
on the instruction to be executed; the next microinstruction is generated from the current
microinstruction and external conditions.
What is a micro-command ?
• A micro-command is a low-level instruction that is part of the microprogramming process
used to control the internal operations of a computer's central processing unit (CPU).
These micro-commands represent the smallest executable units of control within the CPU,
and they define the specific operations that the control unit must perform at each step of
instruction execution.
What is a micro-command ?
Example1

For a machine-level instruction ex: ADD A, B (which adds the contents of register A and register B), the micro-
commands could involve:

• Loading the contents of register A into the ALU.

• Loading the contents of register B into the ALU.

• Executing the addition.

• Storing the result back into a destination register.

Example2

• Opening a bus control,

• Command to increment a register,

• Addition command in the ALU…Examples:


What is a micro-command ?
The sequencer
• The sequencer in the context of computer architecture refers to the component of the
control unit responsible for determining the order in which microinstructions are executed
during the processing of a machine-level instruction. It is a critical part of a
microprogrammed control unit and plays a key role in orchestrating the execution flow of
micro-operations.

• The sequencer is the circuit that generates the micro commands that act on the different
components of the computer to execute the instructions
Functions of the Sequencer
• Control Flow: The sequencer decides the next microinstruction to execute based on the
current state of the processor and any conditions (e.g., branch conditions, interrupts).

• Fetch and Decode Microinstructions: It fetches microinstructions from the control store,
where the microprogram is stored, and sends them to the control logic for execution.

• Branching and Loops: The sequencer handles conditional and unconditional branches
within the microprogram, enabling the control unit to jump to specific parts of the
microprogram.

• Pipelining (if applicable): In more advanced processors, the sequencer may also support
pipelining of microinstructions to improve execution efficiency.
The design steps of a sequencer
The design steps of a sequencer
• Control Address Register(CAR) : Control address register receives the address from four
different paths. For receiving the addresses from four different paths, Multiplexer is used.

• Multiplexer : Multiplexer is a combinational circuit which contains many data inputs and
single data output depending on control or select inputs.

• Branching : Branching is achieved by specifying the branch address in one of the fields of
the micro instruction. Conditional branching is obtained by using part of the micro-
instruction to select a specific status bit in order to determine its condition.
The design steps of a sequencer
• Mapping Logic : An external address is transferred into control memory via a mapping
logic circuit.

• Incrementor : increments the content of the control address register by one, to select the
next micro-instruction in sequence.

• Subroutine Register (SBR) : The return address for a subroutine is stored in a special
register called Subroutine Register whose value is then used when the micro-program
wishes to return from the subroutine.

• Control Memory : Control memory is a type of memory which contains addressable


storage registers. Control memory can be accessed quicker than main memory.
The design steps of a sequencer
Le distributeur de phases divise l'exécution d'une instruction en plusieurs étapes (ou
phases) clairement définies, comme :
▪ Phase 1 : Lecture de l’instruction (Fetch).
▪ Phase 2 : Décodage de l’instruction (Decode).
▪ Phase 3 : Exécution de l’opération (Execute).
▪ Phase 4 : Stockage du résultat (Write Back).
Phase distributor
• Cycle withclock overlay
• Cycle withjoint times
• Cycle with disjoint times
Different steps for a sequencer implementation
• Example: Immediate Mode Addition
Different steps for a sequencer implementation
Different steps for a sequencer implementation
• Example: Direct Mode Addition

You might also like