Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Spring 2011 Time: 3:30 to 6:30 Meeting Days: W Location: Oxendine 1237B Textbook: Essentials of Computer Architecture, Author: Douglas E. Comer, 2005, Pearson Prentice Hall
Instruction Set
Set of operations the hardware recognizes Representation the hardware uses for each operation The set of operations a processor provides represents a tradeoff among the copst of the hardware, the convenience for a programmer, and engineering considerations such as power consumption
Instruction Formats
Fixed-Length
Requires less complex hardware Processor can operate at higher speeds
Can fetch and decode instruction without examining opcode
Registers
General Purpose
Fixed size Supports fetch and store Acts as temporary storage facility Small number of registers, < 100 Usually large enough to hold an integer
Processor does 32 bit arithmetic, registers have 32 bits
Registers
Programming with Registers
Operands stored in general purpose registers Place results in general purpose registers Must move value to registers and from registers
load a copy of X into register 3 Load a copyh of Y into register 6 Add the value in register 3 to the value in register 6 and place the result in register 7 Store a copy of the value in register 7 in Z
Since operands must come from different banks, this presents a problem X and Y must be in separate banks Z and X must be in different banks So either Y or Z will have to be moved to complete T
From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. 2005 Pearson Education, Inc. All rights
From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. 2005 Pearson Education, Inc. All rights
Fetch instruction
Examine opcode
Fetch operands
Perform operations
Store results
Although a RISC processor cannot perform all steps of the fetch-execute in a single clock cycle, an instruction pipeline with parallel hardware provides approximately the same performance once the pipeline is full, one instruction completes on every clock cycle
From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. 2005 Pearson Education, Inc. All rights
From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. 2005 Pearson Education, Inc. All rights
Fetch instruction
Examine opcode
Fetch operands
Perform operations
Store results
From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. 2005 Pearson Education, Inc. All rights
Add a feature to the processor to detect the stall Sends the output from Instruction K directly to Instruction K + 1
From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. 2005 Pearson Education, Inc. All rights
Types of Operations
Instructions are divided into basic categories
Arithmetic instructions (integer arithmetic) Logical instructions (also called Boolean) Data access and transfer instructions Conditional and unconditional branch instructions Floating point instructions Processor control instructions
Use registers
Faster, but limited number which may cause conflict with operands Could use a register window
Subset of registers used to pass parameters
Registers are numbered from 0 through the window size 1 Program places the parameters in registers 4 7 Subroutine gets the parameters from its registers 0 3 xi only available to main program, In only to subroutine
From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. 2005 Pearson Education, Inc. All rights
From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. 2005 Pearson Education, Inc. All rights
From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. 2005 Pearson Education, Inc. All rights
From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. 2005 Pearson Education, Inc. All rights
From Essentials of Computer Architecture by Douglas E. Comer. ISBN 0131491792. 2005 Pearson Education, Inc. All rights