cs2100-14-Datapath

cs2100-14-Datapath - CS2100Computer Organisation

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

View Full Document Right Arrow Icon
CS2100 Computer  Organisation http://www.comp.nus.edu.sg/~cs2100/ The Processor: Datapath (AY2009/2010) Semester 2
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS2100 Datapath 2 THE PROCESSOR: DATAPATH Datapath Elements Classification Instruction Memory Adder Register File ALU Data Memory Multiplexer Building Datapath Fetch R-Format Load/Store ALU + Memory Branch
Background image of page 2
CS2100 Datapath 3 SO YOU WANT TO BUILD A  COMPUTER? A processor executes instructions Datapath Performs the arithmetic, logical and memory operations Control Tells the datapath, memory, and I/O devices what to do according to the wishes of the instructions of the program Best learnt through an example Ack: Slides 3 – 31 are taken from Dr Tulika Mitra’s CS1104 notes.
Background image of page 3

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

View Full DocumentRight Arrow Icon
CS2100 Datapath 4 DATAPATH + CONTROL Datapath can perform many operations. Control tells datapath which operation to perform.
Background image of page 4
CS2100 Datapath 5 MIPS IMPLEMENTATION Simplest possible implementation of a subset of the core MIPS ISA Arithmetic and logical operations ( add , sub , and , ori , slt ) Data transfer instructions ( lw , sw ) Branches ( beq , bne ) We will not consider J-type instructions (jump) here; however it requires simple modification of the datapath + control Similarly, handling of shift instructions will be left as an exercise
Background image of page 5

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

View Full DocumentRight Arrow Icon
CS2100 Datapath 6 EXECUTION STEPS (1/2) Program counter (PC) contains the address of the current instruction Instruction Fetch : Send the PC to the memory that contains the code and fetch the instruction Register Read : Read zero, one or two registers depending on the instruction opcode rs rt immediate opcode rs rt rd funct shamt R I Identify number of register reads for add, sub, and, or, slt, lw, sw, beq
Background image of page 6
CS2100 Datapath 7 EXECUTION STEPS (2/2) Computation Arithmetic/logical instructions use ALU (Arithmetic-Logical unit) for the operation Load/store instructions use ALU to calculate the address from base register and offset Branch instructions use ALU for comparison Little similarity among instruction classes Register Write : Arithmetic/logical instructions write back the result to destination/target register Memory read/write : Load/store instructions read data from memory or write data to memory Modify PC : Branch instructions may change the PC; otherwise PC is incremented by 4 to get the address of the next instruction
Background image of page 7

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

View Full DocumentRight Arrow Icon
CS2100 Datapath 8 TODAY’S FOCUS Computer Processor Control Datapath Memory Devices Input Output Datapath
Background image of page 8
CS2100 Datapath 9 DATAPATH: DEFINITION Simple: “The components of the processor that performs arithmetic operations” More comprehensive: “The collection of different elements that together provide a conduit for the flow and transformation of data in the processor during execution”
Background image of page 9

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

View Full DocumentRight Arrow Icon
CS2100 Datapath 10 DATAPTH ELEMENTS:  CLASSIFICATION Computation elements Elements that operate on data values Combinational logic
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 52

cs2100-14-Datapath - CS2100Computer Organisation

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

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