Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Conditional Branching
2.
Mapping of Instructions
3.
Subroutine
4.
Frequently Asked Questions
4.1.
What is Sequencing in Computer Architecture?
4.2.
What are Microinstruction and Microprogram?
4.3.
What is Sequencer in Address Sequencing?
5.
Conclusion
Last Updated: Mar 27, 2024

Address Sequencing in Computer Architecture

Author Rajat Agrawal
0 upvote

In computer architecture, address sequencing is the process of generating a sequence of memory addresses. It is a crucial method in computer architecture and with proper and efficient address sequencing, computers can access data quickly and effectively, making it a vital aspect of computing.

The microinstructions are stored in groups in the control memory. Each group is utilized to specify a routine in this case. Each computer's control memory contains instructions that contain their micro-programs routine. These micro-programs create the micro-operations employed to carry out the instructions.

Assume that the hardware is in charge of controlling memory address sequencing. In that instance, the hardware must be able to branch from one routine to the next and apply microinstruction sequencing within a routine.

Now Let’s understand how to transform the bits of instruction code into an address.

When attempting to execute a single instruction of the computer, the control must go through the following steps:

  1. The CAR (Control Address Register) must first be loaded with an initial address when a computer is turned on. The first microinstruction address can be described as this address. We can activate the instruction fetch routine with the help of this address.
  2. The control memory will then run through the routine utilized to determine the operand's effective address.
  3. The next step is to create a micro-operation that will execute the instruction fetched from memory.

With the help of control memory, where the routine is stored, we can convert the bits of instruction code into an address. This process is known as the Mapping Process. The control memory requires address sequencing capabilities, which are stated as follows:

  1. The address sequencing selects the conditional or unconditional branch based on the status bit conditions.
  2. Addressing sequence can increase the Control Address Register (CAR).
  3. It provides the facility for subroutine calls and returns.
  4. The addressing sequence provides a mapping from the bits of the instruction to a control memory address.

Recommended Topic, Microinstruction in Computer Architecture

Selection of Address for Control Memory

The diagram of a control memory and related hardware is shown above, which is required for selecting the address of the next microinstruction. In the control memory, the microinstruction is used to store a set of bits. We can start micro-operations in a computer register with the help of some bits. The remaining microinstruction bits are used to describe the technique for obtaining the following address.

In the above diagram, we can also observe that the control address register can retrieve its address using four distinct directions. With the help of the incrementer, the CAR is incremented, and then the next instruction is selected. The branching address will be determined in many microinstruction fields to produce branching results.

We can utilize conditional branching if there are status bits of microinstruction and if we want to apply conditions on them. A mapping logic circuit can be used to share an external address. A special register will save the return address. When the micro-program returns from the subroutine, this saved address will come in handy. It needs the value from the individual register at that point.

Read about Instruction Format in Computer Architecture Demultiplexer 

Conditional Branching

In the above diagram, we can see, the branch logic is used to provide decision-making capabilities in the control unit. In the system, there exist special bits that are described by the status conditions. These bits provide parameter information such as mode bits, sign bits, carry-out, and input or output status.

When these status bits are combined with the microinstruction field, they can determine the outcome of a conditional branch formed by branch logic. The microinstruction field will define a branch address in this case. The branch logic hardware is implemented using the multiplexer. It will branch to the original address if the condition is met. Otherwise, the address register will be incremented.

The unconditional branch microinstruction can be implemented by loading the branch address into the control address register from control memory. If the condition is true, it will proceed to the branch, which is the address from the current microinstruction's next address field. Otherwise, it will collapse. The following conditions must be tested: Z(zero), C(carry), O(overflow), N(negative), and so on.

Recommended Topic - Shift Registers in Digital Electronics

Mapping of Instructions

If the microinstruction specifies a branch to the first work, a particular type of branch will be created in the control memory. Their micro-program routine is contained in this instruction. The status bits in this unique branch will be the bits in the operation code, which is a part of the instruction.

     Mapping From Instruction code to Microinstruction address

The image above depicts a simple mapping mechanism that will turn a 4-bit operation code into a 7-bit address for control memory. The 0 will be inserted in the most significant bit of the address throughout the mapping process. The four operation code bits will be sent after that. Finally, the two least significant bits of CAR will be cleared.

Each computer instruction will receive a micro-program as a result of this process. Four microinstructions can be stored in the micro-program. The unused memory location can be used for other routines if the routine uses less than four microinstructions. If the routine uses more than four microinstructions, it will use the addresses 1000000 through 1111111.

With the help of a PLD (programmable logic device) or ROM (Read-only memory), this concept can be extended to a more generic mapping rule.

Mapping Function Implemented by PLD and ROM

The above image represents the mapping of a microinstruction's address to an instruction's OP-code. This microinstruction is the starting microinstruction in the executed program.

Subroutine

Subroutines are programs used by other routines to fulfill a particular task. We can reduce the number of microinstructions by using subroutines. These subroutines make use of standard microcode parts, such as effective address computation.

Microprograms that use subroutines must have a provision for storing the return address during a subroutine call and restoring the address during a subroutine return.

Using a subroutine register, the main procedure can obtain the address for the return. In other words, it serves as a source for transferring the address to the main function. The addresses for subroutines are stored in the register file. A subroutine register is used as the source and destination for the addresses. These register files can be ordered so that the registers are stacked in the Last In First Out (LIFO) order.
You can also read about the memory hierarchy.

Must Read Register in Computer

Frequently Asked Questions

What is Sequencing in Computer Architecture?

The sequence in which the instructions in a program are carried out is called Sequencing in Computer Architecture.  The sequence usually goes linearly through the program, with the address of the instructions retrieved from the control unit's program counter.

What are Microinstruction and Microprogram?

Microinstruction is an extremely low-level instruction indicating a minor task a CPU is to perform. At the same time, a Microprogram is a set of microinstructions in a CPU used to implement machine instructions.

What is Sequencer in Address Sequencing?

Micro Instructions Sequencer is a combination of hardware for selecting the next micro-instruction address. A set of bits in control memory's micro-instructions are used to launch micro-operations in computer registers, while other bits indicate how the address is obtained.

Conclusion

In this blog, we have learned about Address Sequencing and how to achieve address sequencing in Computer Architecture.

To learn more about Micro Operations, refer to Arithmetic Micro Operations.

If you want to read more blogs related to Computer Organization and Architecture, you can visit RISC AND CISC.

Also see, What Is a Motherboard
microprogrammed control unit

If you want to read blogs related to Computer Science subjects, visit the link

Happy Learning!!

Live masterclass