Tuesday, July 30, 2019
Compiler Design 2
Outline s Refreshing â⬠¦ Uncensored â⬠¦ Groundbreaking â⬠¦. The Dr. Wangââ¬â¢s original lecture: s s s s s Tutorial of Design Compiler s s Introduction Setting Up the Tutorial Graphical Interface The Alarm Clock Design Setting Design Environment Setting Design Constraints Overview of Optimization Phases Analysis of Report DC Tutorial ââ¬â 2 Introduction s s s Introduction s s s s The Synthesis Process Design Compiler Products Synthesis Programs and Tools Design Styles Input and Output Formats User Interfaces Script Files DC Tutorial ââ¬â 4 The Synthesis Process Start Rewrite Verilog Code Read in Design Set Attributes Set Realistic Timing Goal Check Design Errors No Yes Fix Bugs Change Constraints Modify Compile Attributes Ungroup Design Blocks The DC Products s DC Professional ââ¬â No multi-frequency clocking, latch-based time borrowing, pipeline re-timing, critical path resynthesis, in-place optimization, and incremental editing s DC Expert ââ¬â Include features for maximizing performance s FPGA Compiler ââ¬â Targets only FPGA technology Optimize No Good? Yes Done DC Tutorial ââ¬â 5 DC Tutorial ââ¬â 6 1 Synthesis Tools HDL Design Analyzer HDL Compilers DesignWare DesignWare Developer Architectural Optimization s s Architectural Optimization Gate-Level s s Design Analyzer Logic Optimization Design Compilers Cell Library Library Compiler s s Arithmetic Optimization Timing and Area-Based Resource Sharing Sub-expression Removal Constraint-Driven Resource Selection Inference of Synthetic Part (DesignWare) For more information ââ¬â HDL Compiler for Verilog Reference Manual Optimized Gate-level Netlist DC Tutorial ââ¬â 7 DC Tutorial ââ¬â 8 DesignWare s DesignWare Developer Provide a library of high-level design components ââ¬â Adders, Multiplier, etc. s s The HDL compiler will select the proper components for you based on your timing and area goals See Documentation Collection (open collection) ââ¬â Synopsys DesignWare 1997. 01 s Create DesignWare Libraries DC Tutorial ââ¬â 9 DC Tutorial ââ¬â 10 DC Products s Cell Library s Library of basic cells used by DC ââ¬â AND, OR, XOR, etc. s Optimize your design at the gate level Using selected cell libraries s For FPGA compiler, it may contain more complex cells ââ¬â Xilinx CLBs, IOBs, etc. DC Tutorial ââ¬â 11 DC Tutorial ââ¬â 12 2 Library Compiler Design Styles s Yes, you can create your own cell libraries s s Hierarchical or Flatten Combinational or Sequential DC Tutorial ââ¬â 13 DC Tutorial ââ¬â 14 Input Formats s s s s Output Formats s s s s s VHDL Verilog PLA & EDIF 2. 00 Xilinx XNF s Synopsys binary format (. db files) VHDL Verilog EDIF 2. 00 Equation, LSI Logic, Mentor Graphics, PLA, state table, Tegas formats Xilinx XNF format DC Tutorial ââ¬â 15 DC Tutorial ââ¬â 16 User Interfaces s Scripts s shell> dc_shell ââ¬â ââ¬â ââ¬â ââ¬â ââ¬â ââ¬â ââ¬â ââ¬â ââ¬â unix-like command shell dc_shell> quit dc_shell> cd my_dir dc_shell> alias wv write -f verilog dc_shell> pwd dc_shell> history n dc_shell> list -command dc_shell> man dc_shell> sh ââ¬Å"lpr â⬠s s s s shell> design_analyzer graphical interface DC Tutorial ââ¬â 17 A set of command can be put together into a file called ââ¬Å"scriptâ⬠Then, you donââ¬â¢t need to re-type some the commands again and again when using the dc_shell Scripts for this tutorial will be provided for your reference You can run them when you are home without the X-window capability DC Tutorial ââ¬â 18 3 Locate Documentation s s s s s s s shell> design_analyzer & select Help ââ¬â> On-Line Documentation â⬠¦. Ignore the square window with ââ¬Å"Titlesâ⬠ââ¬â select Cancel to close it ââ¬â focus on the one with ââ¬Å"File, Edit, View â⬠¦Ã¢â¬ select File ââ¬â> Open Collection select Synopsys Synthesis Tools 1997. 1 and then click OK select Documents Formatted for Printing and then click Open In the ââ¬Å"File, Edit, View â⬠¦Ã¢â¬ window, now you can select a list of on-line documents DC Tutorial ââ¬â 19 Setting Up the Tutorial Setting Up the Tutorial s s s s Creating The Directories s >cp -r /baby/synopsys/doc/syn/tutorial . Home Directory tutorial Creating the directories Setting paths and aliases Creating a start-up file Running tutorial with scripts db/ verilog/ vhdl/ appendix_A/ Script files work (empty) DC Tutorial ââ¬â 21 DC Tutorial ââ¬â 22 Path s s .synopsys_dc. s etup file %> source /usr/local/bin/setup. synopsys Or you can put it in . cshrc file ââ¬â %> source . cshrc ââ¬â %> rehash s s You can take a look of the setup file ââ¬â %> more /usr/local/bin/setup. synopsys s Creating a . synopsys_dc. setup file can overwrite system default settings %> cp ~/tutorial/. sysnopsys_dc. setup ~/. synopsys_dc. setup %> vi ~/. synopsys_dc. setup ââ¬â company = ââ¬Å"Motorola Somersetâ⬠; ââ¬â designer = ââ¬Å"CEOâ⬠; ââ¬â view_background = ââ¬Å"whileâ⬠; s It basically setup the right environmental variables for you DC Tutorial ââ¬â 23 DC Tutorial ââ¬â 24 4 More about setup file s Scripts s s %> more . synopsys_dc. setup ââ¬â search_path = { } + search_path ââ¬â link_library â⬠¦ target_library â⬠¦ symbol_library â⬠¦ define_design_lib â⬠¦ s s s s s search_path = {a directory} + search_path ââ¬â if you cp tutorial into a directory other than home link_library: location of subdesgins referenced by the design target_library: identify technology libraries symbol_library: identify symbols library for generating/viewing schematics define_design_lib: identify a temporary place to store intermediate files created by the analyzer DC Tutorial ââ¬â 25 No X-Window, No Problem Find script files in ~/tutorial/appendix_A/. See Design Analyzer Reference Manual for more detail DC Tutorial ââ¬â 26 Graphical Interface s s Start: %> design_analyzer & Quit: Select File ââ¬â> Quit Menu Bar Graphical Interface View Buttons Level Buttons Scroll Bar Message Area (view_background = ââ¬Å"whileâ⬠;) View Window DC Tutor ial ââ¬â 28 Mouse Buttons s Check Default Setup s Setup ââ¬â> Defaults â⬠¦ Left Button ââ¬â Select design and design objects s Mid Button ââ¬â Add or remove objects from a group of objects already selected s Right Button Bring up the pop-up menu DC Tutorial ââ¬â 29 DC Tutorial ââ¬â 30 5 Read in a Design s Save a Design s File ââ¬â> ââ¬â analyze & elaborate ââ¬â read File ââ¬â> Save or Save As â⬠¦ ââ¬â Once a design is selected s analyze : ââ¬â read in VHDL/Verilog; check for syntax and synthesizale logic; store as intermediate formats ââ¬â Use to read each sub-design + top level design s elaborate : ââ¬â create the design from intermediate formats; determine the correct bus size; Use for top level design + sub-design with parameters passing in s read : read design formats other than HDL (db, PLA, tc. ) DC Tutorial ââ¬â 31 DC Tutorial ââ¬â 32 A Design Has 4 Views s s s s s Design View s Design View Symbol View Sc hematic View Hierarchy View T View (No Use) After ââ¬Å"readâ⬠in all 13 verilog files in the tutorial directory ââ¬â you first enter the Design View DC Tutorial ââ¬â 33 DC Tutorial ââ¬â 34 Symbol View s Schematic View s Select TIME_STATE_MACHINE and double-click on it -> you enter the symbol view of the design Click on the ââ¬Å"schematic viewâ⬠button on the left hand side DC Tutorial ââ¬â 35 DC Tutorial ââ¬â 36 6 Hierarchy View s Design View Icons s s s s Click the up arrow (left hand side) to go back to design view; doubleclick on TOP; Select View ââ¬â> Change View ââ¬â> Hierarchy ââ¬â TOP contains 6 modules Netlist: read in as a netlist and optimized to gates Equation: In VHDL, Verilog, or equation format that is partially or completely behavioral PLA: Specified in PLA format State Table: Specified in state table format Y=A+B 010-0 1-101 PLA State Table Netlist Equation DC Tutorial ââ¬â 37 DC Tutorial ââ¬â 38 Command Window s dc_shell Commands Setup ââ¬â> Command Window â⬠¦ s For more information, ââ¬â see Design Compiler Reference Manual: Fundamentals DC Tutorial ââ¬â 39 DC Tutorial ââ¬â 40 Design Attributes s Operating Environment Sub-menu s Attributes are values you set to control the optimization process ââ¬â Select Attributes from the menu s The Attributes menu provide access to ââ¬â ââ¬â ââ¬â ââ¬â ââ¬â ââ¬â ââ¬â Set input and output delays Set drive strengths set loads Characterize subdesigns Select operating conditions Choose a wire load model Create or modify a clock DC Tutorial ââ¬â 41 Set design properties that describes the internal conditions of a design and the designââ¬â¢s interaction with its surrounding ââ¬â drive strength on ports ââ¬â the time that signals arrive on ports ââ¬â load driven by output ports DC Tutorial ââ¬â 42 7 Optimization Constraints s Design Optimization s Set the goal for design optimization ââ¬â largest delay allowed ââ¬â greatest area allowed Select Tools ââ¬â> Design Optimization ââ¬â See Design Compiler Reference Manual: Optimization and Timing Analysis for more detail s Two set-constraint windows ââ¬â Design Constraints window â⬠¢ Goals for area and power â⬠¢ Design rules implied by technology library â⬠¢ Test-related constraints (testability) ââ¬â Timing Constraints window â⬠¢ Timing constraints s DC Tutorial ââ¬â 43 DC Tutorial ââ¬â 44 Locating Problems s Generate Report s Before and after optimization, use Schematic View and Check Design to locate problems ââ¬â Generate schematic view ââ¬â Select Analysis ââ¬â> Check Design ââ¬â Jump to a design object â⬠¢ Click on an error or warning message in the Design error window â⬠¢ Click on the show button Analysis ââ¬â> Report â⬠¦ DC Tutorial ââ¬â 45 DC Tutorial ââ¬â 46 Run a Script File s Setup ââ¬â> Execute Script ââ¬â check out ~/tutorial/appendix_A/*. script ââ¬â dc_shell> include The Alarm Clock Design DC Tutorial ââ¬â 47 8
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.