RTL Hardware Design by P. Chu Chapter 71. 1. Derivation of efficient HDL description 2. Operator sharing 3. Functionality sharing 4. Layout-related circuits.

Slides:



Advertisements
Similar presentations
Logical Design.
Advertisements

Combinational Circuits
Functions and Functional Blocks
Datapath Functional Units. Outline  Comparators  Shifters  Multi-input Adders  Multipliers.
Addition (2). Outline Full Adder 3-Bit Adder 2’s Complement Subtraction.
Parallel Adder Recap To add two n-bit numbers together, n full-adders should be cascaded. Each full-adder represents a column in the long addition. The.
ECE 331 – Digital System Design
1 CS 140 Lecture 14 Standard Combinational Modules Professor CK Cheng CSE Dept. UC San Diego Some slides from Harris and Harris.
Chapter 6 Arithmetic. Addition Carry in Carry out
UNIVERSITY OF MASSACHUSETTS Dept
Computer ArchitectureFall 2008 © August 25, CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (1)
EE466: VLSI Design Lecture 14: Datapath Functional Units.
Introduction to CMOS VLSI Design Datapath Functional Units
ECE 301 – Digital Electronics
ECE 301 – Digital Electronics
Datapath Functional Units Adapted from David Harris of Harvey Mudd College.
Computer ArchitectureFall 2007 © August 29, 2007 Karem Sakallah CS 447 – Computer Architecture.
Lecture # 12 University of Tehran
CS 105 Digital Logic Design
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Building Functions.
Lecture 18: Datapath Functional Units
Top-down modular design
RTL Hardware Design Chapter Fundamental limitation of EDA software 2. Realization of VHDL operator 3. Realization of VHDL data type 4. VHDL synthesis.
Aug Shift Operations Source: David Harris. Aug Shifter Implementation Regular layout, can be compact, use transmission gates to avoid threshold.
1 CHAPTER 4: PART I ARITHMETIC FOR COMPUTERS. 2 The MIPS ALU We’ll be working with the MIPS instruction set architecture –similar to other architectures.
Outline Analysis of Combinational Circuits Signed Number Arithmetic
Combinational Logic Chapter 4. Digital Circuits Combinational Circuits Logic circuits for digital system Combinational circuits the outputs are.
Dr. Ahmed El-Bialy, Dr. Sahar Fawzy Combinational Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
+ CS 325: CS Hardware and Software Organization and Architecture Combinational Circuits 1.
Digital Arithmetic and Arithmetic Circuits
Introduction to Chapter 6  Digital circuits are frequently used for arithmetic operations  Fundamental arithmetic operations on binary numbers and digital.
Chapter 4 – Arithmetic Functions and HDLs Logic and Computer Design Fundamentals.
CSE 241 Computer Organization Lecture # 9 Ch. 4 Computer Arithmetic Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering.
Description and Analysis of MULTIPLIERS using LAVA.
Advanced VLSI Design Unit 05: Datapath Units. Slide 2 Outline  Adders  Comparators  Shifters  Multi-input Adders  Multipliers.
EKT 221/4 DIGITAL ELECTRONICS II  Registers, Micro-operations and Implementations - Part3.
ECE Advanced Digital Systems Design Lecture 4 – Combinational Circuits in VHDL Capt Michael Tanner Room 2F46A HQ U.S. Air Force Academy.
COE 202 Introduction to Verilog Computer Engineering Department College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals.
RTL Hardware Design by P. Chu Chapter Poor design practice and remedy 2. More counters 3. Register as fast temporary storage 4. Pipelined circuit.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 8 Arithmetic.
Kavita Bala CS 3410, Spring 2014 Computer Science Cornell University.
CEC 220 Digital Circuit Design Introduction to VHDL Wed, February 25 CEC 220 Digital Circuit Design Slide 1 of 19.
George Mason University Data Flow Modeling in VHDL ECE 545 Lecture 7.
ECE 331 – Digital System Design Multi-bit Adder Circuits, Adder/Subtractor Circuit, and Multiplier Circuit (Lecture #12)
ECOM 4311—Digital System Design with VHDL
Data Flow Modeling in VHDL
1 ECE 545—Digital System Design with VHDL Lecture 1 Digital Logic Refresher Part A – Combinational Logic Building Blocks.
Apr. 3, 2000Systems Architecture I1 Introduction to VHDL (CS 570) Jeremy R. Johnson Wed. Nov. 8, 2000.
May 9, 2001Systems Architecture I1 Systems Architecture I (CS ) Lab 5: Introduction to VHDL Jeremy R. Johnson May 9, 2001.
RTL Hardware Design Chapter Combinational versus sequential circuit 2. Simple signal assignment statement 3. Conditional signal assignment statement.
MicroProcessors Lec. 4 Dr. Tamer Samy Gaafar. Course Web Page —
CEC 220 Digital Circuit Design Introduction to VHDL Wed, Oct 14 CEC 220 Digital Circuit Design Slide 1 of 19.
President UniversityErwin SitompulDigital Systems 7/1 Lecture 7 Digital Systems Dr.-Ing. Erwin Sitompul President University
RTL Hardware Design by P. Chu Chapter 9 – ECE420 (CSUN) Mirzaei 1 Sequential Circuit Design: Practice Shahnam Mirzaei, PhD Spring 2016 California State.
George Mason University Data Flow Modeling of Combinational Logic ECE 545 Lecture 5.
Logic Design (CE1111 ) Lecture 4 (Chapter 4) Combinational Logic Prepared by Dr. Lamiaa Elshenawy 1.
ETE 204 – Digital Electronics Combinational Logic Design Single-bit and Multiple-bit Adder Circuits [Lecture: 9] Instructor: Sajib Roy Lecturer, ETE,ULAB.
Combinational Circuits
Binary or Gray How is better?.
Digital Systems Section 8 Multiplexers. Digital Systems Section 8 Multiplexers.
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Data Flow Modeling of Combinational Logic
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Data Flow Description of Combinational-Circuit Building Blocks
Data Flow Description of Combinational-Circuit Building Blocks
ECE 352 Digital System Fundamentals
Combinational Circuits
Description and Analysis of MULTIPLIERS using LAVA
Presentation transcript:

RTL Hardware Design by P. Chu Chapter 71

1. Derivation of efficient HDL description 2. Operator sharing 3. Functionality sharing 4. Layout-related circuits 5. General circuits RTL Hardware Design by P. Chu Chapter 72

 Think “H”, not “L”, of HDL  Right way: ◦ Research to find an efficient design (“domain knowledge”) ◦ Develop VHDL code that accurately describes the design  Wrong way: ◦ Write a C program and covert it to HDL RTL Hardware Design by P. Chu Chapter 73

 Circuit complexity of VHDL operators varies  Arith operators ◦ Large implementation ◦ Limited optimization by synthesis software  “Optimization” can be achieved by “sharing” in RT level coding ◦ Operator sharing ◦ Functionality sharing RTL Hardware Design by P. Chu Chapter 74

RTL Hardware Design by P. Chu Chapter 75 An example 0.55 um standard-cell CMOS implementation

◦ “value expressions” in priority network and multiplexing network are mutually exclusively: ◦ Only one result is routed to output ◦ Conditional sig assignment (if statement) sig_name <= value_expr_1 when boolean_expr_1 else value_expr_2 when boolean_expr_2 else value_expr_3 when boolean_expr_3 else... value_expr_n; RTL Hardware Design by P. Chu Chapter 76

◦ Selected sig assignment (case statement) with select_expression select sig_name <= value_expr_1 when choice_1, value_expr_2 when choice_2, value_expr_3 when choice_3,... value_expr_n when choice_n; RTL Hardware Design by P. Chu Chapter 77

 Original code: r <= a+b when boolean_exp else a+c;  Revised code: src0 <= b when boolean_exp else c; r <= a + src0; RTL Hardware Design by P. Chu Chapter 78

RTL Hardware Design by P. Chu Chapter 79 Area: 2 adders, 1 mux Delay: Area: 1 adder, 1 mux Delay:

 Original code: process(a,b,c,d,...) begin if boolean_exp_1 then r <= a+b; elsif boolean_exp_2 then r <= a+c; else r <= d+1; end if end process; RTL Hardware Design by P. Chu Chapter 710

 Revised code: process(a,b,c,d,...) begin if boolean_exp_1 then src0 <= a; src1 <= b; elsif boolean_exp_2 then src0 <= a; src1 <= c; else src0 <= d; src1 <= " "; end if; end process; r <= src0 + src1; RTL Hardware Design by P. Chu Chapter 711

RTL Hardware Design by P. Chu Chapter 712 Area: 2 adders, 1 inc, 2 mux Area: 1 adder, 4 mux

 Original code: with sel select r <= a+b when "00", a+c when "01", d+1 when others;  Revised code: with sel_exp select src0 <= a when "00"|"01", d when others; with sel_exp select src1 <= b when "00", c when "01", " " when others; r <= src0 + src1; RTL Hardware Design by P. Chu Chapter 713

RTL Hardware Design by P. Chu Chapter 714 Area: 2 adders, 1 inc, 1 mux Area: 1 adder, 2 mux

 Original code: process(a,b,c,d,...) begin if boolean_exp then x <= a + b; y '0'); else x '1'); y <= c + d; end if; end process; RTL Hardware Design by P. Chu Chapter 715

