Week #9 Register Transfer and Data Paths

Slides:



Advertisements
Similar presentations
Control path Recall that the control path is the physical entity in a processor which: fetches instructions, fetches operands, decodes instructions, schedules.
Advertisements

Chapter 7 Henry Hexmoor Registers and RTL
8085 processor. Bus system in microprocessor.
Chapter 9 Computer Design Basics. 9-2 Datapaths Reminding A digital system (or a simple computer) contains datapath unit and control unit. Datapath: A.
Chapter 8. Pipelining.
Pipelining I (1) Fall 2005 Lecture 18: Pipelining I.
Pipelining Hwanmo Sung CS147 Presentation Professor Sin-Min Lee.
Instructor: Yuzhuang Hu The Shifter 3 clock cycles will be needed if using a bidirectional shift register with parallel load.  A clock.
Chapter 16 Control Unit Operation No HW problems on this chapter. It is important to understand this material on the architecture of computer control units,
Chapter 7. Register Transfer and Computer Operations
1 COMP541 Sequencing – III (Sequencing a Computer) Montek Singh April 9, 2007.
University College Cork IRELAND Hardware Concepts An understanding of computer hardware is a vital prerequisite for the study of operating systems.
Chapter 16 Control Unit Implemntation. A Basic Computer Model.
Chapter 15 IA 64 Architecture Review Predication Predication Registers Speculation Control Data Software Pipelining Prolog, Kernel, & Epilog phases Automatic.
CPEN Digital System Design Chapter 9 – Computer Design
Logic and Computer Design Dr. Sanjay P. Ahuja, Ph.D. FIS Distinguished Professor of CIS ( ) School of Computing, UNF.
Computer Organization and Architecture
Micro-operations Are the functional, or atomic, operations of a processor. A single micro-operation generally involves a transfer between registers, transfer.
Computers organization & Assembly Language Chapter 0 INTRODUCTION TO COMPUTING Basic Concepts.
9.2 Pipelining Suppose we want to perform the combined multiply and add operations with a stream of numbers: A i * B i + C i for i =1,2,3,…,7.
CSC321 Where We’ve Been Binary representations Boolean logic Logic gates – combinational circuits Flip-flops – sequential circuits Complex gates – modules.
Computer Design Basics
EKT 221/4 DIGITAL ELECTRONICS II  Registers, Micro-operations and Implementations - Part3.
Lecture 8: Processors, Introduction EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer Engineering Spring 2014,
EKT221 ELECTRONICS DIGITAL II CHAPTER 4: Computer Design Basics
Chap 7. Register Transfers and Datapaths. 7.1 Datapaths and Operations Two types of modules of digital systems –Datapath perform data-processing operations.
Chapter 4 Computer Design Basics. Chapter Overview Part 1 – Datapaths  Introduction  Datapath Example  Arithmetic Logic Unit (ALU)  Shifter  Datapath.
REGISTER TRANSFER & MICROOPERATIONS By Sohaib. Digital System Overview  Each module is built from digital components  Registers  Decoders  Arithmetic.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 7 – Registers and Register Transfers Part.
CDA 3101 Fall 2013 Introduction to Computer Organization The Arithmetic Logic Unit (ALU) and MIPS ALU Support 20 September 2013.
CoE3DJ4 Digital Systems Design
EKT 221 : Chapter 4 Computer Design Basics
Computer and Information Sciences College / Computer Science Department CS 206 D Computer Organization and Assembly Language.
Lecture 15 Microarchitecture Level: Level 1. Microarchitecture Level The level above digital logic level. Job: to implement the ISA level above it. The.
Pipelining Example Laundry Example: Three Stages
Register Transfer Languages (RTL)
Basic Elements of Processor ALU Registers Internal data pahs External data paths Control Unit.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
CPU Overview Computer Organization II 1 February 2009 © McQuain & Ribbens Introduction CPU performance factors – Instruction count n Determined.
Chapter 10 Control Unit Operation “Controls the operation of the processor”
1 COMP541 Datapaths I Montek Singh Mar 8, Topics  Over next 2/3 classes: datapaths  Basic register operations Book sections 7-2 to 7-6 and 7-8.
Processor Organization and Architecture Module III.
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 23 Introduction Computer Specification –Instruction Set Architecture (ISA) - the specification.
EKT 221 : Digital 2 Computer Design Basics Date : Lecture : 2 hrs.
REGISTER TRANSFER & MICROOPERATIONS By Sohaib. Digital System Overview  Each module is built from digital components  Registers  Decoders  Arithmetic.
ECEG-3202: Computer Architecture and Organization, Dept of ECE, AAU 1 Register Transfer & Microoperations.
BITS Pilani Pilani Campus Pawan Sharma Lecture / ES C263 INSTR/CS/EEE F241 Microprocessor Programming and Interfacing.
1 REGISTER TRANSFER & MICROOPERATIONS. 2 OUTLINES Register Transfer Language Register Transfer Bus and Memory Transfers Arithmetic Microoperations Logic.
CPU (Central Processing Unit). The CPU is the brain of the computer. Sometimes referred to simply as the processor or central processor, the CPU is where.
REGISTER TRANSFER AND MICROOPERATIONS
REGISTER TRANSFER AND MICROOPERATIONS
Computer Design Basics
Chap 7. Register Transfers and Datapaths
Morgan Kaufmann Publishers The Processor
KU College of Engineering Elec 204: Digital Systems Design
Morgan Kaufmann Publishers
Register Transfer and Microoperations
REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT
Datapaths For the rest of the semester, we’ll focus on computer architecture: how to assemble the combinational and sequential components we’ve studied.
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Serial versus Pipelined Execution
CSC 220: Computer Organization
Recall: ROM example Here are three functions, V2V1V0, implemented with an 8 x 3 ROM. Blue crosses (X) indicate connections between decoder outputs and.
Chapter 8. Pipelining.
Computer Design Basics
Pipelining Appendix A and Chapter 3.
CHAPTER-3 REGISTER TRANSFER LANGUAGE AND MICROOPERATIONS
A relevant question Assuming you’ve got: One washer (takes 30 minutes)
Pipelining.
Presentation transcript:

