Scoreboard Limitations

Similar documents
Scoreboard Limitations!

Tomasulo Algorithm. Developed at IBM and first implemented in IBM s 360/91

Computer Architecture Spring 2016

Chapter 3 Instruction-Level Parallelism and its Exploitation (Part 1)

Instruction Level Parallelism and Its. (Part II) ECE 154B

Dynamic Scheduling. Differences between Tomasulo. Tomasulo Algorithm. CDC 6600 scoreboard. Or ydanicm ceshuldngi

Advanced Pipelining and Instruction-Level Paralelism (2)

Differences between Tomasulo. Another Dynamic Algorithm: Tomasulo Organization. Reservation Station Components

CS152 Computer Architecture and Engineering Lecture 17 Advanced Pipelining: Tomasulo Algorithm

DYNAMIC INSTRUCTION SCHEDULING WITH TOMASULO

Instruction Level Parallelism Part III

Instruction Level Parallelism Part III

Lecture 16: Instruction Level Parallelism -- Dynamic Scheduling (OOO) via Tomasulo s Approach

Slide Set 9. for ENCM 501 in Winter Steve Norman, PhD, PEng

Out-of-Order Execution

EEC 581 Computer Architecture. Instruction Level Parallelism (3.4 & 3.5 Dynamic Scheduling)

Slide Set 8. for ENCM 501 in Winter Term, Steve Norman, PhD, PEng

Outline. 1 Reiteration. 2 Dynamic scheduling - Tomasulo. 3 Superscalar, VLIW. 4 Speculation. 5 ILP limitations. 6 What we have done so far.

Enhancing Performance in Multiple Execution Unit Architecture using Tomasulo Algorithm

Instruction Level Parallelism

CS 152 Midterm 2 May 2, 2002 Bob Brodersen

PIPELINING: BRANCH AND MULTICYCLE INSTRUCTIONS

Tomasulo Algorithm Based Out of Order Execution Processor

Very Short Answer: (1) (1) Peak performance does or does not track observed performance.

An Adaptive Technique for Reducing Leakage and Dynamic Power in Register Files and Reorder Buffers

Contents Slide Set 6. Introduction to Chapter 7 of the textbook. Outline of Slide Set 6. An outline of the first part of Chapter 7

Modeling Digital Systems with Verilog

EECS150 - Digital Design Lecture 9 - CPU Microarchitecture. CMOS Devices

06 1 MIPS Implementation Pipelined DLX and MIPS Implementations: Hardware, notation, hazards.

Sequencing and Control

BUSES IN COMPUTER ARCHITECTURE

Slide Set 6. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng

Microprocessor Design

mamaamo Western Research Laboratory mamaamo Western r セ イ ィ Laboratory ;/ <> i:i:wi/!!?1)xwtw;:il r

Registers. Unit 12 Registers and Counters. Registers (D Flip-Flop based) Register Transfers (example not out of text) Accumulator Registers

CHAPTER 4: Logic Circuits

CHAPTER 4: Logic Circuits

OUT-OF-ORDER processors with precise exceptions

ECSE-323 Digital System Design. Datapath/Controller Lecture #1

Logic Devices for Interfacing, The 8085 MPU Lecture 4

Logic Design II (17.342) Spring Lecture Outline

Outcomes. Spiral 1 / Unit 6. Flip-Flops FLIP FLOPS AND REGISTERS. Flip-flops and Registers. Outputs only change once per clock period

XSbb: Sequential Building-Block Examples

Chapter 4 (Part I) The Processor. Baback Izadi Division of Engineering Programs

Introduction to Computer Engineering. CS/ECE 252, Spring 2017 Rahul Nayar Computer Sciences Department University of Wisconsin Madison

Pipelining. Improve performance by increasing instruction throughput Program execution order. Data access. Instruction. fetch. Data access.

A VLIW Processor for Multimedia Applications

CHAPTER1: Digital Logic Circuits

Implementation of an MPEG Codec on the Tilera TM 64 Processor