RTL Hardware Design by P. Chu Chapter 716 Area: 2 adders, 2 mux

 Revised code: begin if boolean_exp then src0 <= a; src1 <= b; x <= sum; y '0'); else src0 <= c; src1 <= d; x '1'); y <= sum; end if; end process; sum <= src0 + src1; RTL Hardware Design by P. Chu Chapter 717

RTL Hardware Design by P. Chu Chapter 718 Area: 1 adder, 4 mux Is the sharing worthwhile? –1 adder vs 2 mux –It depends...

 Sharing is done by additional routing circuit  Merit of sharing depends on the complexity of the operator and the routing circuit  Ideally, synthesis software should do this RTL Hardware Design by P. Chu Chapter 719

◦ A large circuit involves lots of functions ◦ Several functions may be related and have common characteristics ◦ Several functions can share the same circuit. ◦ Done in an “ad hoc” basis, based on the understanding and insight of the designer (i.e., “domain knowledge”) ◦ Difficult for software it since it does not know the “meaning” of functions RTL Hardware Design by P. Chu Chapter 720

RTL Hardware Design by P. Chu Chapter 721 e.g., add-sub circuit

RTL Hardware Design by P. Chu Chapter 722  Observation: a – b can be done by a + b’ + 1

RTL Hardware Design by P. Chu Chapter 723  Manual injection of carry-in:  Append an additional bit in right (LSB):

