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

Similar documents
Processor (I) - datapath & control. Hwansoo Han

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

Systems Architecture

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

CSEN 601: Computer System Architecture Summer 2014

CSE 2021 COMPUTER ORGANIZATION

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

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

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

Chapter 4. The Processor

LECTURE 5. Single-Cycle Datapath and Control

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

CSE 2021 COMPUTER ORGANIZATION

Chapter 4. The Processor Designing the datapath

Chapter 4. The Processor

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization

The Processor: Datapath & Control

Project Description EEC 483 Computer Organization, Spring 2019

The MIPS Processor Datapath

CC 311- Computer Architecture. The Processor - Control

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

Laboratory 5 Processor Datapath

Design of the MIPS Processor

CPE 335. Basic MIPS Architecture Part II

CPU Organization (Design)

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

ECE260: Fundamentals of Computer Engineering

Processor: Multi- Cycle Datapath & Control

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

Mark Redekopp and Gandhi Puvvada, All rights reserved. EE 357 Unit 15. Single-Cycle CPU Datapath and Control

Design of the MIPS Processor (contd)

ECE232: Hardware Organization and Design

Inf2C - Computer Systems Lecture Processor Design Single Cycle

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

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

Major CPU Design Steps

Single Cycle CPU Design. Mehran Rezaei

CPE 335 Computer Organization. Basic MIPS Architecture Part I

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

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

Topic #6. Processor Design

Chapter 5 Solutions: For More Practice

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

University of Jordan Computer Engineering Department CPE439: Computer Design Lab

The Processor: Datapath & Control

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

COMP2611: Computer Organization. The Pipelined Processor

MIPS-Lite Single-Cycle Control

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

ECE Exam I - Solutions February 19 th, :00 pm 4:25pm

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

CENG 3420 Lecture 06: Datapath

COMP303 Computer Architecture Lecture 9. Single Cycle Control

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

Chapter 4 The Processor 1. Chapter 4A. The Processor

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

RISC Processor Design

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

ECE369. Chapter 5 ECE369

Systems Architecture I

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

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

Chapter 5: The Processor: Datapath and Control

Processor Design Pipelined Processor (II) Hung-Wei Tseng

A Simplified MIPS Processor in Verilog

TDT4255 Computer Design. Lecture 4. Magnus Jahre. TDT4255 Computer Design

Computer Architecture V Fall Practice Exam Questions

Full Datapath. CSCI 402: Computer Architectures. The Processor (2) 3/21/19. Fengguang Song Department of Computer & Information Science IUPUI

CS359: Computer Architecture. The Processor (A) Yanyan Shen Department of Computer Science and Engineering

ALUOut. Registers A. I + D Memory IR. combinatorial block. combinatorial block. combinatorial block MDR

Single Cycle Datapath

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

Single Cycle Data Path

ENE 334 Microprocessors

ECE473 Computer Architecture and Organization. Processor: Combined Datapath

LECTURE 6. Multi-Cycle Datapath and Control

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

ENGN1640: Design of Computing Systems Topic 04: Single-Cycle Processor Design

CS 351 Exam 2 Mon. 11/2/2015

CpE242 Computer Architecture and Engineering Designing a Single Cycle Datapath

Multiple Cycle Data Path

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

RISC Design: Multi-Cycle Implementation

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

Mapping Control to Hardware

Using a Hardware Description Language to Design and Simulate a Processor 5.8

CSCI 402: Computer Architectures. Fengguang Song Department of Computer & Information Science IUPUI. Today s Content

CSEE W3827 Fundamentals of Computer Systems Homework Assignment 3 Solutions

COMPUTER ORGANIZATION AND DESIGN

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

Microprogrammed Control Approach

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

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

361 control.1. EECS 361 Computer Architecture Lecture 9: Designing Single Cycle Control

Inf2C - Computer Systems Lecture 12 Processor Design Multi-Cycle

Single Cycle Datapath

The Evolution of Microprocessors. Per Stenström

Chapter 4. The Processor

CS3350B Computer Architecture Quiz 3 March 15, 2018

Transcription:

Single-Cycle Architecture

Data flow Data flow is synchronized with clock (edge) in sequential systems

Architecture Elements - assumptions Program (Instruction) memory: All instructions & buses are 32-bit wide (4 Bytes) Instruction code is available at Instruction bus after instruction code is provided at Instruction address bus Register PC contains address to instruction Adder operates on 32-bit numbers

Instruction Fetch Block Instruction Fetch operation PC-write operation is triggered with clock signal PC is incremented by 4 in every clock cycle A sequence of instructions is fetched from memory

Register-type Instructions (R-type) R-type instructions perform operation only on (contents of) internal registers of processor two source operands (Rr s i Rr t ) are in internal registers results is written to the internal register (Rr d ) R-type instruction code is composed of: unique number of instruction type (opcode) numbers of 3 registers (2x source and 1 result): r s, r t, r d type of arithmetical or logical operation (func) opcode r s r t r d... func

Register Direct Addressing (Adresowanie bezpośrednie rejestrowe) Operands are in internal registers operand 1 Rr s operand 2 Rr t operand 3 Rr d assembler: ADD R1,R2,R7 SUB R3,R6,R1 OR R7,R3,R2 AND R0,R2,R5

