Logic Synthesis – 3 Optimization Ahmed Hemani Sources: Synopsys Documentation.

Slides:



Advertisements
Similar presentations
Traditional SOC Design Flow
Advertisements

Combinational Logic.
ECE Synthesis & Verification - Lecture 2 1 ECE 667 Spring 2011 ECE 667 Spring 2011 Synthesis and Verification of Digital Circuits High-Level (Architectural)
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Sequential Synthesis.
Low-power Design at RTL level Mohammad Sharifkhani.
ECE 551 Digital System Design & Synthesis Lecture 08 The Synthesis Process Constraints and Design Rules High-Level Synthesis Options.
Kazi Spring 2008CSCI 6601 CSCI-660 Introduction to VLSI Design Khurram Kazi.
ECE Synthesis & Verification - Lecture 8 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Circuits Introduction.
1Kazi Spring 2008 CSCI 660 CSCI-660 Introduction to VLSI Design Khurram Kazi.
Modern VLSI Design 2e: Chapter4 Copyright  1998 Prentice Hall PTR.
Kazi Fall 2006 EEGN 4941 EEGN-494 HDL Design Principles for VLSI/FPGAs Khurram Kazi.
VHDL Coding Exercise 4: FIR Filter. Where to start? AlgorithmArchitecture RTL- Block diagram VHDL-Code Designspace Exploration Feedback Optimization.
King Fahd University of Petroleum and Minerals Computer Engineering Department COE 561 Digital Systems Design and Synthesis (Course Activity) Synthesis.
1 Application Specific Integrated Circuits. 2 What is an ASIC? An application-specific integrated circuit (ASIC) is an integrated circuit (IC) customized.
ECE C03 Lecture 141 Lecture 14 VHDL Modeling of Sequential Machines Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
CS61C L15 Synchronous Digital Systems (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
03/30/031 ECE 551: Digital System Design & Synthesis Lecture Set 9 9.1: Constraints and Timing 9.2: Optimization (In separate file)
1 VLSI CAD Flow: Logic Synthesis, Lecture 13 by Ajay Joshi (Slides by S. Devadas)
Global Timing Constraints FPGA Design Workshop. Objectives  Apply timing constraints to a simple synchronous design  Specify global timing constraints.
CS3350B Computer Architecture Winter 2015 Lecture 5.2: State Circuits: Circuits that Remember Marc Moreno Maza [Adapted.
StateCAD FPGA Design Workshop. For Academic Use Only Presentation Name 2 Objectives After completing this module, you will be able to:  Describe how.
FPGA-Based System Design: Chapter 4 Copyright  2004 Prentice Hall PTR HDL coding n Synthesis vs. simulation semantics n Syntax-directed translation n.
ASIC Design Flow – An Overview Ing. Pullini Antonio
Sub-expression elimination Logic expressions: –Performed by logic optimization. –Kernel-based methods. Arithmetic expressions: –Search isomorphic patterns.
Section 10: Advanced Topics 1 M. Balakrishnan Dept. of Comp. Sci. & Engg. I.I.T. Delhi.
ECE Advanced Digital Systems Design Lecture 12 – Timing Analysis Capt Michael Tanner Room 2F46A HQ U.S. Air Force Academy I n t e g r i.
12004 MAPLDSynthesis Issues Synthesis Issues Demonstrated with a Simple Finite State Machine Using Gray Codes.
Tools - Implementation Options - Chapter15 slide 1 FPGA Tools Course Implementation Options.
FORMAL VERIFICATION OF ADVANCED SYNTHESIS OPTIMIZATIONS Anant Kumar Jain Pradish Mathews Mike Mahar.
King Fahd University of Petroleum and Minerals Computer Engineering Department COE 561 Digital Systems Design and Synthesis (Course Activity) Synthesis.
Modern VLSI Design 3e: Chapter 4 Copyright  1998, 2002 Prentice Hall PTR Topics n Combinational network delay. n Logic optimization.
1 An Update on Verilog Ξ – Computer Architecture Lab 28/06/2005 Kypros Constantinides.
1 Logic Synthesis Using Cadence Ambit. 2 Environment Setup Enter the following to.cshrc or a c-shell command file. –setenv LM_LICENSE_FILE full_path/license.dat.
Programmable Logic Training Course HDL Editor
SEQUENTIAL LOGIC By Tom Fitch. Types of Circuits Combinational: Gates Combinational: Gates Sequential: Flip-Flops Sequential: Flip-Flops.
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
04/06/031 ECE 551: Digital System Design & Synthesis Lecture Set 9 9.1: Constraints and Timing (In separate file) 9.2: Optimization - Part 1 9.3: Optimization.
ECE-C662 Lecture 2 Prawat Nagvajara
Courtesy RK Brayton (UCB) and A Kuehlmann (Cadence) 1 Logic Synthesis Multi-Level Logic Synthesis.
Introduction to ASIC flow and Verilog HDL
Modern VLSI Design 4e: Chapter 4 Copyright  2008 Wayne Wolf Topics n Combinational network delay. n Logic optimization.
03/31/031 ECE 551: Digital System Design & Synthesis Lecture Set 8 8.1: Miscellaneous Synthesis (In separate file) 8.2: Sequential Synthesis.
CDA 4253 FPGA System Design RTL Design Methodology 1 Hao Zheng Comp Sci & Eng USF.
IAY 0600 Digital Systems Design Event-Driven Simulation VHDL Discussion Alexander Sudnitson Tallinn University of Technology.
1 COMP541 Finite State Machines - 1 Montek Singh Sep 22, 2014.
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
03/30/031 ECE Digital System Design & Synthesis Lecture Design Partitioning for Synthesis Strategies  Partition for design reuse  Keep related.
FEV And Netlists Erik Seligman CS 510, Lecture 5, January 2009.
04/21/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Functional & Timing Verification 10.2: Faults & Testing.
1 COMP541 Sequential Logic – 2: Finite State Machines Montek Singh Feb 29, 2016.
-1- Soft Core Viterbi Decoder EECS 290A Project Dave Chinnery, Rhett Davis, Chris Taylor, Ning Zhang.
Copyright 2001, Agrawal & BushnellVLSI Test: Lecture 61 Lecture 6 Logic Simulation n What is simulation? n Design verification n Circuit modeling n True-value.
ASIC Design Methodology
VLSI Testing Lecture 5: Logic Simulation
Register Transfer Specification And Design
VLSI Testing Lecture 5: Logic Simulation
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
COMP541 Sequential Logic – 2: Finite State Machines
Vishwani D. Agrawal Department of ECE, Auburn University
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
Processor (I).
Topics HDL coding for synthesis. Verilog. VHDL..
Timing Analysis 11/21/2018.
IAY 0800 Digitaalsüsteemide disain
ECE 551: Digital System Design & Synthesis
ECE-C662 Introduction to Behavioral Synthesis Knapp Text Ch
FPGA Tools Course Answers
Topics Logic synthesis. Placement and routing..
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
Instructor: Michael Greenbaum
Presentation transcript:

Logic Synthesis – 3 Optimization Ahmed Hemani Sources: Synopsys Documentation

Develop HDL filesSpecify Libraries Library Objects link_library target_library symbol_library synthetic_library Read Design analyze elaborate read_file Set Design Constraints Design Rule Constraints set_max_transition set_max_fanout set_max_capacitance Design Optimisation Constraints Create_clock set_clock_latency set_propagated_clock set_clock_uncertainty set_clock_transition set_input_delay set_output_delay set_max_area Select Compile Strategy Top Down Bottom Up Optimize the Design Compile Analyze and Resolve Design Problems Check_design Report_area Report_constraint Report_timing Save the Design database write Define Design Environment Set_operating_conditions Set_wire_load_model Set_drive Set_driving_cell Set_load Set_fanout_load Set_min_library

Phases of Optimization Algorithmic Level Optimisation High Level Optimization Logic Level Optimization Flattening. Structuring. Gate level optimisation. Technology Mapping. In-place. Translation. Boundary. RTL. State Minimisation. State Assignment. Retiming

High Level Optimization Resource Sharing. Implementation Selection. Arithmetic Optimization. An Example of Resource Sharing

HLO – Resource Sharing  Though resource in general means computational, storage and interconnect elements, here it implies only computational elements.  Two simple rules decide the amount of resources required by an RTL specification:  Each type of operator requires a unique resource type. For instance ’+’ operator requires an adder and ’>’ requires a comparator.  The maximum number of resources required for each operator type is the number of times an operator is used in the RTL specification.  As an optimisation measure, the above two rules are extended:  Some operators can be mapped to a common resource type. For instance, ’+’ and ’-’ operators can be mapped to an add-subtract unit.  Multiply with constant numbers ???  Operators in different clock cycles can share the same resource. This is determined by analysing if there are any data flow or control flow conflicts, which is discussed later. * + - > >= < <=

Scope and Restrictions for Sharing Resources can be shared only if they are in the same process

Control Flow Conflicts Two operations can be shared only if no execution path that reaches both operations exists from the start of the block to the end of the block.For example, if two operations lie in separate branches of an if or case statement, they are not on the same path (and can be shared).

Data Flow Conflicts When the A+B addition is shared with the TEMP_2+F addition on an adder called R1 and the D+E addition is shared with the TEMP_1+C addition on an adder called R2, a feedback loop results. The variable TEMP_1 connects the output of R1 to the input of R2. The variable TEMP_2 connects the output of R2 to the input of R1, and a feedback loop is created. The circuit is not faulty, because the multiplexing conditions never allow the entire path to be activated simultaneously. Still, the VHDL Compiler resource sharing mechanism does not allow combinational feedback paths to be created, because most timing verifiers cannot handle combinational feedback paths properly.

Implementation Selection Different implementations of the DesignWare components have different area and timing characteristics Design constraints determine the appropriate DesignWare Component

Architectural Level – Operator Re-ordering

Forced Operator Order

Common Sub Expression Sharing Default behaviour controlled by variable hlo_share_common_subexpressions Use set_share_cse to set the share_cse attribute for a design

Phases of Optimisation

Two Level vs. Multi Level Source: MIT. Course Lecture L

Flattening Goal is to create a 2 level S.O.P. Hierarchy is preserved. Two edged sword: Removes bad structure. Removes good structure as well. Speed is the motive. 2 level S.O.P does not always mean 2 level delay: Library limitations. ??

Flattenning - contd Multiple Output Single Output Flattening guidelines. Use it gain speed for unstructured / random logic. follow it up with structuring. Do not use when the logic is – Structured. Contains EXORs and MUXes. > 20 inputs. Flattening options: Flattening. Minimisation. Phase inversion. Minimisation. Single output. Multiple output. Flattening is not the same as ungroup

Flattening – contd. Controlling flattening. Off by default. To turn it on: dc_shell> set_flatten true Options. dc_shell> set_flatten -minmise single_output dc_shell> set_flatten -minmise multiple_output dc_shell> set_flatten -phase true. Effort. dc_shell> set_flatten -effort medium Phase Inversion

Logic Level - Structuring Adds intermediate variables and thus logic structure Sharing expressions -> area efficiency. Negative effect on delay. Structuring options. Structuring. Boolean Optimization. Timing Driven Structuring.(TDS) The default Synopsys optimisation strategy. Takes delay constraints into account while structuring. Tries to optimise the critical path, by flattening it. Adds structure to less critical paths. Important to accurately constraint designs. Boolean Optimisation. Uses Boolean Algebra rules like a + a = a, a + a’ = 1 etc. to optimise area at the expense of delay. Boolean Optimisation and TDS should not be ON at the same time. Boolean Optimisation creates deep logic, which TDS cannot undo. CPU intensive. Off by default.

Structuring Options - Example Structuring Timing Driven Structuring Multi-Level Boolean Optimization

Gate Level – Combinational Mapping Maps the combinational parts of the design to the current technology library to meet design goals

Mapping via DAG Covering Source: MIT. Course Lecture L

Sample Library Source: MIT. Course Lecture L

Sample Library 2 Source: MIT. Course Lecture L

Trivial Covering Source: MIT. Course Lecture L

Covering #1 Source: MIT. Course Lecture L

Covering #2

Gate Level – Fixing Violated Design Rule Constraints  The Mapping Process  Two phases.  In first phase tries to meet the optimisation goals.  In the second phase tries to meet the design rule constraints.  If the initial input is a netlist of gates, i.e., mapped, the gate structure is destroyed and a new netlist is built.  Incremental Mapping.  An existing gate structure is treated as a starting point.  New gate structure is accepted only if it lowers the cost.  Normal flattening and structuring is not done.  Local structuring is tried.  dc_shell> compile -incremental mapping  In place optimisation.  Pre-layout fanout based estimates of net length, resistance and capacitance could differ from post-layout numbers.  To change mapping to take these differences into account use in place optimisation.  dc_shell> compile -in_place

Boundary Optimization A gate level optimisation that uses port connect information such as unconnect, opposite, logic one and logic zero. Removes any gate which deives output ports that are not connected outside a design. Able to consider swapping of input ports to minimise logic. Two ways to invoke: Apply to entire design hieracrhcy. Apply to selected designs in the hierarchy. Use it with care, can change the functionality of sub-design

Boundary Optimization - contd

Multi Cycle Paths Timing path that is not expected to propagate a signal in one cycle To undo a set_multicycle_path command use reset_path or reset_design. This input changes once every 2 nd cycle

False Paths You can exclude false paths from an Static Timing Analysis run. False paths are considered unconstrained.

Pipelining – a fully manual approach Increases the throughput of designs to meet high timing constraints.

Re-timing – a semi-automatic approach Increases the throughput of designs to meet high timing constraints.

Re-timing - Limitations Only works on mapped/compiled designs

Re-timing – registered outputs How to get the output registers right?

Finite State Machines

Synthesis of Finite State Machines Idea - Make Synopsys aware of that the logic represents an FSM

Synthesis flow of FSMs in Synopsys

Synthesis Flow of FSMs in Synopsys  Extraction of the state-vector in a design where the state-vector is not the only sequential elements dc> analyze -f vhdl state_vector.vhdl dc> elaborate fsm -arch fsm_behave dc> group -fsm -design_name extracted_fsm dc> current_design = extracted_fsm dc> replace_synthetic dc> extract dc> report -fsm  Extraction of the state-vector in a design where the state-vector attribute is not set in the HDL  Existing Registers U1:FLIP_FLOP port map (NEXT_STATE[0], CLK, STATE[0]); U2:FLIP_FLOP port map (NEXT_STATE[1], CLK, STATE[1]);  How to give the register the state attributes set_fsm_state_vector { U1, U2 } set_fsm_encoding {"S0=2#00", "S1=2#01", "S2=2#10", "S3=2#11" }  Use the script above for the rest

Synthesis flow of FSMs in Synopsys ”S0=2#0001” ”S1=2#0010” ”S2=2#0100” ”S3=2#1000 ” FSM minimize