Week #9 Register Transfer and Data Paths ENG241 Digital Design Week #9 Register Transfer and Data Paths School of Engineering

Week #9 Topics Data Paths and Operations Register Transfer Operations The Arithmetic/Logic Unit Register Transfer Operations Micro-Operations Multiplexer-Based Transfer Bus-Based Transfer Complete Data Path Design Pipelining Fall 2014 ENG241/Digital Design School of Engineering

Resources Chapter #7, Mano Sections 7.2 Register Transfers 7.3 Register Transfer Operations 7.4 VHDL and RTL 7.5 Micro Operations 7.6 Multiplexer Based Transfers 7.8 Bus Based Transfers Fall 2014 ENG241/Digital Design School of Engineering

Parts of CPUs Datapath Control unit Registers, Multiplexors, Adders, Subtractors and logic to perform operations on them (Comb Logic) Control unit Generates signals to control data-path Accepts status signals to perform sequencing Control Data Path Fall 2014 ENG241/Digital Design

Memory and I/O Control Unit + Data Path + Memory + Input Output = Micro-computer System MEMORY Input and Output Fall 2014 ENG241/Digital Design

Arithmetic/Logic Unit (ALU) The ALU is a combinational circuit that performs a set of basic arithmetic and logic operations. An adder can perform addition, subtraction, … Select lines are used to determine the operation to be performed. Fall 2014 ENG241/Digital Design

ALU Design using Hierarchy This ALU has: 2 control lines S0,S1 for arithmetic S2 selects logical ops Start designing in parts Fall 2014 ENG241/Digital Design

One Stage ALU Design a 1-bit Arithmetic unit Design a 1-bit Logic unit Combine the two units to form a 1-bit Arithmetic/Logic Replicate as many times to form an n-bit ALU Fall 2014 ENG241/Digital Design