Register File - assumptions Contains 32 registers, each 32-bit wide At register file output provides contents of two registers addressed by ReadRegister1&2 input numbers Register numbers are 5-bit wide (2 5 = 32) Writing to a selected internal register requires: the register number (WriteRegister), data to be written (WriteData) and operation enable signal (RegWrite) Write operation is synchronized with the clock signal

Register File Logical Concept Write Data RegWrite Write clk Register R0 R1 R31 Read Reg.1 Read Reg.2

ALU - assumptions 32-bit input & outputs (32-bit ALU) Operations: add, subtract, logical: AND, OR 3-bit ALU-control bus Only one output control signal: Zero (Z)

R-type Instruction Execution Source operands from Register File (Rr s i Rr t ) are selected by register numbers from instruction code ALU result is written back to the register selected by Rr d at the end of clock signal cycle instruction fields bit numbers opcode r s r t r d... func 31 26 25 21 20 16 15 11 5 0

Data Memory - assumptions Contains data of the program, organized in 32-bit words (4B) Data is present at ReadData bus after the address is provided at Address bus and operation enable signal is active (MemRead) Memory modification requires the data and address to be present at WriteData and Address buses and operation enable signal active (MemWrite) Write operation is synchronized with the clock signal

Sign Extension Unit - assumptions Performs conversion of 16-bit binary numbers to 32- bit representation with proper sign handling (2C) Combinatorial logic, no clock signal required

Transfer Instructions (Load/Store) Instructions perform data transfer: from data memory to internal register (Load) from internal register to data memory (Store) transfer info: internal register (Rr s ) & memory address (Rr t ) constant value (offset) extends addressing range Load/Store instruction code is composed of: unique number of instruction type (opcode) numbers of two internal registers: r s, r t constant (offset), added to the memory (base) address opcode r s r t offset

Register Indirect Addressing with Offset (Adresowanie pośrednie rejestrowe z przesunięciem) Offset is a signed number in 2's complement STORE: data Rr t address Rr s assembler: (SW Store Word) SW R7,(R5) SW R1,0x200(R2) + offset operand address 4B words data 0 memory addresses n

Register Indirect Addressing with Offset (Adresowanie pośrednie rejestrowe z przesunięciem) Offset is a signed number in 2's complement LOAD: data Rr t address Rr s assembler: (LW Load Word) LW R7,(R5) LW R1,0x200(R2) + offset operand address data 0 memory addresses n

Load/Store Execution Register Rr s + offset points to memory data (Load/Store) Store: Contents of register Rr t (memory input) to be written (signal MemWrite active) Load: memory output to be written to register Rr t (signals MemRead and RegWrite active)

Jump/Branch Instructions Jump/Branch: interruption in execution of a sequence of consecutive instructions in memory Every Jump/Branch is a modification of the PC register Absolute (jumps) vs Relative (branches) absolute arbitrary new content loaded into PC relative offset added to the current value of PC Unconditional vs Conditional unconditional jump is always performed conditional final modification of PC depends on conditions usually provided by ALU (bits C,V,Z,N)

Relative Conditional Branch (BEQ) BEQ Rx,Ry,offset (Branch if Equal) branch to address PC+offset*4 if Rx=Ry (Z=1) Instructions are 4B long, so branch range can be widened by pointing to every fourth byte (offset*4) BEQ instruction code is composed of: unique number of instruction type (opcode) numbers of two internal registers: r s, r t constant (offset), added to the memory (base) address BEQ base address refers to instruction memory opcode r s r t offset

Relative Conditional Branch (BEQ) assembler: (BEQ) BEQ R1,R2,0x40 BEQ R0,R7,0xFF

R-type and Load/Store Together Bus multiplexers: ALUSrc: selects the second ALU operand MemtoReg: selects the data to be written to a register

Fetch Unit + R-type, Load/Store

Fetch + R-type, Load/Store and Branch Multiplexer: PCSrc selects the source for new PC value: PC+4 or PC+offset*4

Write to Register - correction Multiplexer: RegDst selects the correct register number to be modified: (R-type r d, Load r t )

Control Block Control: combinatorial logic generating all control signal

Absolute Unconditional Jump (JMP) New, arbitrary value loaded into PC No conditions checked Jump address multiplied by 4 to extend jump range Missing 4 MSB bits complemented from current PC value (jump within a "memory segment") Multiplexer Jump: selects the source of the next instruction address opcode jump address (26 bits) all assumptions made just for the purpose of this project, in order to keep the design simple and have all instructions of the same 32-bit size

Complete Single-Cycle Architecture

Implemented Instruction Set Register (R-type) Load Store BEQ JMP opcode r s r t r d... func opcode r s r t offset opcode r s r t offset opcode r s r t offset opcode jump address (26 bits)

ALU Control All R-type instructions have identical opcode field, but differ in Func field (type of operation for ALU) Main control block receives only instruction opcode and generates signal ALUop (the same for all R-types) ALU Control Unit takes into account Func field (only for R-types) and provides direct control for ALU ALUop signal indicates instruction family, but not the actual operation

ALU Control Func ALU operation (Neg.+Oper) AND 000 OR 001 ADD 010 SUB 110

ALU Control Summary ALU Control is a combinatorial logic operation can be described by truth table