23
Lesson 07: Microoperations for Shifts or rotate Chapter 05: Basic Processing Units … Control Unit Design Organization

Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

  • Upload
    buikiet

  • View
    223

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Lesson 07:Microoperations for Shifts or rotate

Chapter 05: Basic Processing Units … Control Unit Design Organization

Page 2: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

2

Objective

• Learn how an arithmetic shift right or logic-shift right or left logic operation performed by the sequences of microoperations• Learn how an rotate right or left bit operation performed by the sequences of microoperations

Page 3: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

3

An Arithmetic or logic shift or a rotate operation

Page 4: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

4

Execution of a shift or rotate Instruction by Data Path Implementation

• Execution of an ALU instruction can be considered as the implementation of a specific data path flow, as per the specific instruction for shift or rotate and left or right operations on the bits

• Control of the data-path unit and control unit (controlling and sequencing unit)

• Control unit generates control signals to implement each step using signals φs

Page 5: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

5

Sequence of actions to define the controlled transfers of data between processing subunits

• Processing subunits─ registers, X, ALU circuits, Z, and status register along a required data path

• MUX unit to select one data path among several

Page 6: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

6

ALU design as data path with a control unit for arithmetic or logic operation

Page 7: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

7

Microoperations after receiving the instruction at IR

• Decoded by decoding logic• Then the logic results at register instruction

decoder (ID) initiate control actions• Each control signal selects an action through a

gate input φ at each step

Page 8: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

8

Operations by ALU

• Arithmetic shift left ASL─ ri ← ASL ri• logical shift left LSL─ ri ← LSL ri• Arithmetic shift Right─ ASR ri ← ASR ri• logical shift Right LSR─ ri ← LSR • Rotate Left (circular shift left)─ RL ri ← RL ri• Rotate Right (circular shift right)─ RR ri ← RL

ri

Page 9: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

9

Microoperations for executing the instruction using ALU

1. Step i: Transfers a k-bit input source operand through the bus fro ri to X

ri→ (Bus), → (Bus) →MUXMUX─ a multiplexer to select one among

several channels at inputs as per the select subunit signal

Page 10: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

10

Microoperations for executing the instruction using ALU

2. Step i + 1: Transfers a k-bit input source operand through the bus using MUX to X Input operand through a MUX → X

Page 11: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

11

Microoperations for executing the instruction using ALU

3. Step i + 2: Transfer X to ALU─ X→ ALU

Page 12: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

12

Microoperations for executing the instruction using ALU

4. Step i + 3: ALU processing unit select through one of the gates φi an operation as per the shift or rotate instruction, which was received at the IR

Page 13: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

13

Microoperations for executing the instruction using ALU

5. Step i + 4: Transfers a k-bit output Z from ALU─Z← ALU

Page 14: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

14

Microoperations for executing the instruction using ALU

6. Step i + 5: Transfers status flags generated, for example, carry or overflow to status register ─

Status Register ← ALU

Page 15: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

15

Microoperations for executing the instruction using ALU

7. Step i + 6: Transfers from Z the result to destination operand through bus─

(Bus) ← Z

Page 16: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

16

Microoperations for executing the instruction using ALU

8. Step i + 6: Transfers from bus the result to destination operand through bus─ri ← (Bus)

Page 17: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

17

ALU instruction for shift or rotate

• Eight steps in ri← shift or rotate (X operand), Flags ← status of operation and Bus → ri

Page 18: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

18

Control Signal for selecting an ALU shift or rotate operation

Page 19: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

19

ALU control input during an interval T step 3 for a bit Operation for shift or rotate

• One active Calu among six φs for six bit operations

• φASL : ALU ← ASL (X) • φLSL : ALU ← LSL (X) 1. φASR : ALU ← ASR (X) 2. φLSR : ALU ← LSR (X)

Page 20: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

20

ALU control input during an interval T step 5 for a Logic Operation

5. φRL: ALU ← LSR (X) 6. φRL : ALU ← LSR (X)

Page 21: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

21

Summary

Page 22: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

Schaum’s Outline of Theory and Problems of Computer ArchitectureCopyright © The McGraw-Hill Companies Inc. Indian Special Edition 2009

22

We learnt• An arithmetic shift right or logic-shift right or

left logic operation performed by the sequences of microoperations

• Operation as per control signal activated in step 3 among 8 steps

• A rotate right or left logic operation performed by the sequences of microoperations

• Eight steps for an ALU operation among 4 shift and 2 rotate operations

Page 23: Lesson 07 - dauniv.ac.in€¦ · Lesson 07: Microoperations for ... Execution of a shift or rotate Instruction by Data Path Implementation ... • An arithmetic shift right or logic-shift

End of Lesson 07 on Microoperations for Shifts