By David Acker, Broadcast Pix Hardware Engineering Vice President, and SMPTE Fellow Bob Lamm, Broadcast Pix Product Specialist

AN ABSTRACT OF THE THESIS OF

A Reed Solomon Product-Code (RS-PC) Decoder Chip for DVD Applications

DC Ultra. Concurrent Timing, Area, Power and Test Optimization. Overview

(12) United States Patent (10) Patent No.: US 6,249,855 B1

On the Rules of Low-Power Design

Low Power VLSI Circuits and Systems Prof. Ajit Pal Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

QScript & CNN CNN. ...concept. ...creation. ...product. An Integrated Software Solution Case Study

An Improved Hardware Implementation of the Grain-128a Stream Cipher

Performance Evolution of 16 Bit Processor in FPGA using State Encoding Techniques

specifications of your design. Generally, this component will be customized to meet the specific look of the broadcaster.

HIGH SPEED ASYNCHRONOUS DATA MULTIPLEXER/ DEMULTIPLEXER FOR HIGH DENSITY DIGITAL RECORDERS

EITF35: Introduction to Structured VLSI Design

A few questions to test your familiarity of Lab7 at the end of finishing all assigned parts of Lab 7

REAL-TIME H.264 ENCODING BY THREAD-LEVEL PARALLELISM: GAINS AND PITFALLS

AN INTRODUCTION TO DIGITAL COMPUTER LOGIC

Pipeline design. Mehran Rezaei

High-Definition CESNET

Lecture 0: Organization

SPG700 Multiformat Reference Sync Generator Release Notes

Using Mac OS X for Real-Time Image Processing

Data flow architecture for high-speed optical processors

ITU-T Y Specific requirements and capabilities of the Internet of things for big data

Computer Organization & Architecture Lecture #5

of New York, Inc. Original Sheet No. 81 SCHEDULE 3 Black Start Capability

CPE300: Digital System Architecture and Design

Sequential logic circuits

IMS B007 A transputer based graphics board

Flip-Flops and Registers

THE USE OF forward error correction (FEC) in optical networks

OL_H264MCLD Multi-Channel HDTV H.264/AVC Limited Baseline Video Decoder V1.0. General Description. Applications. Features

Luis Cogan, Dave Harbour., Claude Peny Kern & Co., Ltd 5000 Aarau switzerland Commission II, ISPRS Kyoto, July 1988

Ford AMS Test Bench Operating Instructions

VLSI Design: 3) Explain the various MOSFET Capacitances & their significance. 4) Draw a CMOS Inverter. Explain its transfer characteristics

An FPGA Based Solution for Testing Legacy Video Displays

Transitioning from NTSC (analog) to HD Digital Video

ThedesignsofthemasterandslaveCCBFPGAs

Pivoting Object Tracking System

DIGITAL SYSTEM DESIGN UNIT I (2 MARKS)

FORWARD PATH TRANSMITTERS

CprE 281: Digital Logic

Multicore Design Considerations

ELEN Electronique numérique

Scans and encodes up to a 64-key keyboard. DB 1 DB 2 DB 3 DB 4 DB 5 DB 6 DB 7 V SS. display information.

Sequential Logic Design CS 64: Computer Organization and Design Logic Lecture #14

Agilent MSO and CEBus PL Communications Testing Application Note 1352

ILDA Image Data Transfer Format

Combinational vs Sequential

Bubble Razor An Architecture-Independent Approach to Timing-Error Detection and Correction

This paper is a preprint of a paper accepted by Electronics Letters and is subject to Institution of Engineering and Technology Copyright.

ECE337 Lab 4 Introduction to State Machines in VHDL

Transcription:

Scoreboard Limitations! No forwarding read from register! Structural hazards stall at issue! WAW hazard stall at issue! WAR hazard stall at write Inf3 Computer Architecture - 2016-2017 1

