Register Transfer Methodology I

Similar documents
Computer organization

FINITE STATE MACHINE: PRINCIPLE AND PRACTICE

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Finite State Machine. RTL Hardware Design by P. Chu. Chapter 10 1

Algorithm & Flowchart & Pseudo code. Staff Incharge: S.Sasirekha

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

FSMD and Gezel. Jan Madsen

ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path

Sistemas Digitais I LESI - 2º ano

Let s put together a Manual Processor

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

Chapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann

2 SYSTEM DESCRIPTION TECHNIQUES

Upon completion of unit 1.1, students will be able to

Flip-Flops, Registers, Counters, and a Simple Processor

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

Finite State Machine Design and VHDL Coding Techniques

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

Digital Logic Design Sequential circuits

Counters are sequential circuits which "count" through a specific state sequence.

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

Combinational Logic Design Process

More Verilog. 8-bit Register with Synchronous Reset. Shift Register Example. N-bit Register with Asynchronous Reset.

High-Level Synthesis for FPGA Designs

ECE232: Hardware Organization and Design. Part 3: Verilog Tutorial. Basic Verilog

An Integer Square Root Algorithm

Gates, Circuits, and Boolean Algebra

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 OUTCOME 3 PART 1

Registers & Counters

Hardware Implementations of RSA Using Fast Montgomery Multiplications. ECE 645 Prof. Gaj Mike Koontz and Ryon Sumner

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

CSE2102 Digital Design II - Topics CSE Digital Design II

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

Digital Electronics Detailed Outline

LADDER LOGIC/ FLOWCHART PROGRAMMING DIFFERENCES AND EXAMPLES

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

Lesson 12 Sequential Circuits: Flip-Flops

Review: MIPS Addressing Modes/Instruction Formats

CHAPTER 3 Boolean Algebra and Digital Logic

Lecture 12: More on Registers, Multiplexers, Decoders, Comparators and Wot- Nots

Modeling Latches and Flip-flops

Lecture-3 MEMORY: Development of Memory:

CHAPTER 11 LATCHES AND FLIP-FLOPS

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

CS 61C: Great Ideas in Computer Architecture Finite State Machines. Machine Interpreta4on

Generating MIF files

Multipliers. Introduction

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics

Getting the Most Out of Synthesis

CHAPTER 11: Flip Flops

Lecture 5: Gate Logic Logic Optimization

Memory Elements. Combinational logic cannot remember

Instruction Set Architecture. Datapath & Control. Instruction. LC-3 Overview: Memory and Registers. CIT 595 Spring 2010

Sequential Circuit Design

Systems I: Computer Organization and Architecture

A Second Undergraduate Course in Digital Logic Design: The Datapath+Controller-Based Approach

Sequential Logic Design Principles.Latches and Flip-Flops

SEQUENTIAL CIRCUITS. Block diagram. Flip Flop. S-R Flip Flop. Block Diagram. Circuit Diagram

Topics of Chapter 5 Sequential Machines. Memory elements. Memory element terminology. Clock terminology

Step : Create Dependency Graph for Data Path Step b: 8-way Addition? So, the data operations are: 8 multiplications one 8-way addition Balanced binary

Cascaded Counters. Page 1 BYU

Digital Design with VHDL

ECE 3401 Lecture 7. Concurrent Statements & Sequential Statements (Process)

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Systems I: Computer Organization and Architecture

if-then else : 2-1 mux mux: process (A, B, Select) begin if (select= 1 ) then Z <= A; else Z <= B; end if; end process;

Central Processing Unit Simulation Version v2.5 (July 2005) Charles André University Nice-Sophia Antipolis

COMBINATIONAL CIRCUITS

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

FPGA. AT6000 FPGAs. Application Note AT6000 FPGAs. 3x3 Convolver with Run-Time Reconfigurable Vector Multiplier in Atmel AT6000 FPGAs.

A New Paradigm for Synchronous State Machine Design in Verilog

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

FPGA Implementation of a Hybrid On-line Process Monitoring in PC Based Real-Time Systems*

ALGORITHMS AND FLOWCHARTS

Engr354: Digital Logic Circuits

DEPARTMENT OF INFORMATION TECHNLOGY

Chapter 8. Sequential Circuits for Registers and Counters

Chapter 5. Sequential Logic

PROBLEMS #20,R0,R1 #$3A,R2,R4

Example-driven Interconnect Synthesis for Heterogeneous Coarse-Grain Reconfigurable Logic

CNC FOR EDM MACHINE TOOL HARDWARE STRUCTURE. Ioan Lemeni

2003 HSC Notes from the Marking Centre Software Design and Development

VHDL Test Bench Tutorial

Modeling Registers and Counters

路 論 Chapter 15 System-Level Physical Design

2011, The McGraw-Hill Companies, Inc. Chapter 5

Figure 1: Graphical example of a mergesort 1.

DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 5. LECTURE: REGISTERS AND RELATED

INTRODUCTION TO DIGITAL SYSTEMS. IMPLEMENTATION: MODULES (ICs) AND NETWORKS IMPLEMENTATION OF ALGORITHMS IN HARDWARE

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell

Measurement and Analysis Introduction of ISO7816 (Smart Card)

From Control Loops to Software

Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems

Adder.PPT(10/1/2009) 5.1. Lecture 13. Adder Circuits

SOFT 437. Software Performance Analysis. Chapter 4: Software Execution Model

Transcription:

Register Transfer Methodology I Chapter 11 1

