Micro routine of Branch instruction


The microinstruction set is expanded to include some conditional branch microinstructions. These microinstructions can also specify the status flags, condition for branching and branch address. Consider the microinstruction at location 32 in the micro-program memory, generated from the starting address generator block. This conditional branch microinstruction tests the N bit of the condition codes. If this bit is equal to 0, a branching takes place at location 0 to fetch a new machine instruction. Otherwise, the microinstructions at location 33 and 34 are executed to load a new value into the PC

The table shows implementation of a micro routine for branch on negative instruction


Organization of the Control Unit to Enable Conditional Branching in the Micro program

  • The branch condition bits of the microinstruction word, contents of IR, status flags and branch address are fed to the starting and branch address generator block
  • This block load a new address into the µPC when instructed to do so by a microinstruction
  • So µPC is incremented every time a new micro instruction is fetched from the micro-program memory except for the situation specified below.

1) When an End Microinstruction is encountered, the µPC is loaded with the address of the first CW in the micro-routine for the instruction fetch cycle.

2) When a new instruction is loaded into the IR, µPC is loaded with the starting address of the micro-routine for that instruction.

3) When a branch instruction is encountered and the branch condition is satisfied, the µPC is loaded with the branch address.

Important points to regarding micro programmed control

  1. Microprogram defines the instruction set of a computer. Therefore Instruction set can be changed simply by changing the contents of the micro program memory which offers considerable flexibility to design a computer.
  2. A read-only memory can be used for micro program memory as the contents of microprogrammed memory are not changed at all.
  3. Since the execution of any machine instruction involves a number of fetches from the microprogram memory, speed of micro program memory plays major role in determining the overall speed of the computer.
  4. If the entire CPU is fabricated as a single chip, the micro program ROM is a part of that chip.

Practical Considerations << Previous

Next >> Main Memory

Note: More lessons on Computer Organization and Architecture will continue..

Support us generously: contact@lessons2all.com


Our aim is to provide information to the knowledge seekers. 


comments powered by Disqus






Footer1