Single Cycle Data Path

Similar documents
CENG 3420 Computer Organization and Design. Lecture 06: MIPS Processor - I. Bei Yu

Systems Architecture

Processor (I) - datapath & control. Hwansoo Han

COMPUTER ORGANIZATION AND DESIGN. The Hardware/Software Interface. Chapter 4. The Processor: A Based on P&H

COMP303 - Computer Architecture Lecture 8. Designing a Single Cycle Datapath

LECTURE 5. Single-Cycle Datapath and Control

Single Cycle Datapath

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization

CSEN 601: Computer System Architecture Summer 2014

The MIPS Processor Datapath

Single Cycle Datapath

CS Computer Architecture Spring Week 10: Chapter

Chapter 5: The Processor: Datapath and Control

ELEC 5200/6200 Computer Architecture and Design Spring 2017 Lecture 4: Datapath and Control

CPE 335 Computer Organization. Basic MIPS Architecture Part I

Multiple Cycle Data Path

The Processor: Datapath & Control

Ch 5: Designing a Single Cycle Datapath

Topic #6. Processor Design

Review: Abstract Implementation View

CENG 3420 Lecture 06: Datapath

ECE369. Chapter 5 ECE369

Design of the MIPS Processor

ﻪﺘﻓﺮﺸﻴﭘ ﺮﺗﻮﻴﭙﻣﺎﻛ يرﺎﻤﻌﻣ MIPS يرﺎﻤﻌﻣ data path and ontrol control

EECS150 - Digital Design Lecture 10- CPU Microarchitecture. Processor Microarchitecture Introduction

CC 311- Computer Architecture. The Processor - Control

4. What is the average CPI of a 1.4 GHz machine that executes 12.5 million instructions in 12 seconds?

COMP2611: Computer Organization. The Pipelined Processor

Chapter 4. The Processor. Computer Architecture and IC Design Lab

The Processor (1) Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

RISC Processor Design

Lecture 10: Simple Data Path

The Processor. Z. Jerry Shi Department of Computer Science and Engineering University of Connecticut. CSE3666: Introduction to Computer Architecture

EECS150 - Digital Design Lecture 9- CPU Microarchitecture. Watson: Jeopardy-playing Computer

ECE260: Fundamentals of Computer Engineering

Inf2C - Computer Systems Lecture Processor Design Single Cycle

ECE232: Hardware Organization and Design

Chapter 5 Solutions: For More Practice

Design of the MIPS Processor (contd)

Lecture 8: Control COS / ELE 375. Computer Architecture and Organization. Princeton University Fall Prof. David August

Systems Architecture I

Lecture 4: Review of MIPS. Instruction formats, impl. of control and datapath, pipelined impl.

Lecture 5 and 6. ICS 152 Computer Systems Architecture. Prof. Juan Luis Aragón

Microprogrammed Control Approach

CS222: Processor Design

LECTURE 6. Multi-Cycle Datapath and Control

CSE 2021 COMPUTER ORGANIZATION

CS3350B Computer Architecture Quiz 3 March 15, 2018

CPU Organization (Design)

Processor: Multi- Cycle Datapath & Control

Chapter 4. The Processor

Single Cycle CPU Design. Mehran Rezaei

Lets Build a Processor

CPE 335. Basic MIPS Architecture Part II

The Processor: Datapath & Control

Laboratory 5 Processor Datapath

NATIONAL UNIVERSITY OF SINGAPORE

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Data Paths and Microprogramming

The Processor: Datapath and Control. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

MIPS-Lite Single-Cycle Control

ECE 313 Computer Organization FINAL EXAM December 14, This exam is open book and open notes. You have 2 hours.

CSE 141 Computer Architecture Summer Session Lecture 3 ALU Part 2 Single Cycle CPU Part 1. Pramod V. Argade

The Big Picture: Where are We Now? EEM 486: Computer Architecture. Lecture 3. Designing a Single Cycle Datapath

Lecture 3: The Processor (Chapter 4 of textbook) Chapter 4.1

EECS 151/251A Fall 2017 Digital Design and Integrated Circuits. Instructor: John Wawrzynek and Nicholas Weaver. Lecture 13 EE141

Processor Design Pipelined Processor (II) Hung-Wei Tseng

Chapter 4. The Processor

CS 2506 Computer Organization II Test 1. Do not start the test until instructed to do so! printed

Inf2C - Computer Systems Lecture 12 Processor Design Multi-Cycle

ENE 334 Microprocessors

CO Computer Architecture and Programming Languages CAPL. Lecture 18 & 19

Major CPU Design Steps

Adding Support for jal to Single Cycle Datapath (For More Practice Exercise 5.20)

Lecture Topics. Announcements. Today: Single-Cycle Processors (P&H ) Next: continued. Milestone #3 (due 2/9) Milestone #4 (due 2/23)

Computer Architecture Chapter 5. Fall 2005 Department of Computer Science Kent State University

Design of Digital Circuits 2017 Srdjan Capkun Onur Mutlu (Guest starring: Frank K. Gürkaynak and Aanjhan Ranganathan)

361 datapath.1. Computer Architecture EECS 361 Lecture 8: Designing a Single Cycle Datapath

CS232 Final Exam May 5, 2001

University of Jordan Computer Engineering Department CPE439: Computer Design Lab

Chapter 4. The Processor. Instruction count Determined by ISA and compiler. We will examine two MIPS implementations

Data paths for MIPS instructions

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

Perfect Student CS 343 Final Exam May 19, 2011 Student ID: 9999 Exam ID: 9636 Instructions Use pencil, if you have one. For multiple choice

Computer Hardware Engineering

Project Description EEC 483 Computer Organization, Spring 2019

