45
Execution Team Phase 1 Presentation 2/14/2011

Execution Team

  • Upload
    lixue

  • View
    55

  • Download
    0

Embed Size (px)

DESCRIPTION

Execution Team. Phase 1 Presentation 2/14/2011. Wisdom of the Day. 学 而不思则罔,思而不学则 殆 Learning without thought is useless; thought without learning is perilous . Today we will encourage thoughts while you learn about the execution stage. - PowerPoint PPT Presentation

Citation preview

Execution Stage

Execution TeamPhase 1 Presentation2/14/2011Wisdom of the DayLearning without thought is useless; thought without learning is perilous.Today we will encourage thoughts while you learn about the execution stage.

Confucius (551Bc-479BC) was a Chinese thinker and social philosopher whose teachings and philosophy have deeply influenced Chinese, Korean, Japanese, and Vietnamese thought and life.Execution Engine OverviewResponsible for producing the result of almost every instructionThree design points:The ALUPC ManipulationMemory Accesses

Block Diagram

Execute Stage Block Diagram

THE ALUPowerhouse of the CPU

ALU OverviewThe ALU is the main math unit of the CPUIt takes two inputs and then returns the results of various operations on them

ALU Datapath

ALU OperationsAdd (ADDU)Subtract (SUBU)Or (OR)And (AND)Nor (NOR)Set Less Than (SLT)

Set Less Than Unsigned (SLTU)Shift Logical Left (SLL)Shift Right Logical (SRL)Load Upper Immediate (LUI)

AdditionUses a ripple carry adder to produce the sumOther options include a carry look ahead adderWe believe the ripple carry adder is sufficiently fast for our implementation.

int ADDU(int a, int b){ return a+b;}C CodeSubtractionModified existing adder to handle both Add and SubtractSubtraction is the addition of one number and the 2s compliment of a second number2s compliment: invert bits then add 1A-B = A + (B! + 1)

int SUBU(int a, int b){ return a-b;}C CodeSubtractionFor our adder to handle both Add and Subtract, we place a mux in front of the adderChoice 1: signal unmodifiedChoice 2: inverted part of BThen to add one we set the carry in bit of the adder to highSUBU(int a, int b){ return a-b;}C Code

Set Less ThanOn a set less than instruction, the ALU determines if the first input is less than the second.To implement, we subtract the two operands and then determine if the output is negative.The sign becomes the result.1 means it is less than.0 indcates that it is not.

boolean SLT(int a, int b){ return a