1 / 10

Control Unit Operation and Microprogramming Chap 16 & 17 of CO&A Dr. Farag

Control Unit Operation and Microprogramming Chap 16 & 17 of CO&A Dr. Farag. Introduction. Main components of the CPU Special Registers (Y and Z) The two cycles (fetch and execute phases) The basic functions of CU Sequencing: stepping through microinstructions

valiant
Download Presentation

Control Unit Operation and Microprogramming Chap 16 & 17 of CO&A Dr. Farag

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Control Unit Operation and MicroprogrammingChap 16 & 17 of CO&ADr. Farag

  2. Introduction • Main components of the CPU • Special Registers (Y and Z) • The two cycles (fetch and execute phases) • The basic functions of CU • Sequencing: stepping through microinstructions • Execution: executing microinstructions • CU block diagram • Inputs ( IR, flags, clock, & control signals from system bus) • Outputs (control signals to system and internal buses) • Internal processor organization (single bus architecture)

  3. Basic Operations • Four basic operations can be used to construct more complex ones • Register transfer (LOAD MQ) • Performing an arithmetic or logic operation • Fetching a word from memory (Load M(100)) • Storing a word into memory (Store M(100)) • Complete example: Write the control steps for executing IAS assembly instruction: ADD M(3000)

  4. Control Unit Implementation • Two Main techniques to implement CU: • Hardwired implementation • Microprogrammed implementation • In hardwired implementations the CU is considered as a combinational logic circuit the produces its outputs (control signals) based on its inputs (IR, flags, step counter, etc.) • Ex: To derive a logical expression for Zin: • Zin = T1. (fetch phase) + T6 . Add + ………

  5. Control Unit Implementation (Cont.) • All control steps for each instruction should be specified then the logical expression for each control signal is derived. • This process becomes very complex with the increase in processor complexity. • An effective alternative is microprogrammed implementation. • The idea of microprogramming is to consider each instruction as a sequence of much simpler steps called microinstructions.

  6. Control Unit Implementation (Cont.) • Each microinstruction basically activates a number of control signals. • Microinstructions can be stored into memory locations as control words. • Each control word contains a number of bits equals to the number of CPU & bus control signals in addition to an address field and a jump condition field. • For those active control signals in a microinstruction corresponding bits will be set otherwise all other bits store zero.

  7. Control Unit Implementation (Cont.) • The previously described technique is called horizontal microinstruction. • To execute such instructions: • Issue control signals for active bits • If condition is false, execute the following instruction • Otherwise, execute the instruction whose address is stored in the address field • Another for of structuring the microinstruction is called vertical organization where the system bus and the internal CPU control signals are coded. • Think of the pros and cons

  8. Control Unit Implementation (Cont.) • Now the components of a microprogrammed CU are : • Decoder: to decode the IR • Sequencing logic: to determine the address Of the next microinstruction to be executed • Control address register: to hold the above address • Control memory: to store control words • Control buffer register: to store the currently read microinstruction • Decoder: to decode microinstructions if need

  9. Advantages and Disadvantages • Simplicity • Cheaper • Less error-prone • Flexibility: The content of the control memory can be modified or even replaced to update the instruction set architecture of the computer. • This is impossible in can of Hardwires control. • The principle disadvantage of microprogramming is performance. Despite this, it is the dominant technique to implement CUs in CISC processors. • RISC processors usually use Hardwired control.

  10. Microprogramming Applications • Realization of CUs. • Emulation. • Operating system support: Implement primitives that replace important portions of OS S/W. • HLL support: various functions and data type can be implemented directly in firmware. • Monitoring, detecting, isolating, and repairing system errors (microdiagnostics). • User tailoring: Enable the use to write to the control memory by implementing it using RAM.

More Related