lec_04_datapath_and_control_2_spr08_s

lec_04_datapath_and_control_2_spr08_s - EE-449 Lec. 04of...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: EE-449 Lec. 04of 50Lecture 4 Datapath & ControlEE-449 Computer Organization Spring 2008Salvador FallorinaCSULA04-07-081Fallorina | CSULAEE-449 Lec. 04of 50Abstraction Layers for a ComputerFallorina | CSULA2Applications (Office, Photoshop, games, )Operating System (Windows, Unix, Linux)Instruction Set Architecture (ISA) (MIPS, x86)Microarchitecture Digital Logic (gates, flip-flops, PLAs, )Circuits PhysicalCPUMemoryInput/OutputDatapathControlSoftwareHardwareMicroarchitecture: Implementation of the ISA:- Building the datapath- Designing the control-ALU Controller-Main ControllerDigital Logic:Implementation of microarchitecture into logic devicesEE-449 Lec. 04of 50Controller Design S. Fallorina | CSULA3Single-Cycle Control design and implementation: 1.Define the function of each control signal2.Build a truth table 3.Implement truth tables as combinational logicControlleropcodefuncMemWriteALUOp...RegDstRegWritePCSrcEE-449 Lec. 04of 50Datapath and Control ( lw, sw, add, beq, & j )S. Fallorina | CSULA4IFIDEXMEMWBEE-449 Lec. 04of 50Controller Design (ALU Controller)Fallorina | CSULA5(Ex. for lw, sw, add(sub, and, or, nor, slt), beqinstructions) (pp. 301-303)ALU Control linesOperation0000AND0001OR0010add0110subtract0111set on less than1100NOR1.Encode ALU Control lines (that allows the required ALU operations)Ex. (ALU can do 6 types of operations)2. Encode ALUOp Ex. (ALUOp 2-bits)ALUOpOperation (message to ALU Controller)00add01subtract10R-type instruction, (need more info) check funct.Note: For this example, lw, sw, beq only need add and subtract operations. Therefore, only 2 bits are needed for encoding. EE-449 Lec. 04of 50Controller Design (ALU Controller)Fallorina | CSULA63. Build truth table for ALU ControllerNote:if ALUOp == 10, (R-type instruction)then use funct. to determine operationelse,ignore funct, ALUOp determines the operationInputsOutputsALUOpFunct field (Instr.)ALU control lines (operation)00xxxxxx0010 (add)01xxxxxx0110 (subtract)10100000 (add)0010 (add)10100010 (sub)0110 (subtract)10100100 (and)0000 (AND)10100101 (or)0001 (OR)10101010 (slt)0111 (set on less than)EE-449 Lec. 04of 50Controller Design (ALU Controller)Fallorina | CSULA7Summary of ProcessNote:if opcode == non-R-type, then opcode (and ALUOp) fully determines the operationSet ALUOp for desired operationelse (opcode is R-type),then use function to determine operation- For each instruction, assign the proper ALUOp to get desired operationOpcode/InstrALUOpFunctDesired OperationALU control lineslw00xxxxxxadd0010 (add)sw00xxxxxxadd0010 (add)beq01xxxxxxsubtract0110 (subtract)add (R-Type )10100000 (add)add0010 (add)sub (R-Type)10100010 (sub)subtract0110 (subtract)and (R-Type)10100100 (and)AND0000 (AND)or (R-Type )10100101 (or)OR0001 (OR)slt (R-Type )10101010 (slt)slt0111 (set on less than)EE-449 Lec. 04of 50Datapath and Control ( lw, sw, add, beq, & j )S. Fallorina | CSULA8IFIDEXMEMWBEE-449...
View Full Document

This note was uploaded on 11/27/2009 for the course EE 454L at USC.

Page1 / 47

lec_04_datapath_and_control_2_spr08_s - EE-449 Lec. 04of...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online