RTL Hardware Design by P. Chu Chapter 724

RTL Hardware Design by P. Chu Chapter 725 e.g., sign-unsigned comparator

RTL Hardware Design by P. Chu Chapter 726 Binary wheel

 Observation: ◦ Unsigned: normal comparator ◦ Signed:  Different sign bit: positive number is larger  Same sign: compare remaining 3 LSBs This works for negative number, too! E.g., 1111 (-1), 1100 (-4), 1001(-7) 111 > 100 > 001 ◦ The comparison of 3 LSBs can be shared RTL Hardware Design by P. Chu Chapter 727

RTL Hardware Design by P. Chu Chapter 728

RTL Hardware Design by P. Chu Chapter 729 e.g., Full comparator

RTL Hardware Design by P. Chu Chapter 730

RTL Hardware Design by P. Chu Chapter 731

 Read and RTL Hardware Design by P. Chu Chapter 732

◦ After synthesis, placement and routing will derive the actual physical layout of a digital circuit on a silicon chip. ◦ VHDL cannot specify the exact layout ◦ VHDL can outline the general “shape” RTL Hardware Design by P. Chu Chapter 733

◦ Silicon chip is a “square” ◦ “Two-dimensional” shape (tree or rectangular) is better than one-dimensional shape (cascading-chain) ◦ Conditional signal assignment/if statement form a single “horizontal” cascading chain ◦ Selected signal assignment/case statement form a large “vertical” mux ◦ Neither is ideal RTL Hardware Design by P. Chu Chapter 734