The Evolution of Microprocessors. Per Stenström

Digital Design & Computer Architecture (E85) D. Money Harris Fall 2007

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

Chapter 4. Instruction Execution. Introduction. CPU Overview. Multiplexers. Chapter 4 The Processor 1. The Processor.

THE HONG KONG UNIVERSITY OF SCIENCE & TECHNOLOGY Computer Organization (COMP 2611) Spring Semester, 2014 Final Examination

CpE242 Computer Architecture and Engineering Designing a Single Cycle Datapath

Chapter 4. The Processor Designing the datapath

CSE 2021 COMPUTER ORGANIZATION

Lecture 12: Single-Cycle Control Unit. Spring 2018 Jason Tang

CSE Computer Architecture I Fall 2009 Lecture 13 In Class Notes and Problems October 6, 2009

Computer Architecture, IFE CS and T&CS, 4 th sem. Single-Cycle Architecture

EE557--FALL 1999 MAKE-UP MIDTERM 1. Closed books, closed notes

Lecture 5: The Processor

CS 61C: Great Ideas in Computer Architecture Datapath. Instructors: John Wawrzynek & Vladimir Stojanovic

Transcription:

Single ycle ata Path S 365 Lecture 6 Prof. Yih Huang S365 1 MIPS Lite We're ready to look at an implementation of the MIPS Simplified to support only: memory-reference instructions: lw, sw arithmetic-logical instructions: add, sub, and, or, slt, nor control flow instructions: beq, j S365 2 1

Generic Implementation: use the program counter (P) to supply instruction address get the instruction from memory read registers use the instruction to decide exactly what to do All instructions use the ALU after reading the registers. Why? memory-reference? arithmetic? control flow? S365 3 State Elements locks used in synchronous logic when should an element that contains state be updated? Falling Edge Raising Edge lock Pulse lock Time S365 4 2

Latches and Flip-flops hange of state (value) is based on the clock Latch: whenever the inputs change, and the clock is asserted Flip-flop: state changes only on a clock edge (edge-triggered methodology) S365 5 -latch _ S365 6 3

flip-flop latch latch S365 7 Register Similar to the Flip Flop: N-bit input and output Write Enable input Write Enable: negated (0): ata Out will not change asserted (1): ata Out will become ata In ata In N Write Enable lock ata Out N Notice that clock input is inversed. Value changes occur on raising edges S365 8 4

Register File Built using flip-flops Two read ports One write port Write effects seen in the next cycle Read Reg # 1 Read Reg # 2 RegWrite Write Reg # Write ata 5 5 5 32 Register File 32 Read ata 1 32 Read ata 2 S365 9 Implementing Two Read Ports Read register number 1 Register 0 Register 1 Register n 1 Register n M u x Read data 1 Read register number 2 M u x Read data 2 S365 10 5

Writing Register File The clock determines when to write Write Register number 0 1 n-to-1 decoder n 1 n Register 0 Register 1 Register data Register n 1 Register n S365 11 0 Add ALU result M u x 1 Add Regst Shift left 2 PSrc 4 Branch MemRead Instruction [31 26] ontrol MemtoReg ALUOp MemWrite ALUSrc RegWrite P Read address Instruction [31 0] Instruction memory Instruction [25 21] Instruction [20 16] Instruction [15 11] 0 M u x 1 Read register 1 Read data 1 Read register 2 Registers Read Write data 2 register Write data 0 M u x 1 Zero ALU ALU result Address Write data Read data ata memory 1 M u x 0 Single ycle atapath Instruction [15 0] 16 32 Sign extend Instruction [5 0] ALU control S365 12 6

ontrol Signals ALU Operation (ALUOp3:ALUOp0) 0000 and 0001 or 0010 add 0110 sub 0111 set-on-less-than 1100 nor S365 13 ALUsrc: determine the 2 nd operand to ALU 0: from the 2 nd register read port 1: sign-extended immediate Psrc: determines the input to P 0: P+4 1: P+Offset MemRead/MemWrite: enable/disable memory read/write S365 14 7

RegWrite: determined whether a write is performed on the register file. MemToReg: determine the input to register write port 1: memory read port 0: ALU output Regst: determine the register # to be written 0: rt 1: rd S365 15 A: rd = rs + rt Instruction Executions ALU Op S R Regst Mem2Reg MemWrite MemRead Psrc RegWrite LW: $rt = Memory[$rs + Offset] ALU Op S R Regst Mem2Reg MemWrite MemRead Psrc RegWrite S365 16 8

Instruction Executions SW: Memory[$rs + Offset] = $rt ALU Op S R Regst Mem2Reg MemWrite MemRead Psrc RegWrite BE: P = P+Offset, if rs==rt ALU Op S R Regst Mem2Reg MemWrite MemRead Psrc RegWrite S365 17 Generating ontrol Signals ALUOp0 = ALUOp1 = ALUOp2 = ALUOp3 = S365 18 9

ALUsrc = Psrc = MemRead = MemWrite = RegWrite = Mem2Reg = S365 19 iscussions an the datapath support addi? j? jr? S365 20 10

lock ycle Times A clock cycle must accommodate the slowest operation in the data path onsider load word Fetch instruction Read register file ALU Read memory Write register file lock cycle 2 Regelay + ALU-elay + 2 Memelay S365 21 Problems elays are NOT born equal. Memory delays far longer than others Things get even worse when complicated operations (e.g., floating point arithmetic) are introduced. onclusion: one should not expect each instruction to use exactly one cycle time. S365 22 11

Solution Allow some instructions to take longer to complete than others. A multi-cycle data path needed More sophisticated control strategy needed. S365 23 12