Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
What is Microprogram Sequencing?
2.1.
Advantages
2.2.
Disadvantages
3.
Design of Hardwired Control Unit
4.
Design of Micro-programmed Control Unit
5.
Frequently Asked Questions
5.1.
What is a sequencer system?
5.2.
What is the role of a microprogram?
5.3.
What are the functions of a microprogram sequencer?
5.4.
Why do we use a sequencer?
6.
Conclusion
Last Updated: Mar 27, 2024
Easy

Microprogram Sequencer

Author Ravi Khorwal
0 upvote
Microprogram Sequencer

Introduction

A microprogram sequencer uses its address to determine the next microinstruction that needs to be executed. This overall process is known as microprogram sequencing. A sequencer, which is also referred to as a microsequencer, creates the addresses required to step through a control store's microprogram.

The primary function of the control unit is to inform ALU, input/output device and computer’s memory about how to respond or answer the given set of instructions. The Control unit itself does not involve any processing tasks. It only controls and directs the task. It acts as the supervisor of the computer controlling all activities of the computer, including fetching instructions from the main memory and then executing them. 

As the name suggests, hard-wired control units are designed using hardware components such as sequential logic circuits or some finite state machines, for example, logic gates, flip-flops, decoders, resistors and other digital circuits to generate a specific sequence of control signals. Micro-programmed control units are designed with the help of a micro-program. This micro-program is a collection of micro-instructions stored in the control memory.

What is Microprogram Sequencing?

We already saw the basic concept of microprogram sequencing. Now let us see this in detail. Once the configuration of the computer has been decided, the inventor should produce the microcode for the control memory. Microprogram Sequencing is a term for the process of creating code. Microprogram sequencer carries out the duty of microinstruction sequencing. The microprogram sequencer is the name of the address selection component. The size of the microinstruction and the timing of address generation are two factors that must be taken into consideration while constructing the microprogram sequencer. To fit a specific application, a microprogram sequencer can be built using digital functions.

Advantages

The advantages of microprogram sequencing are the following:

  • The execution instruction can be easily controlled by microprogram sequencing.
  • It is easily modifiable due to how simple it is to update the code.
  • It can also handle complicated instructions with ease.
  • A microprogram sequencing implementation is less expensive.

Disadvantages

The disadvantages of microprogram sequencing are the following:

  • It is a bit slower. 
  • Larger storage spaces are made possible with the aid of distinct micro routines for each device command.
  • More time was required for the branching's implementation.

Design of Hardwired Control Unit

Hardwired Control Unit

From the above figure, we can illustrate the design of hard-wired control as follows:

  • Firstly, memory will read the instructions. All these instructions are stored in the instruction register. The size of the instruction register is 16 bits (0 to 15). 
  • The first 12 bits of the instruction register (0 to 11) specify the address of the operand, the next 3 bits (12 to 14) specify the opcode, and the last bit (15th bit) specify the indirect bit. 
  • Opcode specifies the operations to be performed. As the opcode size is 3 bits, we can perform 2³(=8) operations. 
  • We have to decode these bits using a decoder to perform all these operations. 
  • Since opcode is of 3 bits, those 3 bits are passed as input to a decoder, and hence we use a 3X8 decoder and get 8 outputs. 
  • All these outputs, along with the address and the indirect bit, are passed to control unit gates. 
  • Say if we get our input as 001 and let’s say that it contains the ADD operation, the output D1 from the decoder will become active and control logic gates will perform that. 
  • Next, we have a Sequence Counter of size 4 bits. Since the size is 4 bits, we will have 2⁴(=15) timing signals ranging from 0 to 15. 
  • 4 bits sequence counter will be decoded using a decoder. Since the size of SC is 4 bits, a 4X16 decoder is used, and all the outputs of the decoder (from T0 to T15) are given as input to control logic gates. 
  • Sequence Counter accepts 3 control inputs, namely, increment(INR), clear(CLR), and clock. 
  • Whenever the clock bus and increment control unit is enabled, we can only perform some operation on the sequence counter. 
  • Enabling clear input makes the counter start from the beginning.

Design of Micro-programmed Control Unit

Microprogrammed Hardwired Control Unit

                                                                                           

From the above figure, we can illustrate the design of micro-programmed control as follows:

  • Micro-programming is a collection of micro-instruction. Each micro-instruction mainly contains 3 micro-operation phases. They are F1, F2, F3. In addition to these 3 fields, we have condition field, branch field and address field. 
  • Decoding F1, F2 and F3 fields, the size of all 3 fields are 3 bits each, so a 3X8 decoder decodes this. From the F1 micro-operation phase, we get 8 outputs. Out of these 8 outputs, one output remains unused. 
  • Likewise, the F2 operation also gives a total of 7 outputs, as in the case of F1.
  • In the F3 micro-operation phase, we can perform only 6 operations(one remains unused, and the other is stored for future purposes).
  • So here, in total, we can perform 20 micro-operations (7+7+6). 
  • The diagram above out of 20 operations demonstrates 5 micro-operations. 
  • Output 3 of F2 is connected to ALU. It performs AND operation on the content of the accumulator(AR) and data register(DR) and transfers the result to the accumulator. It is represented as: AC←AC AND DR

And we apply clock pulse on the corresponding accumulator. Load input is enabled to load it on the accumulator.

  • Output 1 of F1 performs ADD operation by ALU on data register and accumulator and transfers the result to the accumulator.
  • Output 5 of F1 performs DRTAR operation, i.e. transfer the contents of data register to the address register. But the size of the data register is 16 bits, whereas the size of the address register is only 12 bits, so the rightmost significant 12 bits of the data register are transferred to the address register.
  • Output 6 of F1 performs PCTAR operation, i.e. transfer the contents of the program counter to the address register.
     

Read about Instruction Format in Computer Architecture

Frequently Asked Questions

What is a sequencer system?

A sequencer system in computing orchestrates the order of operations or events, ensuring tasks execute in a predefined sequence. This is crucial in environments where timing and order impact the outcome, such as in music production or data processing.

What is the role of a microprogram?

A micro-program sequencer's typical activities include incrementing the control address register by one, loading an address from control memory into the control address register, transferring an external address, and loading a starting address to initiate control operations. computed and memory read.

What are the functions of a microprogram sequencer?

A micro-program sequencer's typical functions include incrementing the control address register by one, loading an address from control memory into the control address register, transferring an external address, and loading a starting address to initiate control operations.

Why do we use a sequencer?

We use a microprogram sequencer for the generation of the address for the next microinstruction to be executed. It is used as an independent address range generator or a component of the control unit of a CPU.

Conclusion

This article taught us the design of the Control Unit and Microprogram Sequencer. 

We hope you could easily take away all critical and conceptual techniques by walking over the given examples. 

To learn more about Micro Operations, refer to Arithmetic Micro Operations.
Recommended Readings:

Now, we strongly recommend you to understand the other related concepts in Computer Organization and Architecture and enhance your learning. You can get a wide range of topics similar to this on guided paths.

It's not the end. Learn and explore more.

Live masterclass