Presentation is loading. Please wait.

Presentation is loading. Please wait.

5.2 Mathematical Power, Convenience, and Cost The set of operations represents a tradeoff among the cost of the hardware, the convenience for a programmer,

Similar presentations


Presentation on theme: "5.2 Mathematical Power, Convenience, and Cost The set of operations represents a tradeoff among the cost of the hardware, the convenience for a programmer,"— Presentation transcript:

1 5.2 Mathematical Power, Convenience, and Cost The set of operations represents a tradeoff among the cost of the hardware, the convenience for a programmer, and engineering considerations such as power consumption.

2 5.3 Instruction Set and Representation Two key consideration –The set of operations –The instruction format

3 5.4 Op-codes, Operands, and Results Each instruction contains three parts: –Op-codes –Operands – Results

4 From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. © 2005 Pearson Education, Inc. All rights reserved.

5 Variable-Length Vs. Fixed-Length instructions Fixed length instructions can make processor hardware less complex and faster

6 5.7 General-Purpose Registers General purpose registers act as a temporary storage facility.

7 5.9 Programming with Registers The process of choosing which values the registers contain is known as register allocation.

8 From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. © 2005 Pearson Education, Inc. All rights reserved.

9 5. 10 Register Banks Conflict occurs sometimes –R  X + Y –S  Z – X –T  Y + Z –The programmer must either reassign registers or insert an instruction to copy values

10 From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. © 2005 Pearson Education, Inc. All rights reserved.

11 5.11 Complex and Reduced Instruction Sets CISC –Complex Instruction Set Computer –Intel 80X86 processors RISC –Reduced Instruction Set Computer –MIPS processor

12 5.12 RISC Design and the Execution Pipeline Several stages –Fetch the next instruction –Examine the OP-code –Fetch operands –Perform operation –Store the result

13 From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. © 2005 Pearson Education, Inc. All rights reserved.

14

15 5.13 Pipelines and Instruction Stalls The instruction pipeline is transparent to programmers A stage of the pipeline stalls to wait for the operand to become available

16 From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. © 2005 Pearson Education, Inc. All rights reserved.

17

18 5.14 Other Cause of Pipeline Stalls Access external storage Invoke a coprocessor Branches to a new location Calls to a subroutine

19 From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. © 2005 Pearson Education, Inc. All rights reserved.

20 5.16 Programming, Stalls, and No-OP Instruction Insert a comment that explain the reason for a stall Insert no-op instructions to document an instruction stall

21 From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. © 2005 Pearson Education, Inc. All rights reserved.

22 5.18 Types of Operations Arithmetic instructions Logical instructions Data access and transfer instructions Branch instructions Floating point instructions Processor control instructions

23 5.19 Program Counter, Fetch-Execute, and Branching Assign the program counter an initial address, Repeat forever { –Fetch: access the next step of the program Set an internal register to the next instruction –Execute : perform the step of the program Copy the content of the internal register to the program counter }

24 From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. © 2005 Pearson Education, Inc. All rights reserved.

25

26

27

28 5.23 The Principle of Orthogonality An instruction set is orthogonal if each instruction performs a unique task.

29 5.24 Condition Codes and Conditional Branch The ALU sets a condition code. A conditional branch instruction can test one or more of the flag bits, and use the result to determine whether to branch.

30 From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. © 2005 Pearson Education, Inc. All rights reserved.


Download ppt "5.2 Mathematical Power, Convenience, and Cost The set of operations represents a tradeoff among the cost of the hardware, the convenience for a programmer,"

Similar presentations


Ads by Google