RTL Hardware Design by P. Chu Chapter 735

RTL Hardware Design by P. Chu Chapter 736

RTL Hardware Design by P. Chu Chapter 737 e.g., Reduced-xor circuit

RTL Hardware Design by P. Chu Chapter 738

RTL Hardware Design by P. Chu Chapter 739

RTL Hardware Design by P. Chu Chapter 740

 Comparison of n-input reduced xor ◦ Cascading chain :  Area: (n-1) xor gates  Delay: (n-1)  Coding: easy to modify (scale) ◦ Tree:  Area: (n-1) xor gates  Delay: log 2 n  Coding: not so easy to modify ◦ Software should able to do the conversion automatically RTL Hardware Design by P. Chu Chapter 741

RTL Hardware Design by P. Chu Chapter 742 e.g., Reduced-xor-vector circuit

 Direct implementation RTL Hardware Design by P. Chu Chapter 743

RTL Hardware Design by P. Chu Chapter 744  Functionality Sharing

RTL Hardware Design by P. Chu Chapter 745  Direct tree implementation

RTL Hardware Design by P. Chu Chapter 746  “Parallel-prefix” implementation

RTL Hardware Design by P. Chu Chapter 747

 Comparison of n-input reduced-xor-vector ◦ Cascading chain  Area: (n-1) xor gates  Delay: (n-1)  Coding: easy to modify (scale) ◦ Multiple trees  Area: O(n 2 ) xor gates  Delay: log 2 n  Coding: not so easy to modify ◦ Parallel-prefix  Area: O(nlog 2 n) xor gates  Delay: log 2 n  Coding: difficult to modify ◦ Software is not able to convert cascading chain to parallel-prefix RTL Hardware Design by P. Chu Chapter 748

RTL Hardware Design by P. Chu Chapter 749 e.g., Shifter (rotating right) Direct implementation

RTL Hardware Design by P. Chu Chapter 750

RTL Hardware Design by P. Chu Chapter 751 Better implementation

RTL Hardware Design by P. Chu Chapter 752

 Comparison for n-bit shifter ◦ Direct implementation  n n-to-1 mux  vertical strip with O(n 2 ) input wiring  Code not so easy to modify ◦ Staged implementation  n*log 2 n 2-to-1 mux  Rectangular shaped  Code easier to modify RTL Hardware Design by P. Chu Chapter 753

◦ Gray code counter ◦ Signed addition with status ◦ Simple combinational multiplier RTL Hardware Design by P. Chu Chapter 754

RTL Hardware Design by P. Chu Chapter 755 e.g., Gray code counter

RTL Hardware Design by P. Chu Chapter 756 Direct implementation

 Observation ◦ Require 2 n rows ◦ No simple algorithm for gray code increment ◦ One possible method  Gray to binary  Increment the binary number  Binary to gray RTL Hardware Design by P. Chu Chapter 757

RTL Hardware Design by P. Chu Chapter 758 binary to gray gray to binary

RTL Hardware Design by P. Chu Chapter 759

RTL Hardware Design by P. Chu Chapter 760 e.g., signed addition with status  Adder with ◦ Carry-in: need an extra bit (LSB) ◦ Carry-out: need an extra bit (MSB) ◦ Overflow:  two operands has the same sign but the sum has a different sign ◦ Zero ◦ Sign (of the addition result)

RTL Hardware Design by P. Chu Chapter 761

RTL Hardware Design by P. Chu Chapter 762 e.g., simple combinational multiplier

RTL Hardware Design by P. Chu Chapter 763

RTL Hardware Design by P. Chu Chapter 764