Dynamic Scheduling reloaded: Motivation IBM 360/91: ~3 years after CDC 6600! Had very few registers 4 in IBM 360 vs 8 in CDC 6600 Resulted in frequent data dependencies. " Needed a way to efficiently resolve WAR & WAW dependencies to maximize opportunity for instruction reordering! Had longer memory & functional unit latencies " Needed to find independent instructions in the presence of long-latency stalls! Solution: Tomasulo s Algorithm for improved dynamic scheduling Inf3 Computer Architecture - 2016-2017 2

Tomasulo s Algorithm: key ideas! Controls and buffers distributed with functional units (scoreboard centralizes this functionality) Called reservation stations Prevents front-end blocking due to a structural hazard! Register names replaced by pointers to reservation station entries: register renaming Register renaming avoids WAR & WAW hazards by renaming all destination registers! Older readers no longer endangered by younger writers (avoids WAR hazard)! Newly issued readers always get the value from most recent (in program order) writer (avoids WAW hazard)! Common data bus broadcasts results to all functional units Provides forwarding functionality Inf3 Computer Architecture - 2016-2017 3

Register Renaming! Register renaming accomplished through reservation stations (RS) containing: The instruction Operand values (when available) RS number(s) of instruction(s) providing the operand values Op Val Src1 RS Src1 Val Src2 RS Src2 RS3 Op 0xABC.. Val of R0 from RF RS2 LD r1, 8(r7) # RS2 MUL.D r4, r0, r1 # RS3 Inf3 Computer Architecture - 2016-2017 4

Avoiding Data Hazards w/ Register Renaming Example: LD r0, 0(r7) # RS1: LD RS1, 0, 0x1000 LD r1, 8(r7) # RS2: LD RS2, 8, 0x1000 MUL.D r4, r0, r1 # RS3: MUL.D RS3, RS1, RS2 RAW dependence preserved! Inf3 Computer Architecture - 2016-2017 5

Avoiding Data Hazards w/ Register Renaming Example: LD r0, 0(r7) # RS1: LD RS1, 0, 0x1000 LD r1, 8(r7) # RS2: LD RS2, 8, 0x1000 MUL.D r4, r0, r1 # RS3: MUL.D RS3, RS1, RS2 ADD.D r1, r0, r3 # RS4: ADD.D RS4, RS1, 0x16 WAW dependence avoided through renaming! Q: Which r1 should be written into the register file? A: Only the last (ADD.D " RS4), thus ensuring that the register file holds the correct register value even if instructions reordered Inf3 Computer Architecture - 2016-2017 6

Register Renaming Mechanics! As each instruction is issued to an RS: Available values are fetched (from register file) and buffered at the instruction s RS Dataflow (RAW) dependencies resolved by changing source register specifiers to RS producing those register values A result status register (or rename table) maps each architectural register to the most recent RS producing its value Inf3 Computer Architecture - 2016-2017 7

Dynamic Scheduling 2: Tomasulo s Algorithm! Handles RAW with proper stalls and eliminates WAR and WAW through register renaming! Step 1: Issue Get next instruction from the fetch queue and issue it to the reservation stations if there is a free reservation station Read operands from register file if available or rename operands if pending (resolve WAR, WAW)! Step 2: Execute Monitor the CDB for operand(s). Once available, store into all reservation stations waiting for it Execute instruction when both operands are ready in the reservation station (RAW)! Step 3: Write result Put the result on CDB and write it into the register file (if last producer) and all reservation stations waiting on it (RAW) Inf3 Computer Architecture - 2016-2017 8