Arithmetic Circuit The basic component of an arithmetic circuit is a: N-bit Ripple Carry Adder (Parallel Adder). By controlling the data inputs to the parallel adder, it is possible to obtain different types of arithmetic operations (Cin is also an input) Select lines S0, S1 can be used to control input Y. Why? Fall 2014 ENG241/Digital Design

Looking Inside What possible functionality can I achieve if I control the ‘Y’ Value to the n-bit Adder? B Input Logic Table  Functionality. How to design the B Input Logic? Fall 2014 ENG241/Digital Design

Design of B Select Logic Use an 8-to-1 Mux (Straight forward Solution). Or … use a 4-to-1 mux! Can we do better? YES: simplify the expression from the truth table using a K-Map Fall 2014 ENG241/Digital Design

1-bit (Single Stage) Arithmetic Circuit The B logic is nothing but a 2-to-1 Mux instead of the 4-to-1 Mux Fall 2014 ENG241/Digital Design

4-Bit Circuit Duplicating the one stage four times will produce a 4-bit circuit Fall 2014 ENG241/Digital Design

Logic Section Design Generous number of operations Fall 2014 ENG241/Digital Design

Arithmetic/Logic Unit The logic circuit can be combined with the arithmetic circuit to produce an ALU. Selection variables S1 and S0 can be common to both circuits, A third selection variable S2 can be used to differentiate between the logic and arithmetic operations. Fall 2014 ENG241/Digital Design

One Stage Arithmetic Circuit Fall 2014 ENG241/Digital Design

One Stage Logic Circuit Fall 2014 ENG241/Digital Design

One Stage ALU Mux to choose Arithmetic or Logic Fall 2014 ENG241/Digital Design

n-bit ALU Duplicate the one stage n times!! Fall 2014 ENG241/Digital Design

Resulting Control The one stage ALU can provide 8 arithmetic, and 4 logic operations. Fall 2014 ENG241/Digital Design

Register Transfer Language (RTL) Register Transfer Language (RTL): used to describe CPU organization in high-level terms RTL expressions are made up of elements which describe the registers being manipulated, and the micro-ops being performed on them Here are the basic components of RTL expressions: Fall 2014 ENG241/Digital Design

Register Transfer Language (RTL) Registers named in uppercase PC, IR (instruction), R3 The operations on the data in registers are called microoperations Fall 2014 ENG241/Digital Design

Micro-Operations Basic operations of the datapath Example: Moving data from one register to another Adding the contents of two registers Incrementing the contents of a register The control unit provides the signals that sequence the micro-operations in a prescribed manner The results of a currently executing micro-operation may determine both the sequence of control signals and the sequence of future micro-operations to be executed (e.g. BNE) A micro operation is expected to complete in one clock Fall 2014 ENG241/Digital Design

RTL Transfer from R1 to R2 Conditional R2  R1 R2 is destination R1 is source Conditional If(K1 = 1) then (R2  R1) K1: R2  R1 as a shorter form Fall 2014 ENG241/Digital Design

Transfer K1: R2  R1 Transfer at the clock edge When K1 is high n bits wide Fall 2014 ENG241/Digital Design

Symbols Note memory transfers DR  M[AR] (contents of Memory) Fall 2014 ENG241/Digital Design

Syntax not VHDL (similar) Fall 2014 ENG241/Digital Design

Types of Microoperations Transfer – (have just looked at) Arithmetic Logic Shift Fall 2014 ENG241/Digital Design

Arithmetic Basic ops (addition, subtraction, ..) R0  R1 + R2 Subtraction by 2’s complement Fall 2014 ENG241/Digital Design

Notation is Shorthand for Hardware Consider and Note overflow and carry registers Fall 2014 ENG241/Digital Design

Logic Microoperations OR notation a little confusing shows two types of syntax for ORs Fall 2014 ENG241/Digital Design

Shift Microoperations Here just the basic one-bit shifts Bit falls off the end, zero shifted in Fall 2014 ENG241/Digital Design