Outline 1. Introduction 2. Overview of FSMD 3. FSMD design of a repetitive-addition multiplier 4. Alternative design of a repetitiveaddition multiplier 5. Timing and performance analysis of FSMD 6. Sequential add-and-shift multiplier Chapter 11 2

1. Introduction How to realize an algorithm in hardware? Two characteristics of an algorithm: Use of variables (symbolic memory location) e.g., n = n + 1 in C Sequential execution (execution order is important) Chapter 11 3

E.g., an algorithm: Summate 4 number Divide the result by 8 Round the result Pseudocode Chapter 11 4

Dataflow implementation in VHDL Convert the algorithm in to combinational circuit No memory elements The sequence is embedded into the flow of data Chapter 11 5

VHDL code Chapter 11 6

Block diagram Chapter 11 7

Problems with dataflow implementation: Can only be applied to trivial algorithm Not flexible Can we just share one adder in a timemultiplexing fashion to save hardware resources What happen if input size is not fixed (i.e., size is determined by an external input) Chapter 11 8

Register Transfer Methodology Realized algorithm in hardware Use register to store intermediate data and imitate variable Use a datapath to realize all register operations Use a control path (FSM) to specify the order of register operation Chapter 11 9

The system is specified as sequence of data manipulation/transfer among registers Realized by FSM with a datapath (FSMD) Chapter 11 10

2. Overview of FSMD Chapter 11 11

Basic form: Basic RT operation Interpretation: At the rising edge of the clock, the output of registers r r src1 src2. etc are available The output are passed to a combinational circuit that performs f( ) At the next rising edge of the clock, the result is stored into r dest Chapter 11 12

E.g., Chapter 11 13

Implementation example Chapter 11 14

Multiple RT operations Chapter 11 15

FSM as control path FSM is a good to control RT operation State transition is on clock-by-clock basis FSM can enforce order of execution FSM allows branches on execution sequence Normally represented in an extended ASM chart known as ASMD (ASM with datapath) chart Chapter 11 16

E.g. Note: new value of r1 is only available when the FSM exits s1state Chapter 11 17

Basic Block Diagram of FSMD Chapter 11 18

3. FSMD design example: Repetitive addition multiplier Basic algorithm: 7*5 = 7+7+7+7+7 Pseudo code Chapter 11 19

ASMD-friendly code Chapter 11 20

Input: a_in, b_in: 8-bit unsigned clk, reset start: command Output: r: 16-bit unsigned ready: status ASMD chart Default RT operation: keep the previous value Note the parallel execution in op state Chapter 11 21

Construction of the data path List all RT operations Group RT operation according to the destination register Add combinational circuit/mux Add status circuits E.g Chapter 11 22

E.g., Circuit associated with r register Chapter 11 23

Chapter 11 24

VHDL code: follow the block diagram Chapter 11 25

Chapter 11 26

Chapter 11 27

Chapter 11 28

Chapter 11 29

Chapter 11 30

Use of register in decision box Register is updated when the FSM exits current state How to represent count_0= 1 using register? Chapter 11 31

Other VHDL coding styles: Various code segments can be combined Should always separate registers from combinational logic May be a good idea to isolate the main functional units Chapter 11 32

E.g., 2-segment code Chapter 11 33

Chapter 11 34

Chapter 11 35

4. Alternative design of a repetitiveaddition multiplier Resource sharing Hardware can be shared in a timemultiplexing fashion Assign the operation in different states Most complex circuits in the FSMD design is normally the functional units of the datapath Sharing in repetitive addition multiplier Addition and decrementing The same adder can be used in 2 states Chapter 11 36

Chapter 11 37

Chapter 11 38

Chapter 11 39

Chapter 11 40

Chapter 11 41

Mealy-controlled operation Control signals is edge-sensitive Mealy output is faster and requires fewer states E.g., Chapter 11 42

Mealy control signal for multiplier load and ab0 states perform no computation Mealy control can be used to eliminate ab0 and load states Chapter 11 43

r, n, b register loaded using Mealy signal Chapter 11 44

Chapter 11 45

5. Clock rate and Performance Maximal clock rate of FSMD More difficult to analyze because of two interactive loops The boundary of the clock rate can be found Chapter 11 46

Best-case scenario: Control signals needed at late stage Status signal available at early stage Chapter 11 47

Chapter 11 48

Best-case scenario: Control signals needed at early stage Status signal available at late stage Chapter 11 49

Chapter 11 50

Chapter 11 51

Performance of FSMD Tc: Clock period K: # clock cycles to compete the computation Total time = K * Tc K determined by algorithm, input patterns etc. Chapter 11 52

8-bit input Best: b=0, K=2 Worst: b=255, K=257 N-bit input: Worst: K = 2+(2 n -1) Chapter 11 53

8-bit input Best: b=0, K=2 Worst: b=255, K=2 + 255*2 N-bit input: Worst: K=2+2*(2 n -1) Chapter 11 54

6. Sequential add-and-shift multiplier Chapter 11 55

Chapter 11 56

Chapter 11 57

Note the use of b_next and n_next a<<1 and b>>1 require no logic 8-bit input Best: b=0, K = 1 + 8 Worst: b=255, K = 1 + 8*2 N-bit input: Worst: K=2+2*n Chapter 11 58

Chapter 11 59

Chapter 11 60

Chapter 11 61

Refinement No major computation done in the shift state: the add and shift states can be merged Data path can be simplified: Replace 2n-bit adder with (n+1)-bit adder Reduce the a register from 2n bits to n bits Use the lower part of the p register to store B and eliminate the b register Chapter 11 62

Chapter 11 63

Chapter 11 64

Chapter 11 65

Chapter 11 66