IBM S/360 model 91 used Tomasulo s Algorithm! Dynamic O-O-O execution! Tags (RS # s) used to name flow dependencies! 5 reservation stations! 6 load buffers! Issue instructions to reservation stations, load buffers and store buffers! Instructions wait in reservation stations or store buffers until all their operands are collected! Functional units broadcast result and tag on the Common Data Bus (CDB) for all reservation stations, store buffers and FP register file Store buffers Address unit Address unit Memory unit From instruction fetch unit Instruction Queue 6... 11 st f4, 8(r2) add f4, f5, f3 mul f3, f1, f2 ld f1, 4(r1) Load buffers 1 2 3 FP adders FP registers 4 5 Reservation stations FP multipliers Reservation stations associated with functional units: simplifies scheduling & management of structural hazards Inf3 Computer Architecture - 2016-2017 9

Reservation station components! Op: Operation to be performed! Qj, Qk: Reservation station producing source registers! Vj, Vk: Values of source operands! Busy: indicates whether reservation station is busy! Register result status Qi: indicates which RS will write each register, if one exists. Blank otherwise. Inf3 Computer Architecture - 2016-2017 10

Operation of Tomasulo s Algorithm! Instruction Issue: Get next instruction from head of the issue queue If reservation station RS is available then: For each p in { j, k } representing operand register u If Reg[u].Qi == 0 then RS.Vp = Reg[u].value // value ready now If Reg[u].Qi!= 0 then RS.Qp = Reg[u].Qi // value not yet ready RS.Busy = 1 // reserve this RS RS.Op = instruction opcode // set the operation! Execution: Wait until (RS.Qj == 0) and (RS.Qk == 0), and whilst waiting: For each p in { j, k } If CDB.tag == RS.Qp then { RS.Vp = CDB.value; RS.Qp = 0 } When (RS.Qj == 0) and (RS.Qk == 0), perform operation in RS.Op! Write Result: When CDB is free, broadcast CDB = { tag = RS.id, value = RS.result } and clear RS.Busy Inf3 Computer Architecture - 2016-2017 11

Tomasulo Example! LDs: 2 cycles! ADDs and SUBDs: 2 cycles! MULTDs: 10 cycles! DIVDs: 40 cycles Inf3 Computer Architecture - 2016-2017 12

Tomasulo Example Cycle 0 Inf3 Computer Architecture - 2016-2017 13

Tomasulo Example Cycle 1 Inf3 Computer Architecture - 2016-2017 14

Tomasulo Example Cycle 2 Inf3 Computer Architecture - 2016-2017 15

Tomasulo Example Cycle 3 Inf3 Computer Architecture - 2016-2017 16

Tomasulo Example Cycle 4 Inf3 Computer Architecture - 2016-2017 17

Tomasulo Example Cycle 5 Inf3 Computer Architecture - 2016-2017 18

Tomasulo Example Cycle 6 Inf3 Computer Architecture - 2016-2017 19

Tomasulo Example Cycle 7 Inf3 Computer Architecture - 2016-2017 20

Tomasulo Example Cycle 8 Inf3 Computer Architecture - 2016-2017 21

Tomasulo Example Cycle 9 Inf3 Computer Architecture - 2016-2017 22

Tomasulo Example Cycle 10 Inf3 Computer Architecture - 2016-2017 23

Tomasulo Example Cycle 11 Inf3 Computer Architecture - 2016-2017 24

Tomasulo Example Cycle 12 Inf3 Computer Architecture - 2016-2017 25

Tomasulo Example Cycle 13 Inf3 Computer Architecture - 2016-2017 26

Tomasulo Example Cycle 14 Inf3 Computer Architecture - 2016-2017 27

Tomasulo Example Cycle 15 Inf3 Computer Architecture - 2016-2017 28

Tomasulo Example Cycle 16 Inf3 Computer Architecture - 2016-2017 29

Tomasulo Example Cycle 55 Inf3 Computer Architecture - 2016-2017 30

Tomasulo Example Cycle 56 Inf3 Computer Architecture - 2016-2017 31

Tomasulo Example Cycle 57 Inf3 Computer Architecture - 2016-2017 32

Tomasulo s Advantages! Register renaming: Q j and Q k can come from any reservation station independent of the register file in fact we could have many more reservation stations than registers V j and V k store the actual value to be used! Parallel release of all instructions dependent as soon as the earlier instruction completes (both SUB.D and MUL.D get the value from Load_2 )! No need to wait on WAR and WAW (notice that ADD.D has issued before DIV.D has read its f6 operand and will execute as soon as the SUB.D finishes) Inf3 Computer Architecture - 2012-2013 33