Multiplexer-Based Transfers There are occasions when a register receives data from two or more different sources at different times. Recall that multiplexers are used to conditionally transfer values from the input to the output. Fall 2014 ENG241/Digital Design

Multiplexer-Based Transfers Consider Which can also be expressed as Block diagram? Fall 2014 ENG241/Digital Design

Multiplexer Block Diagram Fall 2014 ENG241/Digital Design

Detailed Fall 2014 ENG241/Digital Design

Bus-Based Transfers How about when there are lots of registers? We can use buses and send data over common set of wires Busses are more efficient scheme for transferring data between registers! Fall 2014 ENG241/Digital Design

Bus-Based Transfers A Bus is a shared transfer path. It is characterized by a set of common lines (i) Data + (ii) Control, (iii) Status The control signals for the logic select a single source and one or more destinations on any clock cycle. SRC1 DEST1 DEST2 SRC2 Fall 2014 ENG241/Digital Design

Simple Case: using Muxes! Signals S1, S0 select the source Signals L0, L1, L2 enable loading of the registers. The single bus (on the right) can achieve more transfers than system on the left! One mux One output bus Fall 2014 ENG241/Digital Design

Transfers Only single source About ½ the hardware Select/Load Signals (table) Limitations! Fall 2014 ENG241/Digital Design

Three-State Bus Remember three-state drivers allow having multiple outputs share wire Note the small inverted triangle denotes the 3-state output of the register. A bus can be constructed with the three state buffers. Many three state buffer outputs can be connected together to form a bit line of a bus less delay than multiplexer based systems Fall 2014 ENG241/Digital Design

Same Example with 3-State Notice that both systems in the figure have the same capability in term of transfers. However the 3-state bus has: Fewer wires Easier to expand! Fall 2014 ENG241/Digital Design

Memory Transfers Usually one or more buses associated with memory Address Data Note that memory can be slower, so may have to use complex timing Address on one clock cycle Data latched at later clock cycle Fall 2014 ENG241/Digital Design

Properties of Memory Volatile Nonvolatile Memory disappears if power goes out Typical computer RAM Static RAM (SRAM), Dynamic RAM (DRAM) Nonvolatile ROM Flash memories Magnetic memories like disk, tape Fall 2014 ENG241/Digital Design

Simple View of RAM Of some word size n Some capacity 2k k bits of address line A read line A write line Fall 2014 ENG241/Digital Design

Memory Transfer Read: DR  M[AR] where Write: M[AR]  DR M denotes Memory, DR denotes Data Register, and AR denotes Address Register Write: M[AR]  DR Write: M[A1]  D2 Fall 2014 ENG241/Digital Design

Memory Transfer Fall 2014 ENG241/Digital Design

Data Paths --> ALU + Storage Computer Systems often employ a number of storage elements in conjunction with a shared operation unit called an Arithmetic/Logic Unit (ALU) to form data path. To perform a micro operation, the contents of a specified source registers are applied to the inputs of the shared ALU. The ALU performs an operation, and the result of this operation is transferred to a destination register. Fall 2014 ENG241/Digital Design

Data Paths, single clock cycle Since the ALU is designed as a pure combinational circuit, the entire register transfer operation from the source registers, through the ALU, and into the destination register is performed in one clock cycle. Fall 2014 ENG241/Digital Design

Datapath A Simple bus-based data path: four registers, an ALU, and a shifter. Each register is connected to two multiplexers to form ALU input buses A and B (Register File) Another Mux is used to choose between Registers and a constant. Functional Unit: ALU and a shifter Fall 2014 ENG241/Digital Design

Datapath Blue signals are generated by control Decoder along with the Load-enable signal determines the destination Register (R0,R1,R2,R3) Fall 2014 ENG241/Digital Design

Datapath MB Select determines if the source B is a Register or Constant. G Select determines the operation to be performed by ALU. MF Select determines if the output is the ALU or Shifter MD Select determines if the input to the Register File is the Function Unit or external Data. Fall 2014 ENG241/Digital Design

