Introduction to synthesis. Logic Synthesis

Similar documents
Programmable Logic Devices Verilog VII CMPE 415

CS8803: Advanced Digital Design for Embedded Hardware

Synthesis of Combinational and Sequential Circuits with Verilog

Chapter 6 Combinational-Circuit Building Blocks

Design Using Verilog

Arithmetic Operators There are two types of operators: binary and unary Binary operators:

ECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic

Lecture 12 VHDL Synthesis

CS470: Computer Architecture. AMD Quad Core

ECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic

B.Tech II Year I Semester (R13) Regular Examinations December 2014 DIGITAL LOGIC DESIGN

Combinational Logic Circuits

R10. II B. Tech I Semester, Supplementary Examinations, May

Topics. Midterm Finish Chapter 7

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC6302 DIGITAL ELECTRONICS

Contents. Chapter 3 Combinational Circuits Page 1 of 34

Chapter 2 Basic Logic Circuits and VHDL Description

Combinational Circuits

Introduction to Verilog HDL. Verilog 1

Chapter 3. Boolean Algebra and Digital Logic

Verilog for Synthesis Ing. Pullini Antonio

TOPIC : Verilog Synthesis examples. Module 4.3 : Verilog synthesis

Combinational Circuit Design

VHDL for Synthesis. Course Description. Course Duration. Goals

ECEN 468 Advanced Logic Design

Synthesis of Language Constructs. 5/10/04 & 5/13/04 Hardware Description Languages and Synthesis

Gate-Level Minimization. BME208 Logic Circuits Yalçın İŞLER

Verilog for High Performance

UNIT I BOOLEAN ALGEBRA AND COMBINATIONAL CIRCUITS PART-A (2 MARKS)

Module 4. Design of Embedded Processors. Version 2 EE IIT, Kharagpur 1

Digital Design with FPGAs. By Neeraj Kulkarni

ECE 545 Lecture 8. Data Flow Description of Combinational-Circuit Building Blocks. George Mason University

Verilog. What is Verilog? VHDL vs. Verilog. Hardware description language: Two major languages. Many EDA tools support HDL-based design

QUESTION BANK FOR TEST

EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis

EE 8351 Digital Logic Circuits Ms.J.Jayaudhaya, ASP/EEE

structure syntax different levels of abstraction

Here is a list of lecture objectives. They are provided for you to reflect on what you are supposed to learn, rather than an introduction to this

Code No: 07A3EC03 Set No. 1


KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT

10EC33: DIGITAL ELECTRONICS QUESTION BANK

Combinational Logic II

Injntu.com Injntu.com Injntu.com R16

Synthesizable Verilog

Code No: R Set No. 1

Combinational Logic & Circuits

(ii) Simplify and implement the following SOP function using NOR gates:


FPGA: FIELD PROGRAMMABLE GATE ARRAY Verilog: a hardware description language. Reference: [1]

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

END-TERM EXAMINATION

CHAPTER 9 MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

SUBJECT CODE: IT T35 DIGITAL SYSTEM DESIGN YEAR / SEM : 2 / 3

Chapter 2 Combinational Logic Circuits

Chapter 3. Gate-Level Minimization. Outlines

Hardware Description Languages: Verilog. Quick History of HDLs. Verilog/VHDL. Design Methodology. Verilog Introduction. Verilog.

Hardware Description Languages: Verilog

Announcements. Midterm 2 next Thursday, 6-7:30pm, 277 Cory Review session on Tuesday, 6-7:30pm, 277 Cory Homework 8 due next Tuesday Labs: project

ECE 545 Lecture 5. Data Flow Modeling in VHDL. George Mason University

CSE140L: Components and Design Techniques for Digital Systems Lab

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Specifying logic functions

Lecture 1: VHDL Quick Start. Digital Systems Design. Fall 10, Dec 17 Lecture 1 1

R07. Code No: V0423. II B. Tech II Semester, Supplementary Examinations, April

The Verilog Language COMS W Prof. Stephen A. Edwards Fall 2002 Columbia University Department of Computer Science

Design of Digital Circuits Lecture 6: Combinational Logic, Hardware Description Lang. & Verilog. Prof. Onur Mutlu ETH Zurich Spring March 2018

COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING QUESTION BANK SUBJECT CODE & NAME: EC 1312 DIGITAL LOGIC CIRCUITS UNIT I

