Computer Architecture

Slides:



Advertisements
Similar presentations
CS152 Lec9.1 CS152 Computer Architecture and Engineering Lecture 9 Designing Single Cycle Control.
Advertisements

361 datapath Computer Architecture Lecture 8: Designing a Single Cycle Datapath.
The Processor: Datapath & Control
1  1998 Morgan Kaufmann Publishers Chapter Five The Processor: Datapath and Control.
Processor II CPSC 321 Andreas Klappenecker. Midterm 1 Tuesday, October 5 Thursday, October 7 Advantage: less material Disadvantage: less preparation time.
Inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Lecture 25 CPU design (of a single-cycle CPU) Sat Google in Mountain.
CS61C L25 Single Cycle CPU Datapath (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine.
EECC250 - Shaaban #1 lec #22 Winter The Von-Neumann Computer Model Partitioning of the computing engine into components: –Central Processing.
ECE 232 L13. Control.1 ©UCB, DAP’ 97 ECE 232 Hardware Organization and Design Lecture 13 Control Design
Computer Structure - Datapath and Control Goal: Design a Datapath  We will design the datapath of a processor that includes a subset of the MIPS instruction.
CS61C L25 CPU Design : Designing a Single-Cycle CPU (1) Garcia, Fall 2006 © UCB T-Mobile’s Wi-Fi / Cell phone  T-mobile just announced a new phone that.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
CS 61C L17 Control (1) A Carle, Summer 2006 © UCB inst.eecs.berkeley.edu/~cs61c/su06 CS61C : Machine Structures Lecture #17: CPU Design II – Control
Chapter Five The Processor: Datapath and Control.
CS61C L26 CPU Design : Designing a Single-Cycle CPU II (1) Garcia, Fall 2006 © UCB Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
Inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Lecture 25 CPU design (of a single-cycle CPU) Intel is prototyping circuits that.
CS61C L25 CPU Design : Designing a Single-Cycle CPU (1) Garcia, Spring 2007 © UCB Google Summer of Code  Student applications are now open (through );
EECC550 - Shaaban #1 Lec # 4 Winter Major CPU Design Steps 1Using independent RTN, write the micro- operations required for all target.
Copyright 1998 Morgan Kaufmann Publishers, Inc. All rights reserved. Digital Architectures1 Machine instructions execution steps (1) FETCH = Read the instruction.
The Datapath Andreas Klappenecker CPSC321 Computer Architecture.
EEM 486: Computer Architecture Lecture 3 Designing a Single Cycle Datapath.
EECC550 - Shaaban #1 Selected Chapter 5 For More Practice Exercises Winter The MIPS jump and link instruction, jal is used to support procedure.
CS 61C L16 Datapath (1) A Carle, Summer 2004 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #16 – Datapath Andy.
361 control Computer Architecture Lecture 9: Designing Single Cycle Control.
ECE 232 L12.Datapath.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 12 Datapath.
CS61C L27 Single Cycle CPU Control (1) Garcia, Fall 2006 © UCB Wireless High Definition?  Several companies will be working on a “WirelessHD” standard,
The Processor: Datapath & Control. Implementing Instructions Simplified instruction set memory-reference instructions: lw, sw arithmetic-logical instructions:
Chapter 4 Sections 4.1 – 4.4 Appendix D.1 and D.2 Dr. Iyad F. Jafar Basic MIPS Architecture: Single-Cycle Datapath and Control.
CS3350B Computer Architecture Winter 2015 Lecture 5.6: Single-Cycle CPU: Datapath Control (Part 1) Marc Moreno Maza [Adapted.
Processor: Datapath and Control
EEM 486: Computer Architecture Designing Single Cycle Control.
Gary MarsdenSlide 1University of Cape Town Chapter 5 - The Processor  Machine Performance factors –Instruction Count, Clock cycle time, Clock cycles per.
Computer Organization CS224 Fall 2012 Lesson 22. The Big Picture  The Five Classic Components of a Computer  Chapter 4 Topic: Processor Design Control.
Designing a Single Cycle Datapath In this lecture, slides from lectures 3, 8 and 9 from the course Computer Architecture ECE 201 by Professor Mike Schulte.
EEM 486: Computer Architecture Designing a Single Cycle Datapath.
Computer Architecture and Design – ECEN 350 Part 6 [Some slides adapted from A. Sprintson, M. Irwin, D. Paterson and others]
CPE 442 single-cycle datapath.1 Intro. To Computer Architecture CpE242 Computer Architecture and Engineering Designing a Single Cycle Datapath.
W.S Computer System Design Lecture 4 Wannarat Suntiamorntut.
Datapath and Control Unit Design
CS3350B Computer Architecture Winter 2015 Lecture 5.7: Single-Cycle CPU: Datapath Control (Part 2) Marc Moreno Maza [Adapted.
1 Processor: Datapath and Control Single cycle processor –Datapath and Control Multicycle processor –Datapath and Control Microprogramming –Vertical and.
1 Processor: Datapath and Control Single cycle processor –Datapath and Control Multicycle processor –Datapath and Control Microprogramming –Vertical and.
Computer Organization CS224 Chapter 4 Part a The Processor Spring 2011 With thanks to M.J. Irwin, T. Fountain, D. Patterson, and J. Hennessy for some lecture.
Designing a Single- Cycle Processor 國立清華大學資訊工程學系 黃婷婷教授.
By Wannarat Computer System Design Lecture 4 Wannarat Suntiamorntut.
Cpu control.1 2/14 Datapath Components for Lab The Processor! ( th ed)
Chapter 4 From: Dr. Iyad F. Jafar Basic MIPS Architecture: Single-Cycle Datapath and Control.
CS4100: 計算機結構 Designing a Single-Cycle Processor 國立清華大學資訊工程學系 一零零學年度第二學期.
Design a MIPS Processor
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
Csci 136 Computer Architecture II –Single-Cycle Datapath Xiuzhen Cheng
EEM 486: Computer Architecture Lecture 3 Designing Single Cycle Control.
CS 61C: Great Ideas in Computer Architecture (Machine Structures) Single-Cycle CPU Datapath & Control Part 2 Instructors: Krste Asanovic & Vladimir Stojanovic.
Single Cycle Controller Design
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
Access the Instruction from Memory
Exam-like questions.
Computer Architecture
Processor (I).
CSCI206 - Computer Organization & Programming
CS152 Computer Architecture and Engineering Lecture 8 Designing a Single Cycle Datapath Start: X:40.
The Processor Lecture 3.2: Building a Datapath with Control
Datapath: Instruction Store/Fetch & PC Increment
COMS 361 Computer Organization
Access the Instruction from Memory
The Processor: Datapath & Control.
COMS 361 Computer Organization
What You Will Learn In Next Few Sets of Lectures
Processor: Datapath and Control
Presentation transcript:

Computer Architecture Basics of Datapath

Combinational Logic Elements Stateless logic No embedded state (memory) Output fully dependent on inputs Any function possible AND, OR, NAND, NOR, XOR, NOT… AND OR NOT

Combinational Logic Elements Adder ALU 4 set on less than 0111 subtract 0110 add 0010 OR 0001 AND 0000 Function ALU control input

Combinational Logic Elements Multiplexor A two-input multiplexor A 32-bit wide 2-to-1 multiplexor 1

Storage Elements Register Similar to the D Flip Flop except N-bit input and output Write Enable input Write Enable : 0 : Data Out will not change 1 : Data Out will become Data in Stored data changes only on falling clock edge!

Storage Elements Register File consists of 32 registers: Two 32-bit output busses: Read data1 and Read data2 One 32-bit input bus: Write data Register 0 hard-wired to value 0 Register is selected by: Read register1 selects the register to put on Read data1 Read register2 selects the register to put on Read data2 Write register selects the register to be written via write data when RegWrite = 1 Clock input (CLK) The CLK input is a factor only for write operation (data changes only on falling clock edge) 5 Read register1 Read data1 5 Read register2 Register numbers Registers 5 Write register Data Read data2 Write data Data RegWrite

Storage Elements Memory has two busses: Address selects MemWrite Memory has two busses: One output bus : Read data (Data Out) One input bus : Write data (Data In) Address selects the word to put on Data Out when MemRead = 1 the word to be written via the Data In when MemWrite = 1 Clock input (CLK) The CLK input is a factor only for write operation (data changes only on falling clock edge) Address Data Out Read data Data In Write data Memory MemRead

Cycle Time = tprop + tcombinational + tsetup + tskew Clocking All storage elements clocked by the same clock edge Edge-triggered clocking (falling clock edge) One clock period per clock cycle Design always works if the clock is “slow enough” Cycle Time = tprop + tcombinational + tsetup + tskew

add Instruction add rd, rs, rt RTL Description 31 26 21 16 11 6 op rs op rs rt rd shamt funct 6bits 5bits 5bits 5bits 5bits 6bits 000000 00000 100000 add rd, rs, rt RTL Description IR ← mem[PC]; Fetch instruction from memory R[rd] ← R[rs] + R[rt]; ADD instruction PC ← PC + 4; Calculate next address

sub Instruction sub rd, rs, rt RTL Description 31 26 21 16 11 6 op rs op rs rt rd shamt funct 6bits 5bits 5bits 5bits 5bits 6bits 000000 00000 100010 sub rd, rs, rt RTL Description IR ← mem[PC]; Fetch instruction from memory R[rd] ← R[rs] + ~R[rt] + 1; SUB instruction PC ← PC + 4; Calculate next address

lw Instruction lw rt, rs, imm16 RTL Description 31 26 21 16 op rs rt op rs rt immediate 6bits 5bits 5bits 16bits 100011 lw rt, rs, imm16 RTL Description IR ← mem[PC]; Fetch instruction from memory Addr ← R[rs] + SignExt(imm16); Compute memory address R[rt] ← Mem[Addr]; Load data into register PC ← PC + 4; Calculate next address

sw Instruction sw rt, rs, imm16 RTL Description 31 26 21 16 op rs rt op rs rt immediate 6bits 5bits 5bits 16bits 101011 sw rt, rs, imm16 RTL Description IR ← mem[PC]; Fetch instruction from memory Addr ← R[rs] + SignExt(imm16); Compute memory address Mem[Addr] ← R[rt]; Store data into memory PC ← PC + 4; Calculate next address

beq Instruction beq rt, rs, imm16 RTL Description 31 26 21 16 op rs rt op rs rt immediate 6bits 5bits 5bits 16bits 000100 beq rt, rs, imm16 RTL Description IR ← mem[PC]; Fetch instruction from memory Cond ← R[rs] + ~R[rt] + 1; Compute conditional Cond if (Cond == 0) then PC ← PC + 4 + (SignExt(imm16) << 2); (Branch if equal) else PC ← PC + 4; (Fall through otherwise)

Instruction Format Summary 31 26 21 16 11 6 Add, sub, and, or add rd, rs, rt sub rd, rs, rt Load, store lw rt, rs, imm16 sw rt, rs, imm16 Branch beq rt, rs, imm16 op rs rt rd shamt funct 6bits 5bits 5bits 5bits 5bits 6bits R-format Instruction 31 26 21 16 op rs rt imm16 6bits 5bits 5bits 16bits I-format Instruction

PC-Related Datapath

Datapath for R-format Instructions 4

Datapath for a Load or Store 4

Datapath for a Branch 4

R-type + (Load or Store) 4

R-type + (Load or Store) + Branch 4