Datapath Four status bits are shown (V,C,N,Z) that can be used by the control unit It is useful to have certain information based on the results of an ALU operation available for use by the control unit to make decisions.??? Make Corrections Skip an instruction Loops If/Else Statements … Fall 2014 ENG241/Digital Design

Example: R1R2+R3 Signals? What about timing? A, B select MB Select G Select MF Select MD Select Destination (D) Load enable What about timing? Fall 2014 ENG241/Digital Design

Timing All can occur in one clock, but Signals must be available in time to propagate through muxes, ALU and Be at Register inputs by next pos-edge Fall 2014 ENG241/Digital Design

Datapath Higher-level view for hierarchical design Can replace modules with same interface but different implementation Fall 2014

Performance Improvement In addition to providing a data path that performs the necessary register transfer micro operations, we need to be concerned about the speed or rate at which the micro operations are performed. How? First we need to know the maximum speed by which our data path can be run. Then we will explore how we can make it faster. (Pipelining) Fall 2014 ENG241/Digital Design

Pipelining Pipelining exploits parallelism at the instruction level. Pipelining is an implementation technique in which multiple instructions are overlapped in execution. Today pipelining is key to making processors fast. Fall 2014 ENG241/Digital Design

Pipelining: Example Laundry Ann, Brian, Cathy, Dave each have one load of clothes to wash, dry, and fold Washer takes 30 minutes Dryer takes 40 minutes “Folder” takes 20 minutes A B C D Fall 2014 ENG241/Digital Design

Sequential Laundry 6 PM 7 8 9 10 11 Midnight 30 40 20 30 40 20 30 40 Time 30 40 20 30 40 20 30 40 20 30 40 20 T a s k O r d e A B C D Sequential laundry takes (90 x 4 = 360 minutes) 6 hours for 4 loads If they learned pipelining, how long would laundry take? Fall 2014 ENG241/Digital Design

Pipelining Lessons 6 PM 7 8 9 30 40 20 A B C D Tot Time: 210 minutes!! versus 360 with no pipelining Potential speedup = Number pipe stages Unbalanced lengths of pipe stages reduces speedup Time to “fill” pipeline and time to “drain” it reduces speedup Pipelining doesn’t help latency of single task, it helps throughput of entire workload 7 8 9 Time T a s k O r d e 30 40 20 A B C D Fall 2014 ENG241/Digital Design

Assembly Line Analogy to Data Path Pipeline A custom product being built may pass the assembly line many times before it is completed. A conveyor belt moves components from stage to stage This technique increases throughput Fall 2014 ENG241/Digital Design

Conventional Data Path Timing The figure shows the maximum delay values for each of the components of a typical data path: 4ns (3ns + 1ns) to read two operands from register file. 4ns to perform an operation. 4ns (1ns + 1ns) to write info back Total  12 ns to perform a single micro operation. The rate of execution is then set at 1/12ns = 83.3MHz Can we make it faster? Fall 2014 ENG241/Digital Design

Pipelined Data Path Timing We can break the delay of 12ns by inserting registers between the different components of the system. A register is inserted between the function unit and the register file (OF) Another register can be inserted between the function unit and MUX D. (EX + WB) 3 stage pipeline: OF / EX / WB The maximum delay now is 5ns allowing a maximum clock frequency of 200 MHz Fall 2014 ENG241/Digital Design

Pipelining 3 Stages Operand Fetch Execute Write Back Fall 2014

Pipelining Conventional data path  7 x 12ns = 84ns Pipelined data path  9 x 5ns = 45ns Fall 2014 ENG241/Digital Design

Summary Data Paths are an essential part of any CPU. ALUs (Arithmetic Logic Units) are at the heart of any Data Path. Multiplexors and Tri-State buffers are used extensively in Data Paths (data movement) Pipelining is a technique to improve throughput by overlapping instruction execution. Fall 2014 ENG241/Digital Design

Extra Slides Fall 2014 ENG241/Digital Design