SIR C.R.REDDY COLLEGE OF ENGINEERING, ELURU DEPARTMENT OF INFORMATION TECHNOLOGY LESSON PLAN

Philadelphia University Student Name: Student Number:

RIZALAFANDE CHE ISMAIL TKT. 3, BLOK A, PPK MIKRO-e KOMPLEKS PENGAJIAN KUKUM. SYNTHESIS OF COMBINATIONAL LOGIC (Chapter 8)

CENG 241 Digital Design 1

Lecture Summary Module 2 Combinational Logic Circuits

CSE140L: Components and Design

Digital Design Using Digilent FPGA Boards -- Verilog / Active-HDL Edition

Graduate Institute of Electronics Engineering, NTU. Lecturer: Chihhao Chao Date:

DHANALAKSHMI SRINIVASAN COLLEGE OF ENGINEERING AND TECHNOLOGY

Experiment 3: Logic Simplification

Assignment (3-6) Boolean Algebra and Logic Simplification - General Questions

Review. EECS Components and Design Techniques for Digital Systems. Lec 05 Boolean Logic 9/4-04. Seq. Circuit Behavior. Outline.

Chapter-5. EE 335 : Advanced Microprocessor. Logic Design with Behavioral Models of Combinational and Sequential Logic

R07

EEL 4783: HDL in Digital System Design

Menu. Algebraic Simplification - Boolean Algebra EEL3701 EEL3701. MSOP, MPOS, Simplification

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE)

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad ELECTRONICS AND COMMUNICATIONS ENGINEERING

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

ECE 4514 Digital Design II. Spring Lecture 13: Logic Synthesis

EECS Components and Design Techniques for Digital Systems. Lec 07 PLAs and FSMs 9/ Big Idea: boolean functions <> gates.

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

COMBINATIONAL LOGIC CIRCUITS

VLSI System Design Part II : Logic Synthesis (1) Oct Feb.2007

MLR Institute of Technology

Lec-6-HW-2-digitalDesign

Simple Behavioral Model: the always block

ENGINEERS ACADEMY. 7. Given Boolean theorem. (a) A B A C B C A B A C. (b) AB AC BC AB BC. (c) AB AC BC A B A C B C.

Code No: R Set No. 1

Digital logic fundamentals. Question Bank. Unit I

EECS150 - Digital Design Lecture 10 Logic Synthesis

Transcription:

Introduction to synthesis Lecture 5 Logic Synthesis Logic synthesis operates on boolean equations and produce optimized combinational logic

Logic Minimization Two-level logic minimization Two-level logic usually is one of the sum-of-product : f = ab+cd+ef product-of-sum : f = (a+b)(c+d)(e+f)... Multi-level logic minimization Find terms that can be shared In algebraic term, find common factors f = ab+ac+db+dc = a(b+c) +d(b+c) = (a+d)(b+c) Example 2 level F = abc + abd + a c d + b c d 4 NOTs, 4 3-input ANDs, and 4-input OR 2

Example multi level Decomposition X = ab, Y = c+d, F = XY + X Y Implement F with multi-level logic 2 NOTs, 3 2-input ANDs, and 2 2-input ORs Two level logic minimization Two-level logic minimization can be seen as the origin of logic synthesis Theory and algorithms are well developed long time ago We will study these algorithms this month Any -output combinational function can be implemented as 2-level SOP In the worst case, you can get the truth table and collect min-terms Simple SOP may not be the most efficient way Need to find prime implicant Multi-level logic will reduce size What if implementing multiple functions? Need to find minimal implementation (shared implicants) 3

2-level minimal implementation Theorem (Quine): A minimal SOP implementation of a function must always consist of a sum of prime implicants Apply to 2-level logic only So finding prime implicants are crucial Implicant: a product term p that is included in the function f F=xy +yz => xy and xyz are implicant Prime Implicant: an implicant that is not included in any other implicant xy is prime, but xyz is not High Level Synthesis Remember that your Verilog code is eventdriven under the simulation model blocks are executed in parallel Your hardware is done from primary inputs to primary outputs How does it convert Verilog code into hardware? Something is missing here. 4

Determine the order of data flow To convert a parallel-styled description into a sequential logic it needs to first determine the ORDERING in the data flow In synthesis, it constructs a so-called data flow graph to represent the overall computation Based on the data flow graph, it will decide how many latches should be used where to put them in the logic (the ordering), etc. A Simple Example - Flow Graph 5

