1 of 24

William Stallings �Computer Organization �and Architecture�10th Edition

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

+

2 of 24

Chapter 20

Control Unit Operation

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

​

​

​

​

​

+

3 of 24

Micro-Operations

  • The functional, or atomic, operations of a processor
  • Series of steps, each of which involves the processor registers
  • Micro refers to the fact that each step is very simple and accomplishes very little
  • The execution of a program consists of the sequential execution of instructions
    • Each instruction is executed during an instruction cycle made up of shorter subcycles (fetch, indirect, execute, interrupt)
    • The execution of each subcycle involves one or more shorter operations (micro-operations)

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

+

4 of 24

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

5 of 24

The Fetch Cycle

  • Occurs at the beginning of each instruction cycle and causes an instruction to be fetched from memory
  • Four registers are involved:
    • Memory Address Register (MAR)
      • Connected to address bus
      • Specifies address for read or write operation
    • Memory Buffer Register (MBR)
      • Connected to data bus
      • Holds data to write or last data read
    • Program Counter (PC)
      • Holds address of next instruction to be fetched
    • Instruction Register (IR)
      • Holds last instruction fetched

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

+

6 of 24

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

7 of 24

Rules for Micro-Operations Grouping

  • Proper sequence must be followed
    • MAR 🡸 (PC) must precede MBR 🡸 (memory)
  • Conflicts must be avoided
    • Must not read and write same register at same time
    • MBR 🡸 (memory) and IR 🡸 (MBR) must not be in same cycle
  • One of the micro-operations involves an addition
    • To avoid duplication of circuitry, this addition could be performed by the ALU
    • The use of the ALU may involve additional micro-operations, depending on the functionality of the ALU and the organization of the processor

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

+

8 of 24

Indirect Cycle

  • Once an instruction is fetched, the next step is to fetch source operands
  • Assuming a one-address instruction format, with direct and indirect addressing allowed:
    • If the instruction specifies an indirect address, then an indirect cycle must precede the execute cycle
    • The address field of the instruction is transferred to the MAR
    • This is then used to fetch the address of the operand
    • Finally, the address field of the IR is updated from the MBR, so that it now contains a direct rather than an indirect address
    • The IR is now in the same state as if indirect addressing had not been used, and it is ready for the execute cycle

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

+

9 of 24

Interrupt Cycle

  • At the completion of the execute cycle, a test is made to determine whether any enabled interrupts have occurred, and if so, the interrupt cycle occurs
  • The nature of this cycle varies greatly from one machine to another
  • In a simple sequence of events:
    • In the first step the contents of the PC are transferred to the MBR so that they can be saved for return from the interrupt
    • Then the MAR is loaded with the address at which the contents of the PC are to be saved, and the PC is loaded with the address of the start of the interrupt-processing routine
      • These two actions may each be a single micro-operation
      • Because most processors provide multiple types and/or levels of interrupts, it may take one or more additional micro-operations to obtain the Save_Address and the Routine_Address before they can be transferred to the MAR and PC respectively
    • Once this is done, the final step is to store the MBR, which contains the old value of the PC, into memory
    • The processor is now ready to begin the next instruction cycle

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

+

10 of 24

Execute Cycle

  • Because of the variety of opcodes, there are a number of different sequences of micro-operations that can occur
  • Instruction decoding
    • The control unit examines the opcode and generates a sequence of micro-operations based on the value of the opcode
  • A simplified add instruction:
    • ADD R1, X (which adds the contents of the location X to register R1)
      • In the first step the address portion of the IR is loaded into the MAR
      • Then the referenced memory location is read
      • Finally the contents of R1 and MBR are added by the ALU
      • Additional micro-operations may be required to extract the register reference from the IR and perhaps to stage the ALU inputs or outputs in some intermediate registers

​

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

+

11 of 24

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

12 of 24

Control Unit �Functional Requirements

  • By reducing the operation of the processor to its most fundamental level we are able to define exactly what it is that the control unit must cause to happen
  • Three step process to lead to a characterization of the control unit:
    • Define basic elements of processor
    • Describe micro-operations processor performs
    • Determine the functions that the control unit must perform to cause the micro-operations to be performed
  • The control unit performs two basic tasks:
    • Sequencing
    • Execution

​

​

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

+

13 of 24

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

14 of 24

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

15 of 24

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

(Table can be found on page 719 in the textbook.)

16 of 24

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

+

17 of 24

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

18 of 24

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Table 20.2  

​

Intel

8085 External Signals (page 1 of 2)

(Table can be found on page 722 in the textbook.)

19 of 24

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Table 20.2  

​

Intel

8085 External Signals (page 2 of 2)

20 of 24

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

21 of 24

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

22 of 24

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Table 20.3  

​

A Decoder With

Four Inputs

and Sixteen Outputs

(Table can be found on page 725 in the textbook.)

23 of 24

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

24 of 24

Summary

  • Micro-operations
    • The fetch cycle
    • The indirect cycle
    • The interrupt cycle
    • The execute cycle
    • The instruction cycle
  • Control of the processor
    • Functional requirements
    • Control signals
    • Internal processor organization
    • The Intel 8085
  • Hardwired implementation
    • Control unit inputs
    • Control unit logic

​

​

Chapter 20

​

Control Unit Operation

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

+