Synthesis Has Limitations Synthesis is not a magic word Many behavior descriptions are not synthesizable! Results of synthesis may not satisfy the needs too big, too slow, or even contain errors custom designs are required verification is required (never trust the synthesis results completely) Commonly-Supported Constructs 6

Unsupported Constructs Combinational Logic Elements Commonly synthesized combinational logic Multiplexer Decoder Encoder Comparator Random Logic Lookup Table Adder Subtractor ALU Multiplier PLA Structure Parity Generator 7

Synthesis examples A quick look Synthesis Example A B A B TWO-BIT COMPARATOR A_lt_B A_gt_B A_eq_B A_lt_B = A B + A A B + A B B A_gt_B = A B + A B B + A A B A_eq_B = A A B B + A A B B + A A B B + A A B B A>B A B A B 8

Gate Implementation A W6 W module compare_2_str (A_lt_B, A_gt_B, A_eq_B, A, A, B, B); B A W7 W2 A_lt_B input A, A, B, B; output A_lt_B, A_gt_B, A_eq_B; wire w, w2, w3, w4, w5, w6, w7; B W3 W4 W5 A_gt_B A_eq_B or (A_lt_B, w, w2, w3); nor (A_gt_B, A_lt_B, A_eq_B); and (A_eq_B, w4, w5); and (w, w6, B); and (w2, w6, w7, B); and (w3, w7, B, B); not (w6, A); not (w7, A); xnor (w4, A, B); xnor (w5, A, B); endmodule Using If-Else Procedure-style behavior code module compare_2_algo (A_lt_B, A_gt_B, A_eq_B, A, B); input [:] A, B; output A_lt_B, A_gt_B, A_eq_B; reg A_lt_B, A_gt_B, A_eq_B; always @ (A or B) // Behavior and event expression begin A_lt_B = ; A_gt_B = ; A_eq_B = ; A if (A==B) A_eq_B = ; else if (A > B) A_gt_B = ; B else A_lt_B = ; BEHAVIOR end A endmodule B A_lt_B reg A_gt_B reg A_eq_B reg A_lt_B A_gt_B A_eq_B 9

Two Synthesized Results From behavior: A[] A_eq_B A_lt_B B[:] B[] B[] A[:] A[] A_gt_B A W6 W B A W7 W2 A_lt_B B W3 A_gt_B From gates: W4 A_eq_B W5 Synthesize decision w/ MUX Procedure CC(Rin) { if ( test(rin) ) {res = Rin + 32;} else {res = Rin 32;} end Rin 32 test select res +/- The example is just a pseudo code

Synthesis with library cells module or_nand_ (enable, x, x2, x3, x4, y); input enable, x, x2, x3, x4; output y; wire w, w2, w3; or (w, x, x2); or (w2, x3, x4); or (w3, x3, x4); // redundant nand(y, w, w2, w3, enable); endmodule Example bit-wise operations

Multi-level synthesis Identify shared logic in multi-level structure Control Logic for MUX Datapath 4 channel mux with a continuous assignment 2

Synthesized Logic Check sel=,,2,3 Synthesis of MUX Decoded MUX 3

If-then-else 2- MUX for an if Control Logic at Select Line Control logic 4

Unexpected Latches When a case statement is incomplete, the synthesis may infer the need of a latch to hold result while unspecified inputs present General Synthesis Result when (sel_a, sel_b)=,, y_out keeps the old value 5

Priority Decode Structure low high Technology Mapping Tech Libraries contains cell implemented with certain technology (.3μ,.8 μ, or.25 μ, etc.) 6

Technology Mapping Library Cell Mapping 5-bit adder 7

Enforce Shared Resource We want to use adder, instead of 2 Cont 8

Buses and Tri-state Buffer Bidirectional Buses bidirectional 9

Mux Bus Driver Tri-State and Don t Care Don t care 2

Two Versions Optimized with don t care Summary Synthesis is not magic It can make mistakes Or produce unsatisfactory results Much of the synthesis intelligence comes from add-hoc rules and pattern matching Writing code to influence a synthesis tool demands great experience Today, because of EDA tools, doing design has a lot to do with working around the tool(s) Synthesis happens at different levels Behavior, high-level 2-level and multi logic level Synthesis can be independent of technology mapping Physical synthesis is an entirely different process Contains placement and routing 2