Synplify User Guide
Synplify User Guide
Synplify User Guide
Synplify , Synplify Pro , Synplify Premier, and Synplify Premier with Design Planner
Preface
Preface
Disclaimer of Warranty
Synplicity, Inc. makes no representations or warranties, either expressed or implied, by or with respect to anything in this manual, and shall not be liable for any implied warranties of merchantability or fitness for a particular purpose of for any indirect, special or consequential damages.
Copyright Notice
Copyright 1994-2005 Synplicity, Inc. All Rights Reserved. Synplicity software products contain certain confidential information of Synplicity, Inc. Use of this copyright notice is precautionary and does not imply publication or disclosure. No part of this publication may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language in any form by any means without the prior written permission of Synplicity, Inc. While every precaution has been taken in the preparation of this book, Synplicity, Inc. assumes no responsibility for errors or omissions. This publication and the features described herein are subject to change without notice.
Trademarks
Synplicity, the Synplicity S logo, Amplify, Amplify ASIC, Amplify FPGA, Behavior Extracting Synthesis Technology, Certify, Embedded Synthesis, Fortify, HDL Analyst, PowerTime, RealPower, SCOPE, Simply Better Results, Simply Better Synthesis, Syndicated, Synplify, Synplify ASIC, Synplify Lite, Synplify Pro, and Synthesis Constraint Optimization Environment are registered trademarks of Synplicity Inc. BEST, DST, Direct Synthesis Technology, Identify, IICE, MultiPoint, Partition-Driven Synthesis, Physical Analyst, Physical Optimizer, PowerPlanner, PowerRoute, Synplify IP, TOPS, and Total Optimization Physical Synthesis are trademarks of Synplicity, Inc. Verilog is a registered trademark of Cadence Design Systems, Inc. IBM and PC are registered trademarks of International Business Machines Corporation. Microsoft is a registered trademark of Microsoft Corporation. Sun, SPARC, Solaris, and SunOS LO trademarks of Sun Microsystems, Inc. UNIX are is a registered trademark of X/Open Corporation. All other product names mentioned herein are the trademarks or registered trademarks of their respective owners.
ii Fpga User Guide, December 2005
Preface
iii
Preface
BY INDICATING YOUR ACCEPTANCE OF THE TERMS OF THIS AGREEMENT, YOU (LICENSEE) ARE REPRESENTING THAT YOU HAVE THE RIGHT AND AUTHORITY TO LEGALLY BIND YOURSELF OR YOUR COMPANY, AS APPLICABLE, AND CONSENTING TO BE LEGALLY BOUND BY ALL OF THE TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL THESE TERMS DO NOT INSTALL OR USE THE SOFTWARE, AND RETURN THE SOFTWARE TO THE LOCATION OF PURCHASE FOR A REFUND. This is a legal agreement governing use of the software program provided by Synplicity, Inc. (Synplicity) to you (the SOFTWARE). The term SOFTWARE also includes related documentation (whether in print or electronic form), any authorization keys, authorization codes, and license files, and any updates or upgrades of the SOFTWARE provided by Synplicity, but does not include certain open source software licensed by third party licensors and made available to you by Synplicity under the terms of such third party licensors license (such as software licensed under the General Public License (GPL)) (Third Party Software). If Licensee is a participant in the University Program or has been granted an Evaluation License or Subscription License, then some of the following terms and conditions may not apply (refer to the sections entitled, respectively, Evaluation License and Subscription License, below). License. Synplicity grants to Licensee a non-exclusive right to install the SOFTWARE and to use or authorize use of the SOFTWARE by up to the number of nodes for which Licensee has a license and for which Licensee has the security key(s) or authorization code(s) provided by Synplicity or its agents for the purpose of creating and modifying Designs (as defined below). If Licensee has obtained the SOFTWARE under a node-locked license, then a node refers to a specific machine, and the SOFTWARE may be installed only on the number of nodes or machines authorized, must be used only on the machine(s) on which it is installed, and may be accessed only by users who are physically present at that node or machine. A node-locked license may only be used by one user at a time running one instance of the software at a time. If Licensee has obtained the SOFTWARE under a floating license, then a node refers to a concurrent user or session, and the SOFTWARE may be used concurrently by up to the number of users or sessions indicated. All SOFTWARE must be used within the country for which the systems were licensed and at Licensee's Site (contained within a one kilometer radius); however, if Licensee has a floating license then remote use is permitted by employees who work at the site but are temporarily telecommuting to that same site from less than 50 miles away (for example, an employee who works at a home office on occasion), but the maximum number of concurrent sessions or nodes still applies. In addition, Synplicity grants to Licensee a non-exclusive license to copy and distribute internally the documentation portion of the SOFTWARE in support of its license to use the program portion of the SOFTWARE. For purposes of this Agreement the Licensees Site means the location of the server on which the SOFTWARE resides, or when a server is not required, the location of the client computer for which the license was issued.
LO
iv
Preface Evaluation License. If Licensee has obtained the SOFTWARE pursuant to an evaluation license, then, in addition to all other terms and conditions herein, the following restrictions apply: (a) the license to the SOFTWARE terminates after 20 days (unless otherwise agreed to in writing by Synplicity); and (b) Licensee may use the SOFTWARE only for the sole purpose of internal testing and evaluation to determine whether Licensee wishes to license the SOFTWARE on a commercial basis. Licensee shall not use the SOFTWARE to design any integrated circuits for production or pre-production purposes or any other commercial use including, but not limited to, for the benefit of Licensees customers. If Licensee breaches any of the foregoing restrictions, then Licensee shall pay to Synplicity a license fee equal to Synplicitys perpetual list price plus maintenance for the commercial version of the SOFTWARE. Subscription (Time-Based) License. If Licensee has obtained a Subscription License to the SOFTWARE, the, in addition to all other terms and conditions herein, the following restrictions apply: (a) Licensee is authorized to use the SOFTWARE only for a limited time (which time is indicated on the quotation or in the purchase confirmation documents); (b) Licensees right to use the SOFTWARE terminates on the date the subscription term expires as set forth in the quotation or the purchase confirmation documents, unless Licensee has renewed the license by paying the applicable fees. Project Based License. If Licensee has obtained a Project-Based License to the SOFTWARE, in addition to all other terms and conditions herein, the terms of Exhibit A will apply. Copy Restrictions. This SOFTWARE is protected by United States copyright laws and international treaty provisions and Licensee may copy the SOFTWARE only as follows: (i) to directly support authorized use under the license, and (ii) in order to make a copy of the SOFTWARE for backup purposes. Copies must include all copyright and trademark notices. Use Restrictions. This SOFTWARE is licensed to Licensee for internal use only. Licensee shall not (and shall not allow any third party to): (i) decompile, disassemble, reverse engineer or attempt to reconstruct, identify or discover any source code, underlying ideas, underlying user interface techniques or algorithms of the SOFTWARE by any means whatever, or disclose any of the foregoing; (ii) provide, lease, lend, or use the SOFTWARE for timesharing or service bureau purposes, on an application service provider basis, or otherwise circumvent the internal use restrictions; (iii) modify, incorporate into or with other software, or create a derivative work of any part of the SOFTWARE; (iv) disclose the results of any benchmarking of the SOFTWARE, or use such results for its own competing software development activities, without the prior written permission of Synplicity; or (v) attempt to circumvent any user limits, maximum gate count limits or other license, timing or use restrictions that are built into the SOFTWARE. Transfer Restrictions/No Assignment. The SOFTWARE may only be used under this license at the designated locations and designated equipment as set forth in the license grant above, and may not be moved to other locations or equipment or otherwise transferred without the prior written consent of Synplicity. Any permitted transfer of the SOFTWARE will require that Licensee executes a Software Authorization Transfer Agreement provided by Synplicity. Further, Licensee shall not sublicense, or assign this Agreement or any of the rights or licenses granted under this Agreement, without the prior written consent of Synplicity. Security. Licensee agrees to take all appropriate measures to safeguard the SOFTWARE and prevent unauthorized access or use thereof. Suggested ways to accomplish this include: (i) implementation of firewalls and other security applications, (ii) use of FLEXlm options file that restricts access to the SOFTWARE to identified users; (iii) maintaining and storing license information in paper format only; (iv) changing TCP port numbers every three (3) months; and (v) communicating to all authorized users that use of the SOFTWARE is
Fpga User Guide, December 2005 v
Preface subject to the restrictions set forth in this Agreement. Ownership of the SOFTWARE. Synplicity retains all right, title, and interest in the SOFTWARE (including all copies), and all worldwide intellectual property rights therein. Synplicity reserves all rights not expressly granted to Licensee. This license is not a sale of the original SOFTWARE or of any copy. Ownership of Design Techniques. Design means the representation of an electronic circuit or device(s), derived or created by Licensee through the use of the SOFTWARE in its various formats, including, but not limited to, equations, truth tables, schematic diagrams, textual descriptions, hardware description languages, and netlists. Design Techniques means the data, circuit and logic elements, libraries, algorithms, search strategies, rule bases, techniques and technical information incorporated in the SOFTWARE and employed in the process of creating Designs. Synplicity retains all right, title and interest in and to Design Techniques incorporated in the SOFTWARE, including all intellectual property rights embodied therein, provided that to the extent any Design Techniques are included as part of or embedded within Licensees Designs, Synplicity grants Licensee a personal, nonexclusive, nontransferable license to reproduce the Design Techniques and distribute such Design Techniques solely as incorporated into Licensees Designs and not on a standalone basis. Additionally, Licensee acknowledges that Synplicity has an unrestricted, royalty-free right to incorporate any Design Techniques disclosed by Licensee into its software, documentation and other products, and to sublicense third parties to use those incorporated design techniques. Protection of Confidential Information. Confidential Information means (i) the SOFTWARE, in object and source code form, and any related technology, idea, algorithm or information contained therein, including without limitation Design Techniques, and any trade secrets related to any of the foregoing; (ii) either party's product plans, Designs, costs, prices and names; non-published financial information; marketing plans; business opportunities; personnel; research; development or know-how; (iii) any information designated by the disclosing party as confidential in writing or, if disclosed orally, designated as confidential at the time of disclosure and reduced to writing and designated as confidential in writing within thirty (30) days; and (iv) the terms and conditions of this Agreement; provided, however that Confidential Information will not include information that: (a) is or becomes generally known or available by publication, commercial use or otherwise through no fault of the receiving party; (b) is known and has been reduced to tangible form by the receiving party at the time of disclosure and is not subject to restriction; (c) is independently developed by the receiving party without use of the disclosing party's Confidential Information; (d) is lawfully obtained from a third party who has the right to make such disclosure; and (e) is released for publication by the disclosing party in writing. Each party will protect the other's Confidential Information from unauthorized dissemination and use with the same degree of care that each such party uses to protect its own like information. Neither party will use the other's Confidential Information for purposes other than those necessary to directly further the purposes of this Agreement. Neither party will disclose to third parties the other's Confidential Information without the prior written consent of the other party. Third Party Software. Licensee understands and agrees that, although provided to Licensee by Synplicity, Licensees use of each component library or module comprising the Third Party Software shall be governed by the relevant terms and conditions of the third partys license agreements. Termination. Synplicity may terminate this Agreement immediately if Licensee breaches any provision, including without limitation, failure by Licensee to implement adequate security measures as set forth above. Upon notice of termination by Synplicity, all rights granted to Licensee under this Agreement will immediately terminate, and Licensee shall cease using the SOFTWARE and return or destroy all copies (and partial
vi Fpga User Guide, December 2005
LO
Preface copies) of the SOFTWARE and documentation. Limited Warranty and Disclaimer. Synplicity warrants that the program portion of the SOFTWARE will perform substantially in accordance with the accompanying documentation for a period of 90 days from the date of receipt. Synplicitys entire liability and Licensees exclusive remedy for a breach of the preceding limited warranty shall be, at Synplicitys option, either (a) return of the license fee, or (b) providing a fix, patch, work-around, or replacement of the SOFTWARE. In either case, Licensee must return the SOFTWARE to Synplicity with a copy of the purchase receipt or similar document. Replacements are warranted for the remainder of the original warranty period or 30 days, whichever is longer. Some states/jurisdictions do not allow limitations, so the above limitation may not apply. EXCEPT AS EXPRESSLY SET FORTH ABOVE, NO OTHER WARRANTIES OR CONDITIONS, EITHER EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, ARE MADE BY SYNPLICITY OR ITS LICENSORS WITH RESPECT TO THE SOFTWARE AND THE ACCOMPANYING DOCUMENTATION, AND SYNPLICITY EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS NOT EXPRESSLY STATED HEREIN, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. SYNPLICITY AND ITS LICENSORS DO NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET LICENSEES REQUIREMENTS, BE UNINTERRUPTED OR ERROR FREE, OR THAT ALL DEFECTS IN THE PROGRAM WILL BE CORRECTED. Licensee assumes the entire risk as to the results and performance of the SOFTWARE. Some states/jurisdictions do not allow the exclusion of implied warranties, so the above exclusion may not apply. Limitation of Liability. IN NO EVENT SHALL SYNPLICITY OR ITS LICENSORS OR THEIR AGENTS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL OR INCIDENTAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTIONS, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF SYNPLICITY AND/OR ITS LICENSORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. FURTHER, IN NO EVENT SHALL SYNPLICITYS LICENSORS BE LIABLE FOR ANY DIRECT DAMAGES ARISING OUT OF LICENSEES USE OF THE SOFTWARE. IN NO EVENT WILL SYNPLICITY OR ITS LICENSORS BE LIABLE TO LICENSEE FOR DAMAGES IN AN AMOUNT GREATER THAN THE FEES PAID FOR THE USE OF THE SOFTWARE. Some states/jurisdictions do not allow the limitation or exclusion of incidental or consequential damages, so the above limitations or exclusions may not apply. Intellectual Property Right Infringement. Synplicity will defend or, at its option, settle any claim or action brought against Licensee to the extent it is based on a third party claim that the SOFTWARE as used within the scope of this Agreement infringes or violates any US patent, copyright, trade secret or trademark of any third party, and Synplicity will indemnify and hold Licensee harmless from and against any damages, costs and fees reasonably incurred that are attributable to such claim or action; provided that Licensee provides Synplicity with (i) prompt written notification of the claim or action; (ii) sole control and authority over the defense or settlement thereof (including all negotiations); and (iii) at Synplicitys expense, all available information, assistance and authority to settle and/or defend any such claim or action. Synplicitys obligations under this subsection do not apply to the extent that (i) such claim or action would have been avoided but for modifications of the SOFTWARE, or portions thereof, other than modifications made by Synplicity after delivery to Licensee; (ii) such claim or action would have been avoided but for the combination or use of the SOFTWARE, or portions thereof, with other products, processes or materials not supplied or specified in writing by Synplicity; (iii) Licensee continues allegedly infringing activity after being notified thereof or after being informed of modifications that would have avoided the alleged infringement; or (iv) Licensees use of the
Fpga User Guide, December 2005 vii
Preface SOFTWARE is not strictly in accordance with the terms of this Agreement. Licensee will be liable for all damages, costs, expenses, settlements and attorneys fees related to any claim of infringement arising as a result of (i)-(iv) above. If the SOFTWARE becomes or, in the reasonable opinion of Synplicity is likely to become, the subject of an infringement claim or action, Synplicity may, at Synplicitys option and at no charge to Licensee, (a) obtain a license so Licensee may continue use of the SOFTWARE; (b) modify the SOFTWARE to avoid the infringement; (c) replace the SOFTARE with a compatible, functionally equivalent, and non-infringing product, or (d) refund to Licensee the amount paid for the SOFTWARE, as depreciated on a straight-line 5-year basis, or such other shorter period applicable to Subscription Licenses. THE FOREGOIN PROVISIONS OF THIS SECTION STATE THE ENTIRE AND SOLE LIABILITY AND OBLIGATIONS OF SYNPLICTY, AND THE EXCLUSIVE REMEDY OF LICENSEE, WITH RESPECT TO ANY ACTUAL OR ALLEGED INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS BY THE SOFTWARE (INCLUDING DESIGN TECHNIQUES) AND DOCUMENTATION. Export. Licensee warrants that it is not prohibited from receiving the SOFTWARE under U.S. export laws; that it is not a national of a country subject to U.S. trade sanctions; that it will not use the SOFTWARE in a location that is the subject of U.S. trade sanctions that would cover the SOFTWARE; and that to its knowledge it is not on the U.S. Department of Commerces table of deny orders or otherwise prohibited from obtaining goods of this sort from the United States. Miscellaneous. This Agreement is the entire agreement between Licensee and Synplicity with respect to the license to the SOFTWARE, and supersedes any previous oral or written communications or documents (including, if you are obtaining an update, any agreement that may have been included with the initial version of the Software). This Agreement is governed by the laws of the State of California, USA excluding its conflicts of laws principals. This Agreement will not be governed by the U. N. Convention on Contracts for the International Sale of Goods and will not be governed by any statute based on or derived from the Uniform Computer Information Transactions Act (UCITA). If any provision, or portion thereof, of this Agreement is found to be invalid or unenforceable, it will be enforced to the extent permissible and the remainder of this Agreement will remain in full force and effect. Failure to prosecute a partys rights with respect to a default hereunder will not constitute a waiver of the right to enforce rights with respect to the same or any other breach. Government Users. If the SOFTWARE is licensed to the United States government or any agency thereof, then the SOFTWARE and any accompanying documentation will be deemed to be commercial computer software and commercial computer software documentation, respectively, pursuant to DFAR Section 227.7202 and FAR Section 12.212, as applicable. Any use, reproduction, release, performance, display or disclosure of the SOFTWARE and accompanying documentation by the U.S. Government will be governed solely by the terms of this Agreement and are prohibited except to the extent expressly permitted by the terms of this Agreement. June 2005
LO
viii
Contents
Chapter 1: Introduction
The FPGA Synthesis Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About the Synplify and Synplify Pro Software . . . . . . . . . . . . . . . . . . . . . . . . . About the Synplify Premier Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Synplicity FPGA Tool Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Synplicity Product Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 1-2 1-3 1-4 1-8
The Generic FPGA Design Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8 HDL Design Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9 Logic Optimization (Compilation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9 Technology Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10 Placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10 Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10 FPGA Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10 Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11 Scope of the Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11 Starting the Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12 Getting Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13 User Interface Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14 Design Flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Logic Synthesis Design Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Prototyping Design Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Physical Synthesis Design Flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16 1-16 1-17 1-17
ix
Preface
Using an External Text Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8 Setting Editing Window Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9 Setting Up Project Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating a Project File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Opening an Existing Project File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Making Changes to a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Mixed Language Source Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting Project View Display Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . Updating Verilog Include Paths in Older Project Files . . . . . . . . . . . . . . . . . . Setting Up Implementations and Workspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . Working with Multiple Implementations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating Workspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Workspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11 2-11 2-14 2-15 2-16 2-18 2-21 2-22 2-22 2-24 2-25
Preface
Using Auto Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-45 Using Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Comparing Methods for Defining Collections . . . . . . . . . . . . . . . . . . . . . . . . . Creating and Using Collections (SCOPE Window) . . . . . . . . . . . . . . . . . . . . Creating Collections (Tcl Commands) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using the Tcl Find Command to Define Collections . . . . . . . . . . . . . . . . . . . . Using the Expand Tcl Command to Define Collections . . . . . . . . . . . . . . . . . Viewing and Manipulating Collections (Tcl Commands) . . . . . . . . . . . . . . . . Working with Constraint Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . When to Use Constraint Files over Source Code . . . . . . . . . . . . . . . . . . . . . . Tcl Syntax Guidelines for Constraint Files . . . . . . . . . . . . . . . . . . . . . . . . . . . Using a Text Editor for Constraint Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Generating Constraint Files for Forward Annotation . . . . . . . . . . . . . . . . . . . Adding Attributes and Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding Attributes and Directives in VHDL . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding Attributes and Directives in Verilog . . . . . . . . . . . . . . . . . . . . . . . . . . Adding Attributes in the SCOPE Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding Attributes with the SCOPE Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding Attributes to a Tcl Constraint File . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding Attributes From the RTL and Technology Views . . . . . . . . . . . . . . . . 3-47 3-47 3-48 3-51 3-53 3-55 3-56 3-60 3-60 3-61 3-62 3-64 3-66 3-66 3-68 3-68 3-71 3-73 3-74
Handling Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8 Checking Results in the Message Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8 Filtering Messages in the Message Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10 Filtering Messages from the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . 4-13 Handling Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14 Automating Message Filtering with a synhooks Script . . . . . . . . . . . . . . . . . . 4-14 Basic Operations in the Schematic Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Differentiating Between the Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Opening the Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Analyzing Your Design Graphically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Viewing Object Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Selecting Objects in the RTL/Technology Views . . . . . . . . . . . . . . . . . . . . . . Working with Multisheet Schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Moving Between Views in a Schematic Window . . . . . . . . . . . . . . . . . . . . . .
Fpga User Guide, December 2005
Preface
Setting Schematic View Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-26 Managing Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-28 Exploring Design Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Traversing Design Hierarchy with the Hierarchy Browser . . . . . . . . . . . . . . . Exploring Object Hierarchy by Pushing/Popping . . . . . . . . . . . . . . . . . . . . . . Exploring Object Hierarchy of Transparent Instances . . . . . . . . . . . . . . . . . . Finding Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Browsing to Find Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Find for Hierarchical and Restricted Searches . . . . . . . . . . . . . . . . . . . Using Wildcards with the Find Command . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Find to Search the Output Netlist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Crossprobing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Crossprobing Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Crossprobing within an RTL/Technology View . . . . . . . . . . . . . . . . . . . . . . . . Crossprobing from the RTL/Technology View . . . . . . . . . . . . . . . . . . . . . . . . Crossprobing from the Text Editor Window . . . . . . . . . . . . . . . . . . . . . . . . . . Crossprobing from the Tcl Script Window . . . . . . . . . . . . . . . . . . . . . . . . . . . Crossprobing from the FSM Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Analyzing With the HDL Analyst Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Viewing Design Hierarchy and Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Filtering Schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Expanding Pin and Net Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Expanding and Viewing Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Flattening Schematic Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Minimizing Memory Usage While Analyzing Designs . . . . . . . . . . . . . . . . . . . Analyzing Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Analyzing Clock Trees in the RTL View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Viewing Critical Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Analyzing Paths with the Timing Analyst . . . . . . . . . . . . . . . . . . . . . . . . . . . . Analyzing Paths with the Synplify Premier Timing Analyst . . . . . . . . . . . . . . Handling Negative Slack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Island Timing Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Generating the Island Timing Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Automatic Island Timing Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining the Group Range and Global Range . . . . . . . . . . . . . . . . . . . . . . . . Interactive Island Timing Analyst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . LO Viewing the Island Timing Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-30 4-30 4-31 4-36 4-37 4-37 4-39 4-42 4-45 4-48 4-48 4-49 4-49 4-51 4-54 4-54 4-56 4-56 4-60 4-62 4-66 4-67 4-72 4-73 4-73 4-74 4-76 4-79 4-81 4-83 4-83 4-84 4-85 4-86 4-87
xii
Preface
The Island Timing Analyst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Islands/Paths Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Islands/Paths Summary View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Islands/Paths Summary Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Islands/Paths Details View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Island Timing Report Critical Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-98 Assigning Critical Paths to a Region . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-98
Selecting Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14 Selecting Multiple Nets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15 Transcribing Object Selections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-16 Viewing Object Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Viewing Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Tool Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Mouse Strokes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Keyboard Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Zooming in the Physical Analyst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Finding Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Finding Objects with the Find Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . Finding Object Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Markers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Changing Color Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring Enhanced Instance Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-17 5-17 5-20 5-20 5-21 5-22 5-23 5-23 5-27 5-29 5-31 5-31
xiii
Preface
Analyzing Netlist with the Physical Analyst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-42 Expanding and Viewing Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-48 Analyzing Timing with the Physical Analyst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-51 Viewing Critical Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-51 Tracing Critical Paths Forward and Backwards . . . . . . . . . . . . . . . . . . . . . . . 5-54
Optimizing Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5 Sharing Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5 Setting Fanout Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-7 Controlling Buffering and Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8 Controlling Hierarchy Flattening . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10 Preserving Objects from Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10 Preserving Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-12 Defining State Machines for Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining State Machines in Verilog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining State Machines in VHDL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specifying FSMs with Attributes and Directives . . . . . . . . . . . . . . . . . . . . . . . Using the Symbolic FSM Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Choosing When to Use the FSM Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . Running the FSM Compiler on the Whole Design . . . . . . . . . . . . . . . . . . . . . Running the FSM Compiler on Individual FSMs . . . . . . . . . . . . . . . . . . . . . . 6-13 6-13 6-14 6-15 6-17 6-17 6-18 6-20
Using FSM Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-22 Deciding When to Use the FSM Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-22 Running the FSM Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-23 Using the FSM Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-25 Defining Black Boxes for Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Instantiating Black Boxes and I/Os in Verilog . . . . . . . . . . . . . . . . . . . . . . . . . Instantiating Black Boxes and I/Os in VHDL . . . . . . . . . . . . . . . . . . . . . . . . . Adding Black Box Timing Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding Other Black Box Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . LO Pipelining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Prerequisites for Pipelining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pipelining the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-30 6-30 6-32 6-34 6-38 6-40 6-40 6-41
xiv
Preface
Retiming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Controlling Retiming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Retiming Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Retiming Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How Retiming Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How Retiming Works With Synplify Premier Regions . . . . . . . . . . . . . . . . . .
Inserting Probes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-50 Specifying Probes in the Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-51 Adding Probe Attributes Interactively . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-52 Inferring RAMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Inference vs. Instantiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coding RAMs for Inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specifying RAM Implementation Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Implementing Altera RAMs Automatically . . . . . . . . . . . . . . . . . . . . . . . . . . . Implementing Xilinx RAMs Automatically . . . . . . . . . . . . . . . . . . . . . . . . . . . . Implementing Altera RAMs: FLEX and APEX . . . . . . . . . . . . . . . . . . . . . . . . Implementing Altera RAMs: Stratix Multi-Port RAMs . . . . . . . . . . . . . . . . . . . Inferring Xilinx Block RAMs Using Registered Addresses . . . . . . . . . . . . . . . Inferring Xilinx Block RAMs Using Registered Output . . . . . . . . . . . . . . . . . . Setting Xilinx RAM Initialization Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mapping Xilinx ROM to Block RAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-54 6-54 6-55 6-59 6-61 6-64 6-67 6-69 6-70 6-73 6-78 6-79
Inferring Shift Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-80 Shift Register Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-82 Forward Annotation of Initial Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-86 Working with LPMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Instantiating LPMs as Black Boxes (Altera) . . . . . . . . . . . . . . . . . . . . . . . . . . Instantiating LPMs as Black Boxes (Cypress) . . . . . . . . . . . . . . . . . . . . . . . . Instantiating LPMs Using VHDL Prepared Components . . . . . . . . . . . . . . . . Instantiating LPMs Using a Verilog Library (Altera) . . . . . . . . . . . . . . . . . . . . 6-87 6-88 6-92 6-94 6-97
Working with Gated Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-99 The Synplicity Approach to Gated Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-99 Synthesizing a Gated Clock Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-101 Prerequisites for Gated Clock Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . 6-103 Gated Clock Conversion Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-105 Fix Gated Clock Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-106 Gated Clocks for Black Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-108 Restrictions to Using Fix Gated Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-110 Generated-Clock Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-111
xv
Preface
Checking Synplify Premier Utilization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-25 Device Utilization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-25 Region Utilization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-25 Using Process-Level Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-25 Bit Slicing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About Bit Slicing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Bit Slicing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bit Slice Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bit Slicing Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Zippering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Zippering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Analyzing a Design for Zippering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Zippering Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Zippering Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-26 7-26 7-26 7-29 7-32 7-33 7-33 7-36 7-37 7-41
LO
xvi
Preface
Generating Vendor-Specific Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6 Targeting Output to Your Vendor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6 Customizing Netlist Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7 Working with Actel Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8 Using Predefined Actel Black Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8 Using ACTGen Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-9 Working with Radhard Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-10 Working with Altera Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . APEX Design Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FLEX Design Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Determining ROM Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Working with Altera EABs and ESBs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Working with Altera PLLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Implementing Megafunctions with Clearbox . . . . . . . . . . . . . . . . . . . . . . . . . . Packing I/O Cell Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using LPMs in Simulation Flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Working with Quartus II . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Working with Lattice Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Instantiating Lattice Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Lattice GSR Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Inferring Carry Chains in Lattice XPLD Devices . . . . . . . . . . . . . . . . . . . . . . . Controlling I/O Insertion in Lattice Designs . . . . . . . . . . . . . . . . . . . . . . . . . . Forward-Annotating Lattice ORCA Constraints . . . . . . . . . . . . . . . . . . . . . . . Working with Xilinx Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Designing for Xilinx Architectures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Instantiating CoreGen Cores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Instantiating Virtex PCI Cores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Packing Registers for I/Os . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Controlling Placement with RLOCs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Clock Buffers in Virtex Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Instantiating Special I/O Standard Buffers for Virtex . . . . . . . . . . . . . . . . . . . Reoptimizing With EDIF Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Working with Xilinx Place-and-Route Software . . . . . . . . . . . . . . . . . . . . . . .
Fpga User Guide, December 2005
8-11 8-12 8-12 8-12 8-14 8-15 8-16 8-18 8-20 8-22 8-23 8-23 8-24 8-25 8-25 8-26 8-28 8-28 8-29 8-30 8-33 8-35 8-36 8-38 8-39 8-39
xvii
Preface
Design Planning with Xilinx Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8 Displaying Xilinx Device Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8 Creating Regions for Xilinx Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-12 Handling Xilinx Critical Paths (Design Planner) . . . . . . . . . . . . . . . . . . . . . . . . . . Splitting a Critical Path into Multiple Regions . . . . . . . . . . . . . . . . . . . . . . . . . Creating Smaller Regions for Long Critical Paths . . . . . . . . . . . . . . . . . . . . . Handling Critical Paths with High Fanout Nets . . . . . . . . . . . . . . . . . . . . . . . . Handling Critical Paths with Cascading Cells or Carry Chain Logic . . . . . . . . Handling Critical Paths with Bit Slicing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Handling Critical Paths with Pipelining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Handling Designs with Multiple Critical Paths . . . . . . . . . . . . . . . . . . . . . . . . Handling Critical Paths with Large Multiplexers . . . . . . . . . . . . . . . . . . . . . . . 9-14 9-14 9-15 9-15 9-17 9-19 9-20 9-20 9-21
Handling Xilinx Black Boxes (Design Planner) . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-22 Design Planning Xilinx Black Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-22 Handling Xilinx Block RAMs (Design Planner) . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-24 Creating Block RAM Regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-25 Assigning to Block RAM Regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-27 Handling Block Multipliers (Design Planner) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Block Multiplier Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating Block Mult Regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Assigning to Block Mult Regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Region Utilization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Handling Xilinx IPs (Design Planner) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intrusive IP Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Macro IP Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating IP Region Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-30 9-30 9-30 9-31 9-31 9-35 9-35 9-37 9-38
LO
xviii
Preface
Automating Flows with synhooks.tcl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-10 10-13 10-13 10-14 10-16 10-18
Protected Flow Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-19 Using IP in a Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-20 Running Place-and-Route After Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating and Running P&R Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specifying Xilinx Place-and-Route Options . . . . . . . . . . . . . . . . . . . . . . . . . Backannotating Place-and-Route Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . Analyzing Physical Synthesis (Synplify Premier) . . . . . . . . . . . . . . . . . . . . . 10-21 10-21 10-23 10-25 10-26
MultiPoint Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-28 Traditional Bottom-up Design and MultiPoint Synthesis . . . . . . . . . . . . . . . 10-28 The Synplify Pro MultiPoint Synthesis Flow . . . . . . . . . . . . . . . . . . . . . . . . . 10-29 The Altera LogicLock Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-39 Using Synplify Pro With the Altera LogicLock Flow . . . . . . . . . . . . . . . . . . . 10-39 Using Synplify Premier With the Altera LogicLock Flow . . . . . . . . . . . . . . . . 10-43 The Xilinx MultiPoint Synthesis Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-48 Using Synplify Pro With Xilinx MultiPoint Synthesis . . . . . . . . . . . . . . . . . . . 10-48 Using the Xilinx Modular Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Modular Flow Design Stages . . . . . . . . . . . . . . . . . . . . . . . . . . Initial Design Budgeting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Active Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-54 10-54 10-55 10-58
xix
Preface
Final Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-63 Design Files and Area Design Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-65 Integrating with Third-Party Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-70 Resynthesizing with QuickLogic SpDE Information . . . . . . . . . . . . . . . . . . . 10-70 Synopsys DesignWare Component Support . . . . . . . . . . . . . . . . . . . . . . . . 10-71 Working with the Identify RTL Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-72
Graph-based Physical Synthesis with a Design Plan Flow . . . . . . . . . . . . . . . . . . 11-7 Design Plan-based Physical Synthesis Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-8 Design Planner Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-9 Running Physical Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-9 Create the Project File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-10 Set Implementation Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-11 Run Place-and-Route . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-18 Synthesize the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-21 Analyze Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-22 Running Multiple Implementations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-24
LO
xx
CHAPTER 1
Introduction
This introduction to the Synplify, Synplify Pro, and Synplify Premier software describes the following: The FPGA Synthesis Tools, on page 1-2 The Generic FPGA Design Flow, on page 1-8 Audience, on page 1-11 Scope of the Document, on page 1-11 Starting the Software, on page 1-12 User Interface Overview, on page 1-14 Design Flows, on page 1-16 Throughout the documentation, features and procedures described apply to all tools, unless specifically stated otherwise.
1-1
Chapter 1: Introduction
1-2
Chapter 1: Introduction
The Timing Analyst window, which allows you to generate timing schematics and reports for specified paths for point-to-point timing analysis. This feature is not available in Synplify. The FSM Explorer, which tries different state machine optimizations before picking the best implementation. This feature is not available in Synplify. The FSM viewer, which lets you view the transitions in detail. This feature is not available in Synplify. A command line interface, from which you can run TCL scripts. This feature is not available in Synplify.
1-3
Chapter 1: Introduction
Prototyping The Synplify Premier product supports a complete design and debugging environment featuring the Identify product along with automated HDL code translation for Synopsys DesignWare components. Using the Synplify Premier prototyping solution, you can quickly and automatically bring ASIC HDL code into high-capacity FPGAs, and then debug it with real-time feedback from the FPGA. Because the feedback from the debugger goes directly into the RTL code, the integration of logic synthesis lets you correct the code and retest it in the FPGA in record time. In addition to the features described in About the Synplify and Synplify Pro Software, on page 1-2, the Synplify Premier tool features the following: Expanded HDL Analyst capabilities including support for physical regions. Design Planner - This licensed option for Synplify Premier lets you run interactive physical synthesis using a design plan. You assign physical constraints in Design Planner by interactively dragging and dropping RTL objects into regions of the device. This information along with the normal timing constraints, enables the Synplify Premier tool to estimate timing more accurately and use the estimates for additional optimizations. This produces a more highly optimized circuit in fewer iterations. Physical Optimizations - Physical optimization algorithms use physical design characteristics like placement and interconnect delay to affect the actual topology of the circuit. Design plans are used to control the optimizations. The Synplify Premier tool also helps reduce the time required to perform placement and routing, which is especially significant as FPGA designs continue towards the trend of one million plus gates. Physical Analysis Tools - These tools include the Physical Analyst and the Island Timing Analyst.
1-4
Chapter 1: Introduction
Synplify
Synplify Pro
Synplify Premier
Performance
Behavior Extracting Synthesis Technology (BEST) Clearbox Support (selected Altera architectures) Coregen Support (selected Xilinx architectures) FSM Compiler FSM Explorer Gated Clock Conversion Register Pipelining into Multipliers/ROMs Register Retiming
x x x
x x x x x x x x
x x x x x x x x
x x x x x
Code Analysis
Timing Analyzer Point-to-point Report HDL Analyst Solution Graphical Design Analysis FSM Viewer View State Transitions Crossprobing Cross-tool Analysis Probe Point Creation Easy Insertion of Debug Pins
x Option x x x x
x x x x x
x x x x x
x x
x x
x x
1-5
Chapter 1: Introduction
Synplify
Synplify Pro
Synplify Premier
Multiple Implementations Log Watch Window Fast Implementation Comparison Tcl Entry and Viewing Window Text Editor View Mixed Language Design VHDL and Verilog Modular Flow Support for Xilinx Designs MultiPoint Flow Batch Mode (Floating licenses only) Verplex Formal Verification Flow
x x x x x x x x x x x
Physical Design
Design Plan File Drag-and-Drop Logic from HDL Analyst into Device Regions Area Estimation and Region Capacity Pin Assignments Physical Synthesis Optimizations Bit Slicing Zippering Tunneling and other LO boundary optimizations Replication
x x x x x
1-6
Chapter 1: Introduction
Synplify
Synplify Pro
Synplify Premier
Graph-based Physical Synthesis Island Timing Analyst Physical Analyst Place-and-Route Implementation Run From Project View
x x x x x
Prototyping
RTL debugging with Identify Automatic translation of Synopsys DesignWare components
x x
1-7
Chapter 1: Introduction
DSP
DSP Design
ASIC
ASIC Synthesis
Prototyping
ASIC RTL Prototyping
Synplify DSP
Synplify ASIC
Certify
Synplify Premier
RTL Debugger
Identify
LO
1-8
Chapter 1: Introduction
HDL Design Entry Logic Optimization Technology Mapping Placement Routing Synplify Synthesis
FPGA Configuration
Chapter 1: Introduction
Technology Mapping
Technology mapping is the second phase of optimization, in which the logic is optimized to a specific technology. During this phase, the compiled design is transformed into a circuit of optimized FPGA logic blocks. Depending on your design priorities, you might want to focus on area optimization (minimizing the total number of blocks), delay optimization (minimizing the number of logic block stages in time-critical paths), or both. The Synplify tool uses architecture-specific mapping techniques to map the logic design. It has built-in tools to analyze critical paths, crossprobe, and check the RTL view. The software generates netlists in formats appropriate for the place-and-route tools that follow.
Placement
Placement is the first step of the physical design process. During placement, the logic blocks are placed in an FPGA array. At this point, considerations like the total interconnect length become important. This is the point at which the Synplify software hands off control of the design to another tool. However if you have the Synplify Premier, you can use the results from an initial placement pass to further optimize your logic design.
Routing
Routing is the final step of the physical design process. At this stage, use the place-and-route tool to connect the placed logic blocks by assigning wire segments and choosing programmable switches.
FPGA Configuration
In this design phase, you configure the final FPGA chip and implement it. LO
1-10
Audience
Chapter 1: Introduction
Audience
The Synplify, Synplify Pro, and Synplify Premier software tools are targeted towards the FPGA system developer. It is assumed that you are knowledgeable about the following: Design synthesis RTL FPGAs Verilog/VHDL Physical Synthesis
1-11
Chapter 1: Introduction
Getting Started
1. If you have not already done so, install the Synplify software according to the installation instructions. 2. Start the software. If you are working on a Windows platform, select Programs->Synplicity->product version from the Start button. If you are working on a UNIX platform, type the appropriate command at the command line: synplify synplify_pro synplify_premier synplify_premier_dp The command starts the synthesis tool, and opens the Project window. If you have run the software before, the window displays the previous project. For more information about the interface, see the User Interface Overview chapter of the Reference Manual.
LO
1-12
Chapter 1: Introduction
Getting Help
Before you call Synplicity Support, look through the documented information. You can access the information online from the Help menu, or refer to the PDF version. The following table shows you how the information is organized. For help with...
Using software features How to...
Refer to the...
Synplicity FPGA Synthesis User Guide Synplicity FPGA Synthesis User Guide, application notes on the Synplicity support web site Synplicity FPGA Synthesis User Guide, application notes on the Synplicity support web site Online help (select Help->Error Messages) License configuration information for your platform Synplicity FPGA Synthesis Reference Manual Synplicity FPGA Synthesis Reference Manual Synplicity FPGA Synthesis Reference Manual Online help (select Help->Tcl Help) Synplicity FPGA Synthesis Reference Manual Synplicity FPGA Synthesis Reference Manual (Web menu commands)
Flow information
Error messages Licensing Attributes and directives Synthesis features Language and syntax Tcl syntax Tcl synthesis commands Product updates
1-13
Chapter 1: Introduction
Tcl Window
LO
1-14
Chapter 1: Introduction
Synplify Interface
The following figure shows you the Synplify interface.
Implementation Results view
Menus Toolbars
Project view
Other options
Buttons
Status
1-15
Chapter 1: Introduction
Design Flows
Design Flows
This section provides an overview of the following flows: Logic Synthesis Design Flow, on page 1-16 Prototyping Design Flow, on page 1-17 Physical Synthesis Design Flows, on page 1-17
Create Project Add Source Files Set Constraints Set Options Run the Software Fails requirements Analyze Results
Implement FPGA
LO
1-16
Design Flows
Chapter 1: Introduction
ASIC HDL
Identify Instrumentor
Design RTL Instrumentation
Synplify Premier
Optimized and Mapped Netlist
FPGA Place-and-Route
Placed and Routed Netlist
1-17
Chapter 1: Introduction
Design Flows
Physical Synthesis
LO
1-18
Design Flows
Chapter 1: Introduction
Design Plan (.sfp) Run Synplify Premier (Physical Synthesis enabled) Initial Placement
Physical Synthesis
1-19
Chapter 1: Introduction
Design Flows
Design Plan (.sfp) Run Synplify Premier (Physical Synthesis enabled) Design Plan-based Physical Synthesis
Vendor Place & Route with Backannotation Physical Analyst Analyze Results Island Timing Analyst
LO
1-20
CHAPTER 2
Project Setup
When you synthesize a design, you need to set up two kinds of files: HDL files that describe your design, and project files to manage the design. This chapter describes the procedures to set up these files and the project. It covers the following:
Setting Up HDL Source Files, on page 2-2 Setting Up Project Files, on page 2-11 Setting Up Implementations and Workspaces, on page 2-22 Archiving Files and Projects, on page 2-26
2-1
Creating HDL Source Files, next Checking HDL Source Files, on page 2-4 Editing HDL Source Files with the Built-in Text Editor, on page 2-5 Using an External Text Editor, on page 2-8 Setting Editing Window Preferences, on page 2-9
Select File->New or press Ctrl-n. In the New dialog box, select the kind of source file you want to create,
Verilog or VHDL. If you are using Verilog 2001 format, make sure to LO enable the Use Verilog 2001 option before you run synthesis (Project>Implementation Options->Verilog tab).
2-2
Type a name and location for the file and Click OK.
A blank editing window opens with line numbers on the left. You can name it now by pressing Ctrl-s and naming the file. 2. Type the source information in the window, or cut and paste it. See Editing HDL Source Files with the Built-in Text Editor, on page 2-5 for more information on working in the Editing window. For the best synthesis results, check the Reference Manual and ensure that you are using the available constructs and vendor-specific attributes and directives effectively. 3. Save the file by selecting File->Save or the Save icon ( ). Use the correct extension for the type of file you created (.v or .vhd). Once you have created a source file, you can check that you have the right syntax, as described in Checking HDL Source Files, on page 2-4.
2-3
To check all the source files in a project, deselect all files in the
project list, and make sure that none of the files are open in an active window. If you have an active source file, the software only checks the active file.
To check a single file, open the file with File->Open or double-click the
file in the Project window. If you have more than one file open and want to check only one of them, put your cursor in the appropriate file window to make sure that it is the active window. 2. To check the syntax, select Run->Syntax Check or press Shift+F7. The software detects syntax errors such as incorrect keywords and punctuation. It puts an exclamation mark next to files in the project list that have errors or warnings, and lists the number of errors, warnings or notes found in each file. If there are no errors, the following message is displayed at the bottom of the log file: Syntax check successful! 3. To run a synthesis check, select Run->Synthesis Check or press Shift+F8. The software detects hardware-related errors such as incorrectly coded flip-flops. It puts an exclamation mark next to files in the project list that have errors or warnings, and lists the number of errors, warnings or notes found in each file. If there are no errors, the following message is displayed at the bottom of the log file: Synthesis check successful! 4. Review the errors by opening the syntax.log file when prompted and use Find to locate the error message (search for @E). Double-click on the 5character error code or click on the message text and push F1 to display online error message help. LO 5. Locate the portion of code responsible for the error by double-clicking on the message text in the syntax.log file. The Text Editor window opens the appropriate source file and highlights the code that caused the error.
2-4 Fpga User Guide, December 2005
6. Repeat steps 4 and 5 until all syntax and synthesis errors are corrected. Messages can be categorized as errors, warnings, or notes. Review all messages and resolve any errors. Warnings are less serious than errors, but you must read through and understand them even if you do not resolve all of them. Notes are informative and do not need to be resolved.
To automatically open the first file in the list with errors, press F5. To open a specific file, double-click the file in the Project window or
use File->Open (Ctrl-o) and specify the source file. The Text Editor window opens and displays the source file. Lines are numbered. Keywords are in blue, and comments in green. String values are in red. If you want to change these colors, see Setting Editing Window Preferences, on page 2-9.
2. To edit a file, type directly in the window. This table summarizes common editing operations you might use. You can also use the keyboard shortcuts instead of the commands.
2-5
To...
Do...
Cut, copy, and paste; Select the command from the popup (hold down undo, or redo an action the right mouse button) or Edit menu. Go to a specific line Find text Replace text Press Ctrl-g or select Edit->Go To, type the line number, and click OK. Press Ctrl-f or select Edit ->Find. Type the text you want to find, and click OK. Press Ctrl-h or select Edit->Replace. Type the text you want to find, and the text you want to replace it with. Click OK. Type enough characters to uniquely identify the keyword, and press Esc. Select the block, and press Tab. Select the block, and press Shift-Tab. Select the text, and then select Edit->Advanced ->Uppercase or press Ctrl-Shift-u. Select the text, and then select Edit->Advanced ->Lowercase or press Ctrl-u. Put the cursor at the beginning of the comment text, and select Edit->Advanced->Comment Code or press Alt-c. Press Alt, and use the left mouse button to select the column. On some platforms, you have to use the key to which the Alt functionality is mapped, like the Meta or diamond key.
Complete a keyword Indent text to the right Indent text to the left Change to upper case Change to lower case Add block comments
Edit columns
3. To cut and paste a section of a PDF document, select the T-shaped Text Select icon, highlight the text you need and copy and paste it into your file. The Text Select icon lets you select parts of the document. 4. To create and work with bookmarks in your file, see the following table. Bookmarks are a convenient way to navigate long files or to jump to points in the code that LO refer to often. You can use the icons in the you Edit toolbar for these operations. If you cannot see the Edit toolbar on the far right of your window, resize some of the other toolbars.
2-6
To...
Insert a bookmark
Do...
Click anywhere in the line you want to bookmark. Select Edit->Toggle Bookmarks, press Ctrl-F2, or select the first icon in the Edit toolbar. The line number is highlighted to indicate that there is a bookmark at the beginning of that line. Click anywhere in the line with the bookmark. Select Edit->Toggle Bookmarks, press Ctrl-F2, or select the first icon in the Edit toolbar. The line number is no longer highlighted after the bookmark is deleted. Select Edit->Delete all Bookmarks, press Ctrl-Shift-F2, or select the last icon in the Edit toolbar. The line numbers are no longer highlighted after the bookmarks are deleted. Use the Next Bookmark (F2) and Previous Bookmark (ShiftF2) commands from the Edit menu or the corresponding icons from the Edit toolbar to navigate to the bookmark you want.
Delete a bookmark
Open the HDL file with the error or warning by double-clicking the file
in the project list.
To navigate back to a previous error, warning, or note, select Run>Previous Error/Warning or press Shift-F5. 6. To bring up error message help for a full description of the error, warning, or note:
Open the text-format log file (click View Log) and either double click on
the 5-character error code or click on the message text and press F1.
Fpga User Guide, December 2005 2-7
Open the HTML log file (not available with the Synplify product) and
click on the 5-character error code.
In the Tcl window (not available with the Synplify product), click the
Messages tab and click on the 5-character error code in the ID column. 7. To crossprobe from the source code window to other views, open the view and select the piece of code. See Crossprobing from the Text Editor Window, on page 4-51 for details. 8. When you have fixed all the errors, select File->Save or click the Save icon to save the file.
If you are working on a PC platform, click the ...( Browse) button and
select the external text editor executable.
From a UNIX or Linux platform for a text editor that creates its own
window, click the ... Browse button and select the external text editor executable.
From a UNIX platform for a text editor that does not create its own
window, do not use the ... Browse button. Instead type xterm -e <editor>. The following figure shows VI specified as the external editor.
LO
2-8
From a Linux platform, for a text editor that does not create its own
window, do not use the ... Browse button. Instead, type gnometerminal -x <editor>. To use emacs for example, type gnometerminal -x emacs. The software has been tested with the emacs and vi text editors. 3. Click OK.
2-9
To...
Set syntax color defaults
Set tabs
LO
2-10
Creating a Project File, next Opening an Existing Project File, on page 2-14 Making Changes to a Project, on page 2-15 Using Mixed Language Source Files, on page 2-16 Setting Project View Display Preferences, on page 2-18 Updating Verilog Include Paths in Older Project Files, on page 2-21
Make sure the Look in field at the top of the form points to the right
directory. The files are listed in the box. If you do not see the files, check that the Files of Type field is set to display the correct file type. If you have mixed input files, follow the procedure described in Using Mixed Language Source Files, on page 2-16.
2-11
To add all the files in the directory at once, click the Add All button on
the right side of the form. To add files individually, click on the file in the list and then click the Add button, or double-click the file name. You can add all the files in the directory and then remove the ones you do not need with the Remove button. If you are adding VHDL files, select the appropriate library from the the VHDL Library popup menu. The library you select is applied to all VHDL files when you click OK in the dialog box. Your project window displays a new project file. If you click on the plus sign next to the project and expand it, you see the following:
A folder (two folders for mixed language designs) with the source files.
If your files are not in a folder under the project directory, you can set this preference by selecting Options->Project View Options and checking the View project files in LO folders box. This separates one kind of file from another in the Project view by putting them in separate folders.
2-12
3. Add any libraries you need, using the method described in the previous step to add the Verilog or VHDL library file.
2-13
For generic technology components, you can either add the Synplicity
technology-independent Verilog library (<install_dir>/lib/generic_ technology/gtech.v) to your design, or add your own generic component library. Do not use both together as there may be conflicts. 4. Check file order in the Project view. File order is especially important for VHDL files.
For VHDL files, you can automatically order the files by selecting Run>Arrange VHDL Files. Alternatively, manually move the files in the Project view. Package files must be first on the list because they are compiled before they are used. If you have design blocks spread over many files, make sure you have the following file order: the file containing the entity must be first, followed by the architecture file, and finally the file with the configuration.
In the Project view, check that the last file in the Project view is the
top-level source file. Alternatively, you can specify the top-level file when you set the device options. 5. Select File->Save, type a name for the project, and click Save. The Project window reflects your changes. 6. To close a project file, select the Close Project button or File->Close Project.
LO
2-14
File->Open Command
Select File->Open. Specify the correct directory in the Look In: field. Set File of Type to Project Files (*.prj). The box lists the project files. Double-click on the project you want to open.
Select the file you want to change in the Project window. Click the Change File button, or select Project->Change File. In the Source File dialog box that opens, set Look In to the directory
where the new file is located. The new file must be of the same type as the file you want to replace.
If you do not see your file listed, select the type of file you need from
the Files of Type field.
Double-click the file. The new file replaces the old one in the project
list.
2-15
4. To specify how project files are saved in the project, right click on a file in the Project view and select File Options. Set the Save File option to either Relative to Project or Absolute Path. 5. To check the time stamp on a file, right click on a file in the Project view and select File Options. Check the time that the file was last modified. Click OK.
You can not use defparams across languages. Verilog does not support unconstrained VHDL ports
2. If you want to organize the Verilog and VHDL files in different folders, select Options->Project View Options and toggle on the View Project Files in Folders option. When you add the files to the project, the Verilog and VHDL files are in separate folders in the Project view. 3. When you open a project or create a new one, add the Verilog and VHDL files as follows:
Select the Project->Add Source File command or click the Add File button. On the form, set Files of Type to HDL Files (*.vhd, *.vhdl, *.v). Select the Verilog and VHDL files you want and add them to your
project. Click OK. For details about adding files to a project, see Making Changes to a Project, on page 2-15.
LO
2-16
The files you added are displayed in the Project view. This figure shows the files arranged in separate folders. 4. When you set device options (Impl Options button), specify the top-level module. For more information about setting device options, see Setting Implementation Options, on page 3-2.
If the top-level module is Verilog, click the Verilog tab and type the
name of the top-level module.
If the top-level module is VHDL, click the VHDL tab and type the name
of the top-level entity. If the top-level module is not located in the default work library, you must specify the library where the compiler can find the module. For information on how to do this, see VHDL Panel, on page 3-47.
2-17
You must explicitly specify the top-level module, because it is the starting point from which the mapper generates a merged netlist. 5. Select the Implementation Results tab on the same form and select one output HDL format for the output files generated by the software. For more information about setting device options, see Setting Implementation Options, on page 3-2.
For a Verilog output netlist, select Write Verilog Netlist. For a VHDL output netlist, select Write VHDL Netlist. Set any other device options and click OK.
You can now synthesize your design. The software reads in the mixed formats of the source files and generates a single .srs file that is used for synthesis.
2-18
The Project View Options form opens. Available options vary, depending on the tool. The Synplify Premier and Synplify Pro options are the same.
Synplify Options
2. To organize different kinds of input files in separate folders, check View Project Files in Folders. Checking this option creates separate folders in the Project view for constraint files and source files.
2-19
Check one of the boxes in the Project File Name Display section of the
form to determine how filenames are displayed. You can display just the filename, the relative path, or the absolute path. 4. To open more than one implementation in the same Project view, check Allow Multiple Projects to be Opened. You can only use multiple implementations with the Synplify Pro and Synplify Premier tools.
Project 1
Project 2
Check the Show all Files in Results Directory box to display all the output
files generated after synthesis.
LO
2-20
Manually edit the .prj file in a text editor and add the following on the
line before each set_option -include_path: set_option -project_relative_includes 1
Start a new project with a newer version of the software and delete the
old project. This will make the new .prj file obey the new rule where includes are relative to the .prj file.
2-21
Working with Multiple Implementations, next Creating Workspaces, on page 2-24 Using Workspaces, on page 2-25
LO The new implementation uses the same source code files, but different device options and constraints. It copies some files from the previous implementation: the .tlg log file, the .srs RTL netlist file, and the
2-22 Fpga User Guide, December 2005
<design>_fsm.sdc file generated by FSM Explorer. The software keeps a repeatable history of the synthesis runs. 2. Run synthesis again with the new settings.
To run the current implementation only, click Run. To run all the implementations in a project, select Run->Run All
Implementations. You can use multiple implementations to try a different part or experiment with a different frequency. See Setting Implementation Options, on page 3-2 for information about setting options. The Project view shows the new implementation. A green arrow marks the current implementation in the Project view. The output files generated for this implementation are shown in the Implementation Results view on the right. The Log Watch Window monitors the current implementation. If you configured it to watch all implementations, it automatically adds the current implementation to the window. 3. Compare the results.
Use the Log watch window to compare selected criteria. Make sure to
set the implementations you want to compare with the Configure Watch command. See Using the Log Watch Window, on page 4-6 for details.
2-23
Creating Workspaces
The Synplify Premier and Synplify Pro tools let you group projects together into workspaces. A workspace is like a container for a number of projects. 1. To create a new workspace, select File->New Workspace or right-click in the Project view and select Build Workspace. 2. In the dialog box,
Select the project files (.prj) of the projects you want to add to the
workspace.
3. To open more than one project in the same Project view, check Allow Multiple Projects to be Opened. After you set up the new project, you can see it in the Project view.
Project 1
Project 2
LO
2-24
Using Workspaces
You can use your workspace to simplify your work flow. For example, you can set up dependencies between projects in the same workspace.The Synplify software does not support workspaces. 1. To add a project to a workspace, right-click the workspace and select Insert Project. Select the project file you want to add, and click OK. 2. To remove a project from a workspace, right-click on the project and select Remove Project from Workspace. 3. To synthesize a single project in a workspace, click Run. The software synthesizes the current project. 4. To run all the projects in a workspace, do the following:
Select the workspace in the Project view, right-click, and select Run all
Projects. The software synthesizes the active implementations of all the projects in the workspace.
2-25
Archive a Project, on page 2-26 Extracting Design Files from an Archive, on page 2-31 Copy a Project, on page 2-34 Command Syntax, on page 2-37 Archive a Project
Use the archive utility to store the files for a design project into a single archive file in Synplicity Proprietary Format (.sar). You can archive an entire project or selected files from the project. If you want to create a copy of a project without archiving the files, see Copy a Project, on page 2-34. Here are the steps to create an archive: 1. In the GUI (Project view), select Project->Archive Project. This command does the following:
2-26
Name of the design project to archive. Top-level directory where the project (.prj) is located. This is
considered the root directory.
Enable Customized file list to archive only the project files that you
select.
Enable Local copy for internal network to archive project input files only,
no result files and no remote reference files outside the root directory will be included.
2-27
4. If you enabled Customized file list, complete the next step, Otherwise, go to Step 7.
5. Under Project File List, select the file list origin for your archive:
Source Files Includes all HDL files in the archive. SRS Includes all .srs files (RTL schematics) in the archive. (Same as
add_file -syn).
Use the Add Extra Files button to include additional files in the project.
6. Select the files to include in the archive by clicking on the check boxes next to the filenames. 7. Click Next.
LO
2-28
This summary displays all the files in the archive and also shows the full uncompressed file size. Actual size is smaller after the archive. There are no duplicate files. Note: For Local copy for internal network archives, only the input files are listed. 8. Use the Back button to correct directory or file information and/or followup on any missing files, as appropriate. 9. Verify that the current archive contains the files that you want, then click Archive. This creates the project archive .sar file and displays the following prompt:
2-29
10. Click Done if you are finished. Otherwise, you can send the archived file to another site, for example, you can send the design project to the Synplicity FTP site. To do this: 11. Click FTP Archive File.
Your email address. This email address, plus a date and time stamp
are prepended to the .sar file name to uniquely identify your archive file.
2-30
Name of the .sar file containing the project files. Name of project to extract (un-archive). This field is automatically
extracted from the.sar file and cannot be changed.
2-31
4. Make sure all the files that you want to extract are checked and references to these files are resolved.
If there are files in the list that you do not want to include when the
project is extracted, unchecked the box next to the file. The unchecked files will be commented out in the project file (.prj) when project files are extracted.
If you need to resolve a file in the project before extracting, click the
Resolve button and fill out the dialog box.
If you want to replace a file in the project, click the Change button and
fill out the dialog box.
LO The Replace directory with field specifies the new location of the project files you want to use:
2-32 Fpga User Guide, December 2005
Replace replaces only the specified file (Filename field) in the project. Replace Unresolved replaces any unresolved files in the project, with
files of the same name from the Replace directory.
Replace All replaces all files in the archived project with files of the
same name from the Replace directory.
6. If you want to load this project in the UI after files are extracted, enable the Load project into Synplicity after un-archiving option. 7. Click Un-Archive. A message dialog box is displayed while the files are being extracted. 8. If the destination directory already contains project files with the same name as the files you are extracting, you are prompted so that the existing files can be overwritten by the extracted files.
2-33
Copy a Project
Use this utility to create a copy of a design project. You can copy an entire project, or selected files from the project. If you want to create an archive of the project where the project is stored in a single archive file, see Archive a Project, on page 2-26. Here are the steps to create a copy of a design project: 1. From the GUI (Project view), select Project->Copy Project. This command does the following:
LO
2-34
Name of selected design project to copy. Top-level directory where the project is located. Destination directory in which to copy files.
3. Choose the Copy Style:
Enable Create a fully self-contained copy to copy all project files including
project input files and result files. If the project contains more than one implementation, choose to copy only the active implementation or all implementations in the project.
Enable Local copy for internal network to copy project input files only, no
result files will be included.
Enable Customized file list to copy only the project files that you select.
4. If you enable Customized file list, complete the next step, otherwise, go to Step 7.
5. Under Project File List, select the file list origin for your archive:
SRS Includes all .srs files (RTL schematics) in the archive. (Same as
add_file -syn).
Use the Add Extra Files button to include additional files in the project.
6. Select the files to include in the archive by clicking on the check boxes next to the filenames. 7. Click Next.
8. Verify the copy information. 9. Enter a destination directory. If the directory does not exist it will be created. 10. Click Copy to create the project copy.
LO
2-36
Command Syntax
The Tcl command syntax for archiving projects and files is as follows:
2-37
LO
2-38
CHAPTER 3
3-1
3-2
software does not support as many technologies as the Synplify and Synplify Pro tools do.
3. Set the device mapping options. The options vary, depending on the technology you choose. If you are unsure of what an option means, click on the option to see a description in the box below. For full descriptions of the options, click F1 or refer to the appropriate vendor chapter in the Reference Manual. To set an option, type in the value or check the box to enable it. For more information about setting fanout limits, pipelining, and retiming, see Setting Fanout Limits, on page 6-7, Pipelining, on page 6-40, and Retiming, on page 6-44, respectively. For details about other vendor-specific options, refer to the appropriate vendor chapter and technology family in the Reference Manual. Note that the Synplify tool does not support all these optimization options.
3-3
4. Set other implementation options as needed (see Setting Implementation Options, on page 3-2 for a list of choices). Click OK. 5. Click the Run button to synthesize the design. The software compiles and maps the design using the options you set. 6. To set device options with a script, use the set_option Tcl command. The following table contains an alphabetical list of the device options on the form mapped to the equivalent Tcl commands. Because the options are technology-based, all the options will not apply to your design. All commands begin with set_option, followed by the syntax in the column as shown. Check the Reference Manual for the most comprehensive list of options for your vendor. The following table shows typical device options. Option
Area delay percent (Altera, Lattice, Xilinx) Cliquing (Altera) Disable I/O insertion Fan-in limit (Altera, Lattice) Fanout guide (Actel, Atmel, Xilinx) Fanout limit Fanout limit (hard) (Actel) Force GSR usage (Lattice, Xilinx) Map logic (Altera, Lattice, Xilinx) Maximum terms/macrocell (Lattice, Xilinx) Package Part Soft buffers (Altera)
Tcl Command (set_option...) -area_delay_percent net_percentage -cliquing {true|false} -disable_io_insertion {true|false} -fanin_limit max_fanin -fanout_guide fanout_value -fanout_limit limit -maxfan_hard {true|false} -force_gsr {true|false} -map_logic {true|false} -max_terms_per_macrocell max_terms -package pkg_name -part part_name LO -soft_buffers {true|false}
3-4
Option
Speed Technology
3-5
For details about using these optimizations refer to the following sections: FSM Compiler FSM Explorer Resource Sharing Pipelining Retiming Annotated Properties for Analyst
Using the Symbolic FSM Compiler, on page 6-17 Using FSM Explorer, on page 6-22 Sharing Resources, on page 6-5 Pipelining, on page 6-40 Retiming, on page 6-44 Annotates the design with generic non-timing instance properties (.sap) and timing properties (.tap). These properties are then viewable in the RTL View and Design Planner, as well as used to create collections using TCL Find. See Object Properties, on page 5-54 and Annotated Timing Information, on page 6-34 for more information.
The equivalent Tcl set_option command options are -frequency, -frequency auto, -resource_sharing, -use_fsm_explorer, -pipe, -retiming and -symbolic_fsm_compiler. 3. Set other implementation options as needed (see Setting Implementation Options, on page 3-2 for a list of choices). Click OK. 4. Click the Run button to run synthesis. The software compiles and maps the design using the options you set.
3-6
You can override the global frequency with local constraints, as described in Setting Constraints in the SCOPE Window, on page 3-18. In the Synplify Pro tool, you can automatically generate clock constraints for your design instead of setting a global frequency. See Using Auto Constraints, on page 3-45 for details.
Global Frequency and Constraints Project View
Implementation Options->Constraints
2. To specify constraint files for an implementation, do one of the following: Select Project->Implementation Options->Constraints. Check the constraint (.sdc) files you want to use in the project. With the implementation you want to use selected, click Add File in the Project view, and add the constraint files you need. To create constraint files, see Setting Constraints in the SCOPE Window, on page 3-18. 3. To remove constraint files from an implementation, do one of the following: Select Project->Implementation Options->Constraints. Click off the checkbox next to the file name.
3-7
In the Project view, right-click the constraint file to be removed and select Remove from Project. This removes the constraint file from the implementation, but does not delete it. 4. To specify or remove a Synplify Premier design plan (.sfp), use the techniques described in steps 2 and 3, or do the following: Select Project->Implementation Options->Synplify Premier. Check the box next to the file you want. To delete a file, disable the check box next to the file name on the Design Planning tab.
When the implementation is synthesized, the Synplify Premier tool uses the region assignments in this file for the second phase of optimization to perform physical synthesis. 5. Set other implementation options as needed (see Setting Implementation Options, on page 3-2 for a list of choices). Click OK. When you synthesize the design, the software compiles and maps the design using the options you set.
LO
3-8
2. Specify the output files you want to generate. To generate mapped netlist files, click Write Mapped Verilog Netlist or Write Mapped VHDL Netlist. To generate a vendor-specific constraint file for forward annotation, click Write Vendor Constraint File. See Generating Constraint Files for Forward Annotation, on page 3-64 for more information. 3. Set the directory to which you want to write the results. 4. Set the format for the output file. The equivalent Tcl command for scripting is project -result_format format. You might also want to set attributes to control name-mapping. For details, refer to the appropriate vendor chapter in the Reference Manual. For certain Altera technologies (see Targeting Output to Your Vendor, on page 8-6), the .vqm result format allows you to also select the version of Quartus II you are using from the pop-up menu.
3-9
5. Set other implementation options as needed (see Setting Implementation Options, on page 3-2 for a list of choices). Click OK. When you synthesize the design, the software compiles and maps the design using the options you set.
3. Specify the number of start and end points you want to see reported in the critical path sections. LO 4. Set other implementation options as needed (see Setting Implementation Options, on page 3-2 for a list of choices). Click OK.
3-10
When you synthesize the design, the software compiles and maps the design using the options you set.
1. Specify the Verilog format to use. To set the compiler globally for all the files in the project, select Project>Implementation Options->Verilog. If you are using Verilog 2001, check the Reference Manual for supported constructs. To specify the Verilog compiler on a per file basis, select the file in the Project view. Right-click and select File Options. Select the appropriate compiler. The default is Verilog 2001.
3-11
2. Specify the top-level module if you did not already do this in the Project view. 3. To extract parameters from the source code, do the following: Click Extract Parameters. To override the default, enter a new value for a parameter. The software uses the new value for the current implementation only. Note: Parameter extraction is not supported for mixed designs.
4. Type in the directive in Compiler Directives, using spaces to separate the statements. You can type in directives you would normally enter with ifdef and define statements in the code. For example, size=32 test_impl results in the software writing the following statements to the project file: set_option -hdl_define -set SIZE=32 TEST_IMPL LO
3-12
Insert (new)
5. In the Include Path Order, specify the search paths for the include commands for the Verilog files that are in your project. Use the buttons in the upper right corner of the box to add, delete, or reorder the paths. 6. In the Library Directories, specify the path to the directory which contains the library files for your project. Use the buttons in the upper right corner of the box to add, delete, or reorder the paths. 7. Set other implementation options as needed (see Setting Implementation Options, on page 3-2 for a list of choices). Click OK. When you synthesize the design, the software compiles and maps the design using the options you set.
3-13
For VHDL source, you can specify the options described below. For information about creating process hierarchy for Synplify Premier, see Setting Synplify Premier Netlist Restructuring Optimizations, on page 3-16. 1. Specify the top-level module if you did not already do this in the Project view. If the top-level module is not located in the default work library, you must specify the library where the compiler can find the module. For information on how to do this, see VHDL Panel, on page 3-47. You can also use this option for mixed language designs or when you want to specify a module that is not the actual top-level entity for HDL Analyst displaying and debugging in the schematic views. 2. For user-defined state machine encoding, do the following: Specify the kind of encoding you want to use. Disable the FSM compiler. When you synthesize the design, the software uses the compiler directives you set here to encode the state machines and does not run the FSM compiler, which would override the compiler directives. Alternatively, you can define state machines with the syn_encoding attribute, as described in Defining State Machines in VHDL, on page 6-14. 3. To extract generics from the source code, do this: LO Click Extract Generic Constants. To override the default, enter a new value for a generic.
3-14
The software uses the new value for the current implementation only. Note that you cannot extract generics if you have a mixed language design. Note: Generic constraint extraction is not supported for mixed designs.
4. To push tristates across process/block boundaries, check that Push Tristates is enabled. For details, see Push Tristates Option, on page 3-51 in the Reference Manual. 5. Determine the interpretation of the synthesis_on and synthesis_off directives: To make the compiler to treat synthesis_on and synthesis_off directives like translate_on/translate_off, enable the Synthesis On/Off Implemented as Translate On/Off option. To ignore the synthesis_on and synthesis_off directives, make sure that this option is not checked. See translate_off/translate_on Directive, on page 8-218 in the Reference Manual for more information. 6. Set other implementation options as needed (see Setting Implementation Options, on page 3-2 for a list of choices). Click OK. When you synthesize the design, the software compiles and maps the design using the options you set.
3-15
1. To reduce the number of ports, eliminate feedthrough ports by enabling Feedthrough Optimization. This can improve routability in the place-androute tool. 2. To reduce area, enable Constant Propagation. Where possible, this option eliminates the logic used when constant inputs to logic cause their outputs to be constant. It is sometimes possible to eliminate this type of logic altogether during optimization. 3. To provide more granularity for applying a design plan to large modules at the always block or process level, enable Create Always/Process Level Hierarchy. Currently a design plan can be applied to either modules or to individual gates, registers, and so on. For a module that is too large to fit in a row or defined region, you might need an extra level of granularity which is not as detailed as a gate-level description. This option creates an additional, intermediate level of hierarchy to which you can apply a LO design plan. For example, in Verilog, the always block becomes a module with the signals in the sensitivity list becoming inputs of the module and the
3-16 Fpga User Guide, December 2005
signals that get their values set becoming outputs of the modules. Similarly, in VHDL, a process becomes a module. You might find that it is easier to apply a design plan to these always blocks/processes. 4. To group Altera Stratix MAC configurations together into one MAC block, enable Create MAC Hierarchy. 5. To add or delete netlist restructure files, such as the files created for bitslicing or zippering, do the following: On the Project->Implementation Options->Netlist Restructuring tab, check the box next to the file you want to add. To remove a file, disable the check box next to the file name.
You can add or delete the files from the Project view. When the implementation is synthesized, the Synplify Premier tool uses the specified netlist restructure files for physical synthesis. 6. Set other implementation options as needed (see Setting Implementation Options, on page 3-2 for a list of choices). Click OK.
3-17
3-18
3-19
started with a compiled design, setting these options automatically initializes the Clock and Inputs/Outputs tabs with the appropriate signals. An empty SCOPE spreadsheet window opens. The tabs along the bottom of the SCOPE window list the different kinds of constraints you can add. For each kind of constraint, the columns contain specific data. You can now enter constraints directly or with the wizard. Refer to Entering and Editing Constraints in the SCOPE Window, on page 3-21 or Entering Default Constraints, on page 3-24. 2. To open an existing file, do one of the following: Double-click the file from the project window. LO Press Ctrl-o or select File->Open. In the dialog box, set the kind of file you want to open to Constraint Files (SCOPE) (*.sdc), and double-click to select the file from the list.
3-20 Fpga User Guide, December 2005
The SCOPE window opens with the file you specified. For details about editing the file, see Entering and Editing Constraints in the SCOPE Window, on page 3-21. If you want to edit the Tcl file directly, see Working with Constraint Files, on page 3-60.
Inputs/ Outputs Registers Multicycle paths False Paths Max Delay Paths Attributes
3-21
To define...
I/O standards for certain technologies of the Actel, Altera, and Xilinx devices for any port in the I/O Standard panel of the SCOPE window. Compile points in a top-level constraint file. See MultiPoint Synthesis, on page 10-28 for more information about compile points. (The Synplify tool does not support this flow.) Place and route tool constraints Other constraints not used for synthesis, but which are passed to other tools. For example, multiple clock cycles from a register or input pin to a register or output pin
The SCOPE window displays columns appropriate to the kind of constraint you picked. You can now enter constraints using the wizard, or work directly in the SCOPE window. 2. Enter or edit constraints as follows: For attribute cells in the spreadsheet, click in the cell and select from the pulldown list of available choices. For object cells in the spreadsheet, click in the cell and select from the pulldown list. When you select from the list, the objects automatically have the proper prefixes in the SCOPE window. Alternatively, you can drag and drop an object from an HDL Analyst view into the cell, or type in a name. If you drag a bus, the software enters the whole bus (busA). To enter busA[3:0], select the appropriate bus bits before you drag and drop them. If you drag and drop or type a name, make sure that the object has the proper prefix: Prefix
v: i: p: b: n:
Description
view object (for a module) instance port bit slice of a port
LO internal net
3-22
For cells with values, type in the value or select from the pulldown list. Click the check box in the Enabled column to enable the constraint or attribute. Make sure you have entered all the essential information for that constraint. Scroll horizontally to check. For example, to set a clock constraint in the Clocks tab, you must fill out Enabled, Clock, Frequency or Period, and Clock Group. The other columns are optional. For details about setting different kinds of constraints, go to the appropriate section listed in Setting Constraints in the SCOPE Window, on page 3-18. 3. For common editing operations, refer to this table: To...
Cut, copy, paste, undo, or redo Copy the same value down a column Insert or delete rows Find text
Do...
Select the command from the popup (hold down the right mouse button to get the popup) or from the Edit menu. Select Fill Down (Ctrl-d) from the Edit or popup menus. Select Insert Row or Delete Rows from the Edit or popup menus. Select Find from the Edit or popup menus. Type the text you want to find, and click OK.
4. Save the file by clicking the Save icon and naming the file. The software creates a TCL constraint file (.sdc). See Working with Constraint Files, on page 3-60 for information about the commands in this file. 5. To apply the constraints to your design, you must add the file to the project now or later. Add it immediately by clicking Yes in the prompt box that opens after you save the constraint file. Add it later, following the procedure for adding a file described in Making Changes to a Project, on page 2-15.
3-23
LO
3-24
The wizard guides you through two dialog boxes, which vary slightly depending on the kind of constraints you want to set.
3. In the first dialog box, select the design objects to which you want to attach the constraints. Move objects to the selected list by either using wildcards, or highlighting objects in the unselected list and using the arrow buttons to move them. If there are no objects in the Unselected box, disable the Exclude Duplicates option. Click Next. 4. In the second dialog box, set defaults for the selected objects. Enable or disable the constraints. Set the default value. Click Finish.
3-25
When you are done, the constraints appear in the SCOPE window. To modify or add to them, do so directly in the SCOPE window (refer to Entering and Editing Constraints in the SCOPE Window, on page 3-21). 5. To apply the constraints, add the file to the project according to the procedure described in Making Changes to a Project, on page 2-15. The constraints file has a .sdc extension. See Working with Constraint Files, on page 3-60 for more information about constraint files.
3-26
To define...
Clocks
Pane Clock
Registers
3-27
To define...
Maximum path delay
Global attributes
Set Object Type to <global>. Select the object (Object). Set the attribute (Attribute) and its value (Value). Check the Enabled box. Do either of the following: Select the type of object (Object Type). Select the object (Object). Set the attribute (Attribute) and its value (Value). Check the Enabled box. Set the attribute (Attribute) and its value (Value). Select the object (Object). Check the Enabled box. Type the TCL command for the constraint (Command). Enter the arguments for the command (Arguments). Check the Enabled box.
Attributes
Attributes
Other
Other
Defining Clocks
Clock frequency is the most important timing constraint, and must be set accurately. If you are planning to auto constrain your design (Using Auto Constraints, on page 3-45), do not define any clocks. The following procedures show you how to define clock frequency (Defining Clock Frequency, on page 3-29) and set other clock constraints that affect timing, like clock groups (Defining Other ClockLO Requirements, on page 3-32).
3-28
Logic C
clkA
clkB
If clkA is...
The path is constrained by a full cycle of clkB. The path is constrained by a full cycle of clkA. For related clocks in the same clock group, the relationship between clocks is calculated; all other paths between the clocks are treated as false paths. The global frequency value is used to constrain path. (Default is 1 MHz or period of 1000 ns.) All global frequency clocks are assigned to the same group.
Undefined
Undefined
3-29
2. Define frequency for individual clocks on the Clocks tab of the SCOPE window (define_clock constraint). Specify the frequency as either a frequency in the Frequency column (freq Tcl option) or a time period in the Period column (-period Tcl option). When you enter a value in one column, the other is calculated automatically. For asymmetrical clocks, specify values in the Rise At (-rise) and Fall At (-fall) columns. The software automatically calculates and fills out the Duty Cycle value. The software infers all clocks, whether declared or undeclared, by tracing the clock pins of the flip-flops. However, it is recommended that you specify frequencies for all the clocks in your design. The defined frequency overrides the global frequency. Any undefined clocks default to the global frequency. 3. Define internal clock frequencies (clocks generated internally) on the SCOPE Clocks tab (define_clock constraint). Apply the constraint according to the source of the internal clock. Source
Register Instance, like a PLL or clock DLL
Combinatorial logic
4. For signals other than clocks, define frequencies with the syn_reference_clock attribute. You can add this attribute on the SCOPE Attributes tab. You might need to do this if your design uses an enable signal as a clocking signal because of limited clocking resources. If the enable is slower than the clock, defining the enable frequency separately instead slowing down the clock frequency ensures more accuracy. If you slow down the clock frequency, it affects all other registers driven by the LO clock, and can result in longer run times as the tool tries to optimize a non-critical path.
3-30
Define this attribute as follows: Define a dummy clock on the Clocks tab (define_clock constraint). Add the syn_reference_clock attribute (Attributes tab) to the affected registers to apply the clock. In the constraint file, you can use the Find command to find all registers enabled by a particular signal and then apply the attribute: define_clock -virtual dummy -period 40.0 define_attribute {find -reg -enable en40} syn_reference_clock dummy 5. For Altera PLLs and Xilinx DCMs and DLLs, define the clock at the primary inputs. For Altera PLLs, you must define the input frequency, because the synthesis software does not use the input value you specified in the Megawizard software. The synthesis tool assigns all the PLL outputs to the same clock group. It forward-annotates the PLL inputs. If needed, use the Xilinx properties directly to define the DCMs and DLLs. The synthesis software assigns defined DCMs and DLLs to the same clock group, because it considers these clocks to be related. It forward-annotates the DLL/DCM inputs. The following shows some examples of the properties you can specify
DLLs DCMs Phase shift and frequency multiplication properties like duty_cycle_correction and clkdv_divide DCM properties like clkfx_multiply and clkfx_divide
6. After synthesis, check the Performance Summary section of the log file for a list of all the defined and inferred clocks in the design. 7. If you do not meet timing goals after place-and-route, adjust the clock constraint as follows: Open the SCOPE window with the clock constraint. In the Route column for the constraint, specify the actual route delay (in nanoseconds), as obtained from the place-and-route results. Adding this constraint is equivalent to putting a register delay on all the input registers for that clock. Resynthesize your design.
3-31
3-32
5. After synthesis, check the Performance Summary section of the log file for a list of all the defined and inferred clocks in the design.
3-33
To synthesize with all the constraints, using the clock period for all I/O paths that do not have an explicit constraint, disable Use clock period for unconstrained IO. Synthesize the design. When you forward-annotate the constraints, the constraints used for synthesis are forward-annotated. 4. If you do not meet timing goals after place-and-route and you need to adjust the input constraints, do the following: Open the SCOPE window with the input constraint. In the Route column for the input constraint, specify the actual route delay in nanoseconds, as obtained from the place-and-route results. Adding this constraint is equivalent to putting a register delay on the input register. Resynthesize your design.
3-34
3-35
Either type the net name with the n: prefix in the first cell or drag the net from a HDL Analyst view into the cell. Click Save. For example, if you specify n:net1, the constraint applies to any path passing through net1. 4. To specify an OR when constraining a list of through points, you can type the net names in the Through field (see the following figure}. Alternatively, do the following Click in the Through field and click the arrow. This opens the Product of Sums interface. Either type the first net name in a cell in a Prod row or drag the net from a HDL Analyst view into the cell. Repeat this step along the same row, adding other nets in the Sum columns. The nets in each row form an OR list.
Alternatively, select Along Row in the SCOPE POS interface. In an HDL Analyst view, select all the nets you want in the list of through points. Drag the selected nets and drop them into the POS interface. The tool fills in the net names along the row. The nets in each row form an OR list. Click Save. LO The constraint works as an OR function and applies to any path passing through any of the specified nets. In the example shown in the previous
3-36
figure, the constraint applies to any path that passes through net1 or net2. 5. To specify an AND when constraining a list of through points, type the names in the Through field (see the following figure) or do the following: Open the Product of Sums interface (see previous step). Either type the first net name in the first cell in a Sum column or drag the net from a HDL Analyst view into the cell. Repeat this step down the same Sum column.
Alternatively, select Down Column in the SCOPE POS interface. In an HDL Analyst view, select all the nets you want in the list of through points. Drag the selected nets and drop them into the POS interface. The tool fills in the net names down the column. The constraint works as an AND function and applies to any path passing through all the specified nets. In the previous figure, the constraint applies to any path that passes through net1 and net3. 6. To specify an AND/OR constraint for a list of through points, type the names in the Through field (see the following figure) or do the following: Create multiple lists as described in the previous 2 steps. Click Save.
3-37
In this example, the synthesis tool applies the constraint to the paths through all points in the lists as follows: net1 AND net3 OR net1 AND net4 OR net2 AND net3 OR net2 AND net4
3-38
The software treats this is as an explicit false constraint and assigns it the highest priority. Any other constraints on this path are ignored. 2. To define a false path between two clock edges, select the SCOPE Clock to Clock tab, and do the following: Specify one clock as the starting clock edge (From Clock Edge).See Defining From/To/Through for Timing Exceptions, on page 3-35 for more information. Specify the other clock as the ending clock edge (To Clock Edge). Click in the Delay column, and select false. Mark the Enabled check box. Use this technique to specify a false path between any two clocks, regardless of whether their clock groups. This constraint can be overridden by a maximum delay constraint on the same path. 3. To define a false path between two clocks, select the SCOPE Clocks tab, and assign the clocks to different clock groups: The software implicitly assumes a false path between clocks in different clock groups. This false path constraint can be overridden by a maximum path delay constraint, or with an explicit constraint as described in the next step. 4. To override an implicit false path between any two clocks (see the previous step), set an explicit constraint between the clocks by selecting the SCOPE Clock to Clock tab, and doing the following: Specify the starting (From Clock Edge) and ending clock edges (To Clock Edge) as described in step 2. Specify a value in the Delay column. Mark the Enabled check box. The software treats this is as an explicit constraint. You can use this method to constrain a path between any two clocks, regardless of whether they belong to the same clock group. 5. To set an implicit false path on a path to/from an I/O port, select Project>Implementation Options->Constraints, and disable Use clock period for unconstrained IO.
3-39
LO
3-40
Do this...
With a SCOPE window open, select View-> Properties. Set the options you want on the Display Settings form. Check the Save settings to profile option if you want to settings to be the default. Select a SCOPE row. Select Format -> Style. On the Styles form, check Save as Default if you want the new settings to be the default. Select the category you want to change (Row Header or Standard), and click Change. Set the display options you want and click OK on both forms. Select a SCOPE row. Select Format -> Style. On the Styles form, check Save as Default if you want the new settings to be the default. Select the category you want to change (Column Header or Standard), and click Change. Set the display options you want and click OK on both forms. Select a SCOPE cell. Select Format -> Cells. Set the display options you want and click OK. Select a column or row in the SCOPE window. Select Format -> Align. Click the alignment you want and click OK. Select a column or row in the SCOPE window. Select Format -> Resize Rows or Format -> Resize Columns. Select a SCOPE cell. Select Format -> Cover Cells to hide a cell. Select Format -> Remove Covering to show a hidden cell.
Set fonts, colors, and borders for a single cell Align text in columns and rows
3-41
Supported on NET
COLLAPSE MAXDELAY MAXSKEW OPEN_DRAIN PULLDOWN PULLUP USELOWSKEWLINES WIREAND
3-42
Figure 3-1: .pin File to .sdc File 3. Click on Add to Project, as appropriate, then click OK.
3-43
Figure 3-2: .pad File to .sdc File 3. Click on Add to Project, as appropriate, then click OK.
LO
3-44
Do not define any clocks. If you define clocks using the SCOPE window or a constraint file, or set the frequency in the Project view, the software uses the user-defined define_clock constraints instead of auto constraints. Make sure any multicycle or false path constraints are specified on registers. 2. Enable the Auto Constrain button on the left side of the Project view. Alternatively, select Project->Implementation Options->Constraints, and enable the Auto Constrain option there.
3-45
3. If you want to auto constrain I/O paths, select Project->Implementation Options->Constraints and enable Use Clock Period for Unconstrained IO. If you do not enable this option, the software only auto constrains flopto-flop paths. Even when the software auto constrains the I/O paths, it does not generate these constraints for forward-annotation. 4. Synthesize the design. The software puts each clock in a separate clock group and adjusts the timing of each clock individually. At different points during synthesis it adjusts the clock period of each clock to be a target percentage of the current clock period, usually 15% - 25%. After the clocks, the timing engine constrains I/O paths by setting the default combinational path delay for each I/O path to be one clock period. The software writes out the generated constraints in a file called AutoConstraint_<design_name>.sdc in the run directory. It also forward-annotates these constraints to the place-and-route tools. 5. Check the results in AutoConstraint_<design_name>.sdc and the log file. To open the .sdc file as a text file, right-click the file in the Implementation Results view and select Open as Text. The flop-to-flop constraints use syntax like the following: LO define_clock -name {b:leon|clk} -period 13.327 -clockgroup Autoconstr_clkgroup_0 -rise 0.000 -fall 6.664 -route 0.000 6. You can now add the generated .sdc file to the project and rerun synthesis with these constraints.
3-46 Fpga User Guide, December 2005
Using Collections
Using Collections
A collection is a group of objects. It can consist of just one object, or of other collections. You can set the same constraint for multiple objects if you group them together in a collection. You can either define collections in the SCOPE window or type the commands in the Tcl script window. The Synplify tool does not support collections. Comparing Methods for Defining Collections, next Creating and Using Collections (SCOPE Window), on page 3-48 Creating Collections (Tcl Commands), on page 3-51 Using the Tcl Find Command to Define Collections, on page 3-53 Using the Expand Tcl Command to Define Collections, on page 3-55 Viewing and Manipulating Collections (Tcl Commands), on page 3-56
Similarly, the current Analyst view could be a lower-level view. In the design shown above, if you push down into B, and then type find -hier a* in the Tcl window, the command finds a3 and a4. However if you cut
3-47
Using Collections
and paste the same command into the SCOPE Collections tab, your results would include a1, a2, a3, and a4, because the SCOPE interface uses the top-level database and searches the entire hierarchy. If you use the Tcl script window, you have to redefine the collection the next time you open the project. When you define a collection in the SCOPE window, the software saves the information in the constraint file for the project. You cannot apply constraints to collections defined in the Tcl script window, but you can apply constraints and attributes to SCOPE collections.
In the Commands column, select find or expand. For tips on using these commands, see Using the Tcl Find Command to Define Collections, on page 3-53 and UsingLO Expand Tcl Command to Define Collections, the on page 3-55. For complete syntax details, see the Reference Manual.
3-48
Using Collections
If you cut and paste a Tcl Find command from the Tcl window into the SCOPE Collections tab, remember that the SCOPE interface works on the top-level database, while the Find command in the Tcl window works on the current level displayed in the Analyst view. See Comparing Methods for Defining Collections, on page 3-47. In the Command Arguments column, type only the arguments to the command you set in the Commands column, so that you locate the objects you want. Do not repeat the command itself. For details of the syntax, see the Reference Manual. Objects in a collection do not have to be of the same type. The collections defined above do the following: Collection find_all find_reg find_comb Finds...
All components in the module endpMux All registers in the module endpMux All combinatorial components under endpMux
The collections you define appear in the SCOPE pull-down object lists, so you can use them to define constraints. To crossprobe the objects selected by the find and expand commands, click Select in the Select in Analyst column. The schematic views highlight the objects located by these commands. For other viewing operations, see Viewing and Manipulating Collections (Tcl Commands), on page 3-56. 2. To create a collection that is made up of other collections, do this: Define the collections as described in the previous step. These collections must be defined before you can concatenate them or add them together in a new collection. To concatenate collections or add to collections, type a name for the new collection in the Collection Name column. Set Commands to one of the operator commands like c_union or c_diff. Type the appropriate arguments in Command Arguments. See Creating Collections (Tcl Commands), on page 3-51 for a list of available commands and the Reference Manual for the complete syntax. Click Run Commands. The software runs through the commands in sequence, so you must first define collections before doing any group or comparative operations.
3-49
Using Collections
The software saves the information in the constraint file for the project. 3. To apply constraints to a collection do the following: Define a collection as described in the previous steps. Go to the appropriate SCOPE tab and specify the collection name where you would normally specify the object name. Collections defined in the SCOPE interface are available from the pull-down object lists. The following figure shows the collections defined in step 1 available for setting a false path constraint.
Specify the rest of the constraint as usual. The software applies the constraint to all the objects in the collection. See examples of constraints in Example: Attribute Attached to a Collection, on page 3-50.
LO
3-50
Using Collections
Use this command... c_union. See Examples: c_union Command, on page 3-52 c_union. See Examples: c_union Command, on page 3-52. c_diff. See Examples: c_diff Command, on page 3-52. c_intersect. See Examples: c_intersect Command, on page 3-52. c_symdiff. See Examples: c_symdiff Command, on page 3-53.
3-51
Using Collections
You can now do various operations on the objects in the collection (see Viewing and Manipulating Collections (Tcl Commands), on page 3-56), but you cannot apply constraints to the collection.
3-52
Using Collections
You can also use the command to compare two collections: set common_collection [c_intersect $collection1 $collection2]
3-53
Using Collections
3. The following table lists some usage tips for specifying the find command. For the full details of the syntax, refer to Tcl find Command, on page 5-48 of the Reference Manual.
Case rules Use the case rules for the language from which the object was generated: VHDL: case-insensitive Verilog: case-sensitive. Make sure that the object name you type in the SCOPE window matches the Verilog name. For Synplify Pro and Synplify Premier mixed language designs, use the case rules for the parent module. This example finds any object in the current view that starts with either a or A:
Restricting search by type of object Restricting search to hierarchical levels below the current view Restricting search by object property
find -seq {*} -filter {@clock==myclk} find -seq {*} -clock myclk LO
3-54
Using Collections
4. Once you have defined the collection, you can view the objects in the collection, using one of the following methods, which are described in more detail in Viewing and Manipulating Collections (Tcl Commands), on page 3-56: Select the collection in an HDL Analyst view (select). Print the collection using the -print option to the find command. Print the collection without carriage returns or properties (c_list). Print collection in columns, with optional properties (c_print). 5. To manipulate the objects in the collection, use the commands described in Viewing and Manipulating Collections (Tcl Commands), on page 3-56.
Use a command like this example... set result [find hier inst {*} filter @slack <= {-1.000}] set result [find hier inst {*} filter @slack <= {-1.000} && @slack >= {+1.000}]
Pins by fanin/fanout value set result [find hier inst {*.D} filter @fanin <= {50}] Sequential components by primitive type
3-55
Using Collections
If you only specify a through point, the expansion stops at sequential elements. The following example finds all elements in the transitive fanout and transitive fanin of a clock-enable net: expand -thru {n:cen} To specify the hierarchical scope of the expansion, use the -hier argument. If you do not specify this argument, the command only works on the current view. The following example expands the cone of logic to reg1, including instances below the current level: expand -hier -to {i:reg1} If you only specify a through point, you can use the -level argument to specify the number of levels of expansion. The following example finds all elements in the transitive fanout and transitive fanin of a clockenable net across one level of hierarchy: expand -thru {n:cen} -level 1 To restrict the search by type of object, use the -object_type argument. The following command finds all pins driven by the specified pin. expand -pin -from {t:i_and3.z} To print a list of the objects found, either use the -print argument to the find command, or use the c_print or c_list commands (see Creating Collections (Tcl Commands), on page 3-51).
3-56
Using Collections
2. To select the collection in an HDL Analyst view, type select <collection>. For example, select $result highlights all the objects in the $result collection. 3. To print a simple list of the objects in the collection, uses the c_list command, which prints a list like the following: {i:EP0RxFifo.u_fifo.dataOut[0]} {i:EP0RxFifo.u_fifo.dataOut[1]} {i:EP0RxFifo.u_fifo.dataOut[2]} ... The c_list command prints the collection without carriage returns or properties. Use this command when you want to perform subsequent Tcl commands on the list. See Example: c_list Command, on page 3-59. 4. To print a list of the collection objects in column format, use the c_print command. For example, c_print $result prints the objects like this: {i:EP0RxFifo.u_fifo.dataOut[0]} {i:EP0RxFifo.u_fifo.dataOut[1]} {i:EP0RxFifo.u_fifo.dataOut[2]} {i:EP0RxFifo.u_fifo.dataOut[3]} {i:EP0RxFifo.u_fifo.dataOut[4]} {i:EP0RxFifo.u_fifo.dataOut[5]} 5. To print a list of the collection objects and their properties in column format, use the c_print command as follows: Annotate the design with a full list of properties by selecting Project>Implementation Options, going to the Options tab, and enabling Annotated Properties for Analyst. Synthesize the design. If you do not enable the annotation option, properties like clock pins will not be annotated as properties. Check the properties available by right-clicking on the object in the HDL Analyst view and selecting Properties from the popup menu. You see a window with a list of the properties that can be reported. In the Tcl window, type the c_print command with the -prop option. For example, typing c_print -prop slack -prop view -prop clock $result lists the objects in the $result collection, and their slack, view and clock properties. Object Name {i:EP0RxFifo.u_fifo.dataOut[0]} {i:EP0RxFifo.u_fifo.dataOut[1]} {i:EP0RxFifo.u_fifo.dataOut[2]} {i:EP0RxFifo.u_fifo.dataOut[3]} {i:EP0RxFifo.u_fifo.dataOut[4]}
Fpga User Guide, December 2005
Using Collections
To print out the results to a file, use the c_print command with the -file option. For example, c_print -prop slack -prop view -prop clock $result -file results.txt writes out the objects and properties listed above to a file called results.txt. When you open this file, you see the information in a spreadsheet format. 6. You can do a number of operations on a collection, as listed in the following table. For details of the syntax, see Tcl Collection Commands, on page 5-39 in the Reference Manual. To...
Copy a collection
Do this...
Create a new variable for the copy and copy the original collection to it with the set command. When you make changes to the original, it does not affect the copy, and vice versa.
v:top v:block_a v:block_b Alternatively, you can use the -print option to an operation command to list the objects.
Generate a Tcl list of the objects in a collection Use the c_list command to view a collection or to convert a collection into a Tcl list. You can manipulate a Tcl list with standard Tcl commands. In addition, the Tcl collection commands work on Tcl lists. This is an example of c_list results: {v:top v:block_a v:block_b} Alternatively, you can use the -print option to an operation command to list the objects. Use the c_foreach command. This example iterates LO through all the objects in the collection:
3-58
Using Collections
3-59
LO
3-60
Use the following syntax for instance, port, and net names in VHDL modules, where v: identifies it as a view object, lib is the name of the library, cell is the name of the design entity, view is a name for the architecture, prefix is a prefix to identify objects with the same name, and object_name is an instance path with periods as separators. You only need view if there is more than one architecture for the design. See the preceding table for the prefixes for different objects. v:cell[.view] [prefix:]object_name Use the * and ? wildcards to match names. The asterisk matches any number of characters, and the question mark matches a single character. These characters do not match periods that are used as
3-61
hierarchy separators. For example, you can use the following to identify all bits of the statereg instance in the statemod module: statemod | i: statereg[*]
Use... define_clock. See Defining Clocks, on page 3-28 for additional information. syn_reference_clock (attribute). See Defining Clocks, on page 3-28 for additional information
Clock domains with define_clock. See Defining Clocks, on asymmetric duty cycles LO page 3-28 for additional information Edge-to-edge clock delays
3-62
To define...
Speed up paths feeding into a register Speed up paths coming from a register Input delays from outside the FPGA Output delays from your FPGA Paths with multiple clock cycles False paths (certain technologies) Path delays
Use... define_reg_input_delay. define_reg_output_delay. define_input_delay. See Defining Input and Output Constraints, on page 3-33 for additional information define_output_delay. See Defining Input and Output Constraints, on page 3-33 for additional information define_multicycle_path. See Defining From/To/Through for Timing Exceptions, on page 3-35 for additional information define_false_path. See Defining False Paths, on page 3-38 for additional information define_path_delay. See Defining From/To/Through for Timing Exceptions, on page 3-35 for additional information
The following code excerpt shows some typical Tcl constraints: # Override the default frequency for clk_fast and set it to run # at 66.0 MHz. define_clock {clk_fast} -freq 66.0 # Set a default input delay of 4 ns define_input_delay -default 4.0 # Except for the "sel" signal, which has an input delay of 8 ns define_input_delay {sel} 8.0 # The outputs have an off-chip delay of 3.0 ns define_output_delay -default 3.0 # Get better results on the critical path going to register # "inst3.q[0] (in the memory) by adding 3 ns with -improve define_reg_input_delay {inst3.q[0]} -improve 3.0 4. You can also add vendor-specific attributes in the constraint file using define_attribute. See Adding Attributes to a Tcl Constraint File, on page 3-73 for more information.
3-63
5. Save the file. 6. Add the file to the project as described in Making Changes to a Project, on page 2-15, and run synthesis.
global frequency constraints into corresponding commands in the *.acf file for Altera, the *.lp file for Lattice, the filename_sdc.sdc file for Actel, and the *.ncf file for Xilinx. See the Reference Manual for details about forward annotation. 4. For Lattice Orca designs, you must copy the constraints into the .prf file. Open the ispLEVER place-and-route tool, and run the Map stage. This creates a .prf file. Copy the .lp file created by the Synplicity software and paste it at the end of the .prf file. Do not overwrite the .prf file.
3-65
3-66
1. To use the predefined attributes package included in the software library, add these lines to the syntax: library synplify; use synplify.attributes.all; 2. Add the attribute or directive you want after the design unit declaration. <declarations>; attribute <att_name> of <object_name>:<object_kind> is <value>; For example: entity simpledff is port(q: out bit_vector(7 downto 0); d : in bit_vector(7 downto 0); clk : in bit); attribute syn_noclockbuf of clk :signal is true; Fordetails of the syntax conventions, see VHDL Attribute and Directive Syntax, on page 10-91 in the Reference Manual. 3. Add the source file to the project.
3-67
/* synthesis <att_name> = <value> */ // synthesis <att_name> = <value> /* synthesis <dir_name> = <value> */ // synthesis <dir_name> = <value>
For details of the synatx rules, see Verilog Attribute and Directive Syntax, on page 9-78 in the Reference Manual. The following are examples: module fifo(out, in) /* synthesis syn_hier = firm */; module b_box(out, in); // synthesis syn_black_box // 2. To attach multiple attributes or directives to the same object, separate the attributes with white spaces, but do not repeat the synthesis keyword. Do not use commas. For example: case state /* synthesis full_case parallel_case */;
3-68
new file, click the SCOPE icon and click Initialize to open the SCOPE window. 2. Click the Attributes tab at the bottom of the SCOPE window. You can either select the object first (step 3) or the attribute first (step 4). 3. To specify the object, do one of the following in the Object column. If you already specified the attribute, the Object column lists only valid object choices for that attribute. Drag the object to which you want to attach the attribute from the RTL or Technology views to the Object column in the SCOPE window. Select the type of object in the Object Filter column, and then select an object from the list of choices in the Object column. Type the name of the object in the Object column. If you do not know the name, use the Find command or the Object Filter column. If you specified the object first, you can now specify the attribute. The list shows only the valid attributes for the type of object you selected. 4. Specify the attribute by holding down the mouse button in the Attribute column and selecting an attribute from the list. To specify a group of attributes, use the wizard, as described in Adding Attributes with the SCOPE Wizard, on page 3-71.
If you selected the object first, the choices available are determined by the selected object and the technology you are using. If you selected the attribute first, the available choices are determined by the technology. When you select an attribute, the SCOPE window tells you the kind of value you must enter for that attribute and provides a brief description of the attribute. If you selected the attribute first, make sure to go back and specify the object.
3-69
5. Fill out the value. Hold down the mouse button in the Value column, and select from the list. You can also type in a value. If you manually type an attribute the software does not recognize, or select an incompatible attribute/object combination, the attribute cell is shaded in red. 6. Save the file. 7. Add it to the project, if it is not already in the project. Choose Project -> Implementation Options. Go to the Options/Constraints panel and check that the file is selected. If you have more than one constraint file, select all those that apply to the implementation.
The software saves the SCOPE information in a Tcl constraint file, using define_attribute statements. When you synthesize the design, the software reads the constraint file and applies the attributes.
LO
3-70
3-71
Step 1
Step 2
4. In the second dialog box, do the following: Set the value of the attribute, which applies to all the selected objects. Enable the attribute to apply the value; disable it to remove the attribute. Click Finish. The attribute is set in the SCOPE spreadsheet and saved in the constraint file. The SCOPE spreadsheet reflects your choices. LO
3-72
3-73
4. Specify the attribute and the value in the box. The bottom left of the form shows a short description of the selected attribute and lists the type of value required. LO 5. Click OK. The software writes the attribute to the constraint file.
3-74
CHAPTER 4
Result Analysis
This chapter describes typical analysis tasks. It describes graphical analysis with the HDL Analyst tool as well as interpretation of the text log file. It covers the following:
Checking Log Results, on page 4-2 Handling Messages, on page 4-8 Basic Operations in the Schematic Views, on page 4-16 Exploring Design Hierarchy, on page 4-30 Finding Objects, on page 4-37 Crossprobing, on page 4-48 Analyzing With the HDL Analyst Tool, on page 4-56 Analyzing Timing, on page 4-73 The Island Timing Report, on page 4-83 The Island Timing Analyst, on page 4-88 Island Timing Report Critical Paths, on page 4-98
For information about using the Synplify Premier Physical Analyst, see Chapter 5, Physical Analyst.
4-1
Viewing the Log File, next Analyzing Results Using the Log File Reports, on page 4-5 Using the Log Watch Window, on page 4-6
To view the log file in the default HTML format, select View->Log File or
click the View Log button in the Project window. You see the log file in HTML format. Alternatively you can double-click the designName_srr.htm file in the Implementation Results view to open the HTML log file.
To see a text version of the log file, double-click the designName.srr file
in the Implementation Results view. A Text Editor window opens with the log file. Alternatively, you can set the default to show the text file version instead of the HTML version. Select Options->Project View Options, and toggle off the View log file in HTML option. LO The log file lists the compiled files, details of the synthesis run, colorcoded errors, warnings and notes, and a number of reports. For infor-
4-2
mation about the reports, see Analyzing Results Using the Log File Reports, on page 4-5.
Use the scroll bars. Use the Find command as described in the next step. In the HTML file, click the appropriate header to jump to that point in
the log file. For example, you can jump to the Starting Points with Worst Slack section. 3. To find information in the log file, select Edit->Find or press Ctrl-f. Fill out the criteria in the form and click OK. For general information about working in an Editing window, including adding bookmarks, see Editing HDL Source Files with the Built-in Text Editor, on page 2-5.
4-3
The areas of the log file that are most important are the warning messages and the timing report. The log file includes a timing report that lists the most critical paths. The Synplify Pro and Synplify Premier products also let you generate a report for a path between any two designated points, see Analyzing Paths with the Timing Analyst, on page 4-76. The following table lists places in the log file you can use when searching for information. To find...
Notes Warnings and errors
Search for...
@N or look for blue text @W and @E, or look for purple and red text respectively Performance Summary START TIMING REPORT Interface Information Resource Usage Report Gated clock report
Performance summary The beginning of the timing report Detailed information about slack times, constraints, arrival times, etc. Resource usage Gated clock conversions
4. Resolve any errors and check all warnings. You must fix errors, because you cannot synthesize a design with errors. Check the warnings and make sure you understand them. See Checking Results in the Message Viewer, on page 4-8 for information. Notes are informational and usually can be ignored. For details about crossprobing and fixing errors, see Handling Warnings, on page 4-14, Editing HDL Source Files with the Built-in Text Editor, on page 2-5, and Crossprobing from the Text Editor Window, on page 4-51. 5. If you are trying to find and resolve warnings, you can bookmark them as shown in this procedure:
Select Edit->Find or press Ctrl-f. Type @W as the criteria on the Find form and click Mark All. The
software inserts bookmarks at every line with a warning. You can LO now page through the file from bookmark to bookmark using the commands in the Edit menu or the icons in the Edit toolbar. For more
4-4
information on using bookmarks, see Editing HDL Source Files with the Built-in Text Editor, on page 2-5. 6. To crossprobe from the log file to the source code, click on the file name in the HTML log file or double-click on the warning text (not the ID code) in the ASCII text log file.
Check the slack times. See Handling Negative Slack, on page 4-81 for
details.
Check the detailed information for the critical paths, including the
setup requirements at the end of the detailed critical path description. You can crossprobe and view the information graphically and determine how to improve the timing.
In the HTML log file, click the link to open up the HDL Analyst view
for the path with the worst slack. To generate Synplify Premier or Synplify Pro timing information about a path between any two designated points, see Analyzing Paths with the Timing Analyst, on page 4-76. For information about the Synplify Premier island-based timing report, see Basic Operations in the Schematic Views, on page 4-16. 2. To check buffers,
Check the report by going to the Net Buffering Report section of the log
file.
Go to the Resource Usage Report section at the end of the log file.
Fpga User Guide, December 2005 4-5
Hold down Ctrl or Shift, click on the window, and move it to a position
you want. This makes the Log Watch window an independent window, separate from the Project view.
To move the window to another position within the Project view, rightclick in the window border and select Float in Main Window. Then move the window to the position you want, as described above. See Log Watch Window, on page 2-6 in the Reference Manual for information about the popup menu commands. 3. Select the log parameter you want to monitor by clicking on a line and selecting a parameter from the resulting popup menu.
LO The software automatically fills in the appropriate value from the last synthesis run. You can check the clock requested and estimated
4-6 Fpga User Guide, December 2005
frequencies, the clock requested and estimated periods, the slack, and some resource usage criteria. 4. To compare the results of two or more synthesis runs, do the following:
If needed, resize or move the window as described above. Click the right mouse button in the window and select Configure Watch
from the popup.
In the Log Watch window, set the parameters you want to compare.
The software shows the values for the selected implementations side by side. For more information about multiple implementations, see Design Guidelines, on page 6-2.
4-7
Handling Messages
Handling Messages
This section describes how to work with the error messages, notes, and warnings that result after a run. See the following for details:
Checking Results in the Message Viewer, next Filtering Messages in the Message Viewer, on page 4-10 Filtering Messages from the Command Line, on page 4-13 Handling Warnings, on page 4-14 Automating Message Filtering with a synhooks Script, on page 4-14
LO
4-8
Handling Messages
3. To reduce the clutter in the window and make messages easier to find and understand, use the following techniques:
Use the color cues. For example, when you have multiple synthesis
runs, messages that have not changed from the previous run are in black; new messages are in red.
Enable the Group Common IDs option in the upper right. This option
groups all messages with the same ID and puts a plus symbol next to the ID. You can click the plus sign to expand grouped messages and see individual messages. There are two types of message groups: - The same warning or note ID appears in multiple source files indicated by a dash in the source files column. - Multiple warnings or notes in the same line of source code indicated by a bracketed number.
To find a particular message, type text in the Find field. The tool finds
the next occurrence. You can also click the F3 key to search forward, and the Shift-F3 key combination to search backwards.
4-9
Handling Messages
4. To filter the messages, use the procedure described in Filtering Messages in the Message Viewer, on page 4-10. Crossprobe errors from the message window:
To open the corresponding source code file, click the link in the Source
Location column. Correct any errors and rerun synthesis. For warnings, see Handling Warnings, on page 4-14.
To view the message in the context of the log file, click the link in the
Log Location column.
2. Click Filter in the message window. LO The Warning Filter spreadsheet opens, where you can set up filtering expressions. Each line is one filter expression.
4-10
Handling Messages
To hide your filtered choices from the list of messages, click Hide Filter
Matches in the Warning Filter window.
Set the columns to reflect the criteria you want to filter. You can
either select from the pull-down menus or type your criteria. If you have multiple synthesis runs, the pull-down menu might contain selections that are not relevant to your design. The first line in the following example sets the criteria to show all warnings (Type column) with message ID FA188 (ID). The second set of criteria displays all notes that begin with MF.
Use multiple fields and operators to refine filtering. You can use
wildcards in the field, as in line 2 of the example. Wildcards are casesensitive and space-sensitive. You can also use ! as a negative operator. For example, if you set the ID in line 2 to !MF*, the message list would show all notes except those that begin with MF.
4-11
Handling Messages
Click Apply when you have finished setting the criteria. This
automatically enables the Apply Filter button in the messages window, and the list of messages is updated to match the criteria. The synthesis tool interprets the criteria on each line in the Warning Filter window as a set of AND operations (Warning and FA188), and the lines as a set of OR operations (Warning and FA188 or Note and MF*).
Save the project. The synthesis tool generates a Tcl file called
projectName.pfl (Project Filter Log) in the same location as the main project file. The following is an example of the information in this file: log_filter -hide_matches log_filter -field type==Warning -field message==*Una* -field source_loc==sendpacket.v -field log_loc==usbHostSlave.srr -field report=="Compiler Report" log_filter -field type==Note log_filter -field id==BN132 log_filter -field id==CL169 log_filter -field message=="Input *" log_filter -field report=="Compiler Report"
When you want to reuse the filters, source the projectName.pfl file.
You can also include this file in a synhooks Tcl script to automate your process.
LO
4-12
Handling Messages
Type the log_filter commands in a Tcl file. Source the file when you want to reuse the filters you set up.
3. To print the results of the log_filter commands to a file, add the log_report command at the end of a list of log_filter commands. log_report -print filteredMsg.txt This command prints the results of the preceding log_filter commands to the specified text file, and puts the file in the same directory as the main project file. The file contains the filtered messages, for example: @N MF138 Rom slaveControlSel_1 mapped in logic. Mapper Report wishbonebi.v (156) usbHostSlave.srr (819) 05:22:06 Mon Oct 18 @N(2) MO106 Found ROM, 'slaveControlSel_1', 15 words by 1 bits Mapper Report wishbonebi.v (156) usbHostSlave.srr (820) 05:22:06 Mon Oct 18 @N MO106 Found ROM, 'slaveControlSel_1', 15 words by 1 bits Mapper Report wishbonebi.v (156) usbHostSlave.srr (820) 05:22:06 Mon Oct 18 @N MF138 Rom hostControlSel_1 mapped in logic. Mapper Report wishbonebi.v (156) usbHostSlave.srr (821) 05:22:06 Mon Oct 18 @N MO106 Found ROM, 'hostControlSel_1', 15 words by 1 bits Mapper Report wishbonebi.v (156) usbHostSlave.srr (822) 05:22:06 Mon Oct 18 @N Synthesizing module writeUSBWireData Compiler Report writeusbwiredata.v (59) usbHostSlave.srr (704) 05:22:06 Mon Oct 18
4-13
Handling Messages
Handling Warnings
If you get warnings (@W prefix) after a synthesis run, do the following:
Read the warning message and decide if it is something you need to act
on, or whether you can ignore it.
The following loads the message filter file when the project is opened.
Specify the name of the message filter file you created in step 1. Note that you must source the file. LO
4-14
Handling Messages
proc syn_on_open_project {project_path} { set filter filterFilename puts "FILTER $filter IS BEING APPLIED" source d:/tcl/filters/$filterFilename }
4-15
Differentiating Between the Views, next Opening the Views, on page 4-17 Analyzing Your Design Graphically, on page 4-19 Viewing Object Properties, on page 4-20 Selecting Objects in the RTL/Technology Views, on page 4-23 Working with Multisheet Schematics, on page 4-24 Moving Between Views in a Schematic Window, on page 4-26 Setting Schematic View Preferences, on page 4-26 Managing Windows, on page 4-28
For information on specific tasks like analyzing critical paths, see the following sections:
Exploring Object Hierarchy by Pushing/Popping, on page 4-31 Exploring Object Hierarchy of Transparent Instances, on page 4-36 Browsing to Find Objects, on page 4-37 Crossprobing, on page 4-48 Analyzing With the HDL Analyst Tool, on page 4-56 Analyzing Timing, on page 4-73
LO
4-16
4-17
Start with a compiled design. To open a hierarchical RTL view, do one of the following: Select HDL Analyst->RTL->Hierarchical View. ) (a plus sign inside a circle). Click the RTL View icon ( Double-click the .srs file in the Implementation Results view. To open a flattened RTL view, select HDL Analyst->RTL>Flattened View. Start with a mapped (synthesized) design. To open a hierarchical Technology view, do one of the following: Select HDL Analyst ->Technology->Hierarchical View. Click the Technology View icon (NAND gate icon ). Double-click the .srm file in the Implementation Results view. To open a flattened Technology view, select HDL Analyst-> Technology->Flattened View. Start with a synthesized design that has been floorplanned with physical constraint regions. To open a RTL Floorplan view: Select HDL Analyst->RTL->Floorplanned View. Double-click the partitioned netlist (.srp) file from the Implementation Results view.
All RTL and Technology views have the schematic on the right and a pane on the left that contains a hierarchical list of the objects in the design. This pane is called the Hierarchy Browser. The bar at the top of the window contains the name of the view, the kind of view, hierarchical level, and the number of sheets in the schematic. See Hierarchy Browser, on page 2-18 in the Reference Manual for a description of the Hierarchy Browser.
LO
4-18
RTL View
Technology View
4-19
To analyze information, compare the current view with the information in the RTL/Technology view, the log file, the FSM view, and the source code. Synplify users do not have access to the FSM view. You can use techniques like crossprobing, flattening, and filtering to isolate and examine the components. The following table points you to where you can find more information about some analysis techniques. For Information About
Crossprobing Analyzing logic Isolating or filtering logic Expanding filtered logic Flattening Analyzing timing
See...
Crossprobing, on page 4-48 Analyzing With the HDL Analyst Tool, on page 4-56 Filtering Schematics, on page 4-60 Expanding Pin and Net Logic, on page 4-62 and Expanding and Viewing Connections, on page 4-66 Flattening Schematic Hierarchy, on page 4-67 Analyzing Timing, on page 4-73
LO
4-20
4-21
Slow property
When you are working with filtered views, you can use the New property to quickly identify objects that have been added to the current schematic with commands like Expand. You can step through successive filtered views to determine what was added at each step. This can be useful when you are debugging your design. The following figure expands one of the pins from the previous filtered view. The new instance added to the view has two flags: new and slow. LO
4-22
Do this...
Click on the object in the RTL or Technology schematic, or click the object name in the Hierarchy Browser. Use one of these methods: Draw a rectangle around the objects. Select an object, press Ctrl, and click other objects you want to select. Select multiple objects in the Hierarchy Browser. See Browsing With the Hierarchy Browser, on page 4-37. Use Find to select the objects you want. See Using Find for Hierarchical and Restricted Searches, on page 4-39. Use Edit->Find to select the objects (see Browsing With the Find Command, on page 4-38), or use the Hierarchy Browser, which lists objects by type.
4-23
To select...
All objects of a certain type (instances, ports, nets) No objects (deselect all currently selected objects)
Do this...
To select all objects of a certain type, do either of the following: Right-click and choose the appropriate command from the Select All Schematic/Current Sheet popup menus. Select the objects in the Hierarchy Browser. Click the left mouse button in a blank area of the schematic or click the right mouse button to bring up the pop-up menu and choose Unselect All. Deselected objects are no longer highlighted.
The HDL Analyst view highlights selected objects in red. If the object you select is on another sheet of the schematic, the schematic tracks to the appropriate sheet. If you have other windows open, the selected object is highlighted in the other windows as well (crossprobing), but the other windows do not track to the correct sheet. Selected nets that span different hierarchical levels are highlighted on all the levels. See Crossprobing, on page 4-48 for more information about crossprobing. Some commands affect selection by adding to the selected set of objects: the Expand commands, the Select All commands, and the Select Net Driver and Select Net Instances commands.
4-24
2. To navigate through a multisheet schematic, refer to this table. It summarizes common operations and ways to navigate. To view...
Next sheet or previous sheet
Lower-level logic of a transparent instance on separate sheets All objects of a certain type
4-25
2. To move forward again, click the Forward icon or draw the appropriate mouse stroke. The software displays the next view in the display history.
To...
Display the Hierarchy Browser Control crossprobing from an object to a P&R text file Determine the number of objects displayed on a sheet. Determine the number of objects displayed on a sheet in a filtered view.
Do this...
Enable Show Hierarchy Browser (General tab). Enable Enhanced Text Crossprobing. (General tab) Set the value with Maximum Instances on the Sheet Size tab. Increase the value to display more objects per sheet. Set the value with Maximum Filtered Instances on the Sheet Size tab. Increase the number to display more objects per sheet. You cannot set this option to a value less than the Maximum Instances value.
Some of these options do not take effect in the current view, but are visible in the next schematic view you open. 3. To view hierarchy within a cell, enable the General->Show Cell Interiors option.
4. To control the display of labels, first enable the Text->Show Text option, and then enable the Label Options you want. The following figure illustrates the label that each option controls.
4-27
Show
For a more detailed information about some of these options, see Schematic Display, on page 6-9 in the Reference Manual. 5. Click OK on the HDL Analyst Options form. The software writes the preferences you set to the .ini file, and they remain in effect until you change them.
Managing Windows
As you work on a project, you open different windows. For example, you might have two Technology views, an RTL view, and a source code window open. The following guidelines help you manage the different windows you have open. For information about cycling through the display history in a single schematic, see Moving Between Views in a Schematic Window, on page 4-26. 1. Toggle on View->Workbook Mode. Below the Project view, you see tabs like the following for each open view. The tab for the current view is on top. The symbols in front of the view name on the tab help identify the kind of view. LO
4-28
2. To bring an open view to the front, if the window is not visible, click its tab. If part of the window is visible, click in any part of the window. If you previously minimized the view, it will be in minimized form. Double-click the minimized view to open it. 3. To bring the next view to the front, click Ctrl-F6 in that window. 4. Order the display of open views with the commands from the Window menu. You can cascade the views (stack them, slightly offset), or tile them horizontally or vertically. 5. To close a view, press Ctrl-F4 in that window or select File->Close.
4-29
Traversing Design Hierarchy with the Hierarchy Browser, on page 4-30 Exploring Object Hierarchy by Pushing/Popping, on page 4-31 Exploring Object Hierarchy of Transparent Instances, on page 4-36
Instances and submodules Ports Internal nets Clock trees (in an RTL view)
The browser lists the objects by type. A plus sign in a square icon indicates that there is hierarchy under that object and a minus sign indicates that the design hierarchy has been expanded. To see lower-level hierarchy, click on the plus sign for the object. To ascend the hierarchy, click on the minus sign.
LO
4-30
Refer to Hierarchy Browser Symbols, on page 2-19 in the Reference Manual for an explanation of the symbols.
4-31
Hierarchical object
Press right mouse button and draw downward to push into an object
LO
4-32
Select View->Push/Pop Hierarchy. Right-click in the Technology view and select Push/Pop Hierarchy from
the popup menu.
Press F2.
The cursor changes to an arrow. The direction of the arrow indicates the underlying hierarchy, as shown in the following figure. The status bar at the bottom of the window reports information about the objects over which you move your cursor.
3. To push (descend) into an object, click on the hierarchical object. For a transparent instance, you must click on the pale yellow border. The following figure shows the result of pushing into a ROM. When you descend into a ROM, you can push into it one more time to see the ROM data table. The information is in a view-only text file called rom.info.
4-33
Similarly, you can push into a state machine. (Synplify users cannot
push into state machines.) When you push into an FSM from the RTL view, you open the FSM viewer where you can graphically view the transitions. For more information, see Using the FSM Viewer, on page 6-25. If you push into a state machine from the Technology view, you see the underlying logic.
LO
4-34
Press the right mouse button and draw an upward stroke to pop up a level
The software moves up a level, and displays the next level of hierarchy. 2. To pop (ascend) a level using the commands or icon, do the following:
Select the command or icon if you are not already in Push/Pop mode.
See Pushing into Objects, on page 4-32for details.
Click the right mouse button in a blank area of the view. Deselect View->Push/Pop Hierarchy. Deselect the Push/Pop Hierarchy icon. Press F2.
4-35
Transparent Instance
You have no direct control; the transparent instance is automatically generated by some commands that result in a filtered view. Context maintained; lower-level logic is displayed inside a hollow yellow box at the hierarchical level of the parent.
Design context
LO
4-36
Finding Objects
Finding Objects
In the schematic views, you can use the Hierarchy Browser or the Find command to find objects, as explained in these sections:
Browsing to Find Objects, next Using Find for Hierarchical and Restricted Searches, on page 4-39 Using Wildcards with the Find Command, on page 4-42 Using Find to Search the Output Netlist, on page 4-45
For infomation about the Tcl Find command, which you use to locate objects, and create collections, see Tcl find Command, on page 5-48.
4-37
Finding Objects
Push down into the higher-level object, and then select the object
from the Hierarchy Browser. The selected object is highlighted in the schematic. The following example shows how moving down the object hierarchy and selecting an object causes the schematic to move to the sheet and level that contains the selected object.
Schematic pushes down to the correct level to show the selected object.
4. To select all objects of the same type, select them from the Hierarchy Browser. For example, you can find all the nets in your design.
Select objects in the LO selection box on the left. You can select all the
objects or a smaller set of objects to browse. If length makes it hard to read a name, click the name in the list to cause the software to display the entire name in the field at the bottom of the dialog box.
Fpga User Guide, December 2005
4-38
Finding Objects
Click the arrow to move the selected objects over to the box on the
right. The software highlights the selected objects. 3. In the Object Query dialog box, click on an object in the box on the right. The software tracks to the schematic page with that object.
4-39
Finding Objects
3. Select the tab for the type of object. The Unhighlighted box on the left lists all objects of that type (instances, symbols, nets, or ports). For fastest results, search by Instances rather than Nets. When you select Nets, the software loads the whole design, which could take some time. 4. Click one of these buttons to set the hierarchical range for the search: Entire Design, Current Level & Below, or Current Level Only, depending on the hierarchical level of the design to which you want to restrict your search. The range setting is especially important when you use wildcards. See Effect of Search Range on Wildcard Searches, on page 4-42 for details. Current Level Only or Current Level & Below are useful for searching filtered schematics or critical path schematics. Use Entire Design to hierarchically search the whole design. For large hierarchical designs, reduce the scope of the search by using the techniques described in the first step. The Unhighlighted box shows available objects within the scope you set. Objects are listed in alphabetical order, not hierarchical order. 5. To search for objects in the mapped database or the output netlist, set the Name Space option. LO The name of an object might be changed because of synthesis optimizations or to match the place-and-route tool conventions, so that the
4-40
Finding Objects
object name may no longer match the name in the original netlist. Setting the Name Space option ensures that the Find command searches the correct database for the object. For example, if you set this option to Tech View, the tool searches the mapped database (.srm) for the object name you specify. For information about using this feature to find objects from an output netlist, see Using Find to Search the Output Netlist, on page 4-45. 6. Do the following to select objects from the list. To use wildcards in the selection, see the next step.
Click on the objects you want from the list. If length makes it hard to
read a name, click the name in the list to cause the software to display the entire name in the field at the bottom of the dialog box.
Click Find 200 or Find All. The former finds the first 200 matches, and
then you can click the button again to find the next 200.
Click the right arrow to move the objects into the box on the right, or
double-click individual names. The schematic displays highlighted objects in red. 7. Do the following to select objects using patterns or wildcards.
Type a pattern in the Highlight Wildcard field. See Using Wildcards with
the Find Command, on page 4-42 for a detailed discussion of wildcards. The Unhighlighted list shows the objects that match the wildcard criteria. If length makes it hard to read a name, click the name in the list to cause the software to display the entire name in the field at the bottom of the form.
Click the right arrow to move the selections to the box on the right, or
double-click individual names. The schematic displays highlighted objects in red. You can use wildcards to avoid typing long pathnames. Start with a general pattern, and then make it more specific. The following example browses and uses wildcards successively to narrow the search.
Find all instances three levels down Narrow search to find instances that begin with i_ Narrow search to find instances that begin with un2 after the second hierarchy separator
Finding Objects
8. You can leave the dialog box open to do successive Find operations. Click OK or Cancel to close the dialog box when you are done. For detailed information about the Find command and the Object Query dialog box, see Find Command (HDL Analyst), on page 3-17 of the Reference Manual.
LO
4-42
Finding Objects
hierarchical point (1, 2A, 2B, 3A1, 3A2, 3B1, 3B2, and 3B3). The result of an asterisk search (*) with Entire Design is a list of all matches in the design, regardless of the current level.
Entire Design
2A
Current Level
2B
3A2
3B1
3B2
3B3
2. The software applies the wildcard pattern to all applicable objects within the range. For Current Level and Current Level and Below, the current level determines the starting point. Dots match hierarchy separators, unless you use the backslash escape character in front of the dot (\.). Hierarchical search patterns with a dot (like *.*) are repeated at each level included in the scope. See Effect of
Fpga User Guide, December 2005 4-43
Finding Objects
Search Range on Wildcard Searches, on page 4-42 and Wildcard Search Examples, on page 4-44 for details and examples, respectively. If you use the *.* pattern with Current Level, the software matches non-hierarchical names at the current level that include a dot.
2A
2B
3A1
3A2
3B1
3B2
3B3
Scope
Entire Design
Current Level
* *.*
1 2B
LO
4-44
Finding Objects
Scope
Current Level and Below
2B 3A2 1
4-45
Finding Objects
Copy Name
3. Copy the name and open a Technology view. 4. In the Technology view, press Ctrl-f or select Edit->Find to open the Object Query dialog box and do the following:
Paste the object name you copied into the Highlight Search field. Set the Name Space option to Netlist and click Find All.
Search by Netlist
LO
4-46
Finding Objects
If you leave the Name Space option set to the default of Tech View, the tool does not find the name because it is searching the mapped database instead of the output netlist.
Double click the name to move it into the Highlighted field and close the
dialog box. In the Technology view, the name is highlighted in the schematic. 5. Select HDL Analyst->Filter Schematic to view only the highlighted portion of the schematic.
Filtered View
4-47
Crossprobing
6. Double click on the filtered schematic to crossprobe to the corresponding code in the HDL file.
Crossprobing
This section describes how to crossprobe from different views. It includes the following:
Crossprobing Description, on page 4-48, next Crossprobing within an RTL/Technology View, on page 4-49 Crossprobing from the RTL/Technology View, on page 4-49 Crossprobing from the Text Editor Window, on page 4-51 Crossprobing from the Tcl Script Window, on page 4-54 Crossprobing from the FSM Viewer, on page 4-54
Crossprobing Description
Crossprobing is the process of selecting an object in one view and having the object or the corresponding logic automatically highlighted in other views. Highlighting a line of text, for example, highlights the corresponding logic in the schematic views. Crossprobing helps you visualize where coding changes or timing constraints might help to reduce area or improve performance. You can crossprobe between the RTL view, Technology view, the FSM Viewer (not available in the Synplify product), the log file, the source files, and some external text files from place-and-route tools. However, not all objects or source code crossprobe to other views, because some source code and RTL view logic is optimized away during the compilation or mapping processes. For further details, see Crossprobing, on page 4-48 of the Reference Manual. LO
4-48
Crossprobing
Highlighted Object
Module icon in Hierarchy Browser Net icon in Hierarchy Browser Port icon in Hierarchy Browser Instance in schematic Net in schematic Port in schematic
In this example, when you select the DECODE module in the Hierarchy Browser, the DECODE module is automatically selected in the RTL view.
Crossprobing
The software automatically highlights the object in all open views. If the open view is a schematic, the software highlights the object in the Hierarchy Browser on the left as well as in the schematic. If the highlighted object is on another sheet of a multi-sheet schematic, the view does not automatically track to the page. If the crossprobed object is inside a hidden instance, the hidden instance is highlighted in the schematic. If the open view is a source file, the software tracks to the appropriate code and highlights it. The following figure shows crossprobing between the RTL, Technology, and Text Editor (source code) views.
Technology View
RTL View
Text Editor
2. To crossprobe from the RTL or Technology view to the source file when the source file is not open, double-click on the object in the RTL or Technology view. LO Double-clicking automatically opens the appropriate source code file and highlights the appropriate code. For example, if you double-click an object in a Technology view, the HDL Analyst tool automatically opens
4-50
Crossprobing
an editor window with the source code and highlights the code that contains the selected register. The following table summarizes the crossprobing capability from the RTL or Technology view. From
RTL
To
Source code
Procedure
Double-click an object. If the source code file is not open, the software opens the Text Editor window to the appropriate section of code. If the source file is already open, the software scrolls to the correct section of the code and highlights it. The Technology view must be open. Click the object to highlight and crossprobe. The FSM view must be open. The state machine must be coded with a onehot encoding style. Click the FSM to highlight and crossprobe. If the source code file is already, open, the software scrolls to the correct section of the code and highlights it. If the source code file is not open, double-click an object in the Technology view to open the source code file. The RTL view must be open. Click the object to highlight and crossprobe.
RTL RTL
Technology
Technology
RTL
Crossprobing
Editor window; to crossprobe from a text log file, double-click on the text of the error, warning, or note. 3. To crossprobe from a third-party text file (not source code or a log file), select Options->HDL Analyst Options->General, and enable Enhanced text crossprobing. 4. Select the appropriate portion of text in the Text Editor window. In some cases, it may be necessary to select an entire block of text to crossprobe. The software highlights the objects corresponding to the selected code in all the open windows. For example, if you select a state name in the code, it highlights the state in the FSM viewer. If an object is on another schematic sheet or on another hierarchical level, the highlighting might not be obvious. If you filter the RTL or schematic view (right-click in the source code window with the selected text and select Filter Schematic from the popup menu), you can isolate the highlighted objects for easy viewing.
Select the column by pressing Alt and dragging the cursor to the end
of the column. On UNIX and Linux platforms, use the key to which the Alt function is mapped; this is usually the Meta or Diamond key for UNIX or the Ctrl-Alt key combination for Linux.
To select all the objects in the path, right-click and choose Select All
from the popup menu. Alternatively, you can select certain objects only, as described next. The software selects the objects in the column, and highlights the path in the open RTL and Technology views. LO
4-52
Crossprobing
Text Editor
Technology View
To further filter the objects in the path, right-click and choose Select
From from the popup menu.On the form, check the objects you want, and click OK. The corresponding objects are highlighted.
4-53
Crossprobing
3. To isolate and view only the selected objects, do this in the Technology view: press F12, or right-click and select the Filter Schematic command from the popup menu. You see just the selected objects.
4-54
Crossprobing
For FSMs with a onehot encoding style, click the state bubbles in the
bubble diagram or the states in the FSM transition table.
For all other FSMs, click the states in the bubble diagram. You
cannot use the transition table because with these encoding styles, the number of registers in the RTL or Technology views do not match the number of registers in the FSM Viewer. The software highlights the corresponding code or object in the open views. You can only crossprobe from a state in the FSM table if you used a onehot encoding style.
4-55
Viewing Design Hierarchy and Context, next Filtering Schematics, on page 4-60 Expanding Pin and Net Logic, on page 4-62 Expanding and Viewing Connections, on page 4-66
The HDL Analyst views also let you analyze timing and crossprobe, and these operations are described in other sections: Basic Operations in the Schematic Views, on page 4-16, Exploring Design Hierarchy, on page 4-30, Finding Objects, on page 4-37, Crossprobing, on page 4-48, and Analyzing Timing, on page 4-73.
Result of enabling Show Cell Interior option (same view with internal logic)
2. To hide selected hierarchy, select the instance whose hierarchy you want to exclude, and then select Hide Instances from the HDL Analyst menu or the right-click popup menu in the schematic view. You can hide opaque (solid yellow) or transparent (hollow) instances. The software marks hidden instances with an H in the lower left. Hidden instances are like black boxes; their hierarchy is excluded from filtering, expanding, dissolving, or searching in the current window, although they can be crossprobed. An instance is only hidden in the current view
4-57
window; other view windows are not affected. Temporarily hiding unnecessary hierarchy focuses analysis and saves time in large designs.
Before you save a design with hidden instances, select Unhide Instances from the HDL Analyst menu or the right-click popup menu and make the hidden internal hierarchy accessible again. Otherwise, the hidden instances are saved as black boxes, without their internal logic. Conversely, you can use this feature to reduce the scope of analysis in a large design by hiding instances you do not need, saving the reduced design to a new name, and then analyzing it. 3. To view the internal logic of a hierarchical instance, you can push into the instance, dissolve the selected instance with the Dissolve Instances command, or flatten the design. You cannot use these methods to view the internal logic of a hidden instance.
LO
4-58
Generates a view that shows only the internal logic. You do not see the internal hierarchy in context. To return to the previous view, click Back. See Exploring Object Hierarchy by Pushing/Popping, on page 4-31 for details. Opens a new view where the entire design is flattened, except for hidden hierarchy. Large flattened designs can be overwhelming. See Flattening Schematic Hierarchy, on page 4-67 for details about flattening designs. Because this is a new view, you cannot use Back to return to the previous view. To return to the top-level unflattened schematic, right-click in the view and select Unflatten Schematic. Generates a view where the hierarchy of the selected instances is flattened, but the rest of the design is unaffected. This provides context. See Flattening Schematic Hierarchy, on page 4-67 for details about dissolving instances.
4. If the result of filtering or dissolving is a hollow box with no internal logic, try either of the following, as appropriate, to view the internal hierarchy:
4-59
Filtering Schematics
Filtering is a useful first step in analysis, because it focuses analysis on the relevant parts of the design. Some commands, like the Expand commands, automatically generate filtered views; this procedure only discusses manual filtering, where you use the Filter Schematic command to isolate selected objects. See Chapter 3 of the Reference Manual for details about these commands. This table lists the advantages of using filtering over flattening: Filter Schematic Command
Loads part of the design; better memory usage Combine filtering with Push/Pop mode, and history buttons (Back and Forward) to move freely between hierarchical levels
Flatten Commands
Loads entire design Must use Unflatten Schematic to return to top level, and flatten the design again to see lower levels. Cannot return to previous view if the previous view is not the top-level view.
1. Select the objects that you want to isolate. For example, you can select two connected objects. If you filter a hidden instance, the software does not display its internal hierarchy when you filter the design. The following example illustrates this.
Select Filter Schematic from the HDL Analyst menu or the right-click
popup menu.
4-60
Click the Filter Schematic icon (buffer gate) ( ). Press F12. Press the right mouse button and draw a narrow V-shaped mouse
stroke in the schematic window. See Help->Mouse Stroke Tutor for details. The software filters the design and displays the selected objects in a filtered view. The title bar indicates that it is a filtered view. Hidden instances have an H in the lower left. The view displays other hierarchical instances as hollow boxes with nested internal logic (transparent instances). For descriptions of filtered views and transparent instances, see Filtered and Unfiltered Schematic Views, on page 6-2 and Transparent and Opaque Display of Hierarchical Instances, on page 6-7 in the Reference Manual. If the transparent instance does not display internal logic, use one of the alternatives described in Viewing Design Hierarchy and Context, on page 4-56, step 4.
Filtered view
3. If the filtered view does not display the pin names of technology primitives and transparent instances that you want to see, do the following:
Select Options->HDL Analyst Options->Text and enable Show Pin Name. To temporarily display a pin name, move the cursor over the pin. The
name is displayed as long as the cursor remains over the pin. Alternatively, select a pin. The software displays the pin name until
4-61
you make another selection. Either of these options can be applied to individual pins. Use them to view just the pin names you need and keep design clutter to a minimum.
To see all the hierarchical pins, select the instance, right-click, and
select Show All Hier Pins. You can now analyze the problem, and do operations like the following:
Trace paths, build up logic Filter further Find objects Flatten, or hide and flatten Crossprobe from filtered view See Expanding Pin and Net Logic, on page 4-62 and Expanding and Viewing Connections, on page 4-66 Select objects and filter again See Finding Objects, on page 4-37 See Flattening Schematic Hierarchy, on page 4-67. You can hide transparent or opaque instances. See Crossprobing from the RTL/Technology View, on page 4-49
4. To return to the previous schematic view, click the Back icon. If you flattened the hierarchy, right-click and select Unflatten Schematic to return to the top-level unflattened view. For additional information about filtering schematics, see Filtering Schematics, on page 4-60 and Flattening Schematic Hierarchy, on page 4-67 of the Reference Manual.
4-62
1. To expand logic from a pin hierarchically across boundaries, use the following commands. To...
See all cells connected to a pin See all cells that are connected to a pin, up to the next register See internal cells connected to a pin
The software expands the logic as specified, working on the current level and below or working up the hierarchy, crossing hierarchical boundaries as needed. Hierarchical levels are shown nested in hollow bounding boxes. The internal hierarchy of hidden instances is not displayed. For descriptions of the Expand commands, see HDL Analyst Menu, on page 3-69 of the Reference Manual. 2. To expand logic from a pin at the current level only, do the following:
Select a pin, and go to the HDL Analyst->Current Level menu or the rightclick popup menu->Current Level.
To expand at the current level and below, select the commands from
the HDL Analyst->Hierarchical menu or the right-click popup menu.
To expand at the current level only, select the commands from the
HDL Analyst->Current Level menu or the right-click popup menu->Current Level.
4-63
To...
Select the driver of a net Trace the driver, across sheets if needed Select all instances on a net
Do this...
Select a net and select Select Net Driver. The result is a filtered view with the net driver selected (Selecting the Net Driver Example, on page 4-66). Select a net and select Go to Net Driver. The software shows a view that includes the net driver. Select a net and select Select Net Instances. You see a filtered view of all instances connected to the selected net.
LO
4-64
4-65
Select two or more points. To expand the logic at the current level only, select HDL Analyst->
Current Level->Expand Paths or popup menu->Current Level Expand Paths.
To expand the logic at the current level and below, select HDL Analyst->
Hierarchical->Expand Paths or popup menu->Expand Paths.
LO
4-66
2. To view connections from all pins of a selected instance, right-click and select Isolate Paths from the popup menu. Starting Point
Filtered view Unfiltered view
The Filtered View Traces Paths (Forward and Back) From All Pins of the Selected Instance...
Traces through all sheets of the filtered view, up to the next port, register, hierarchical instance, or black box. Traces paths on the current schematic sheet only, up to the next port, register, hierarchical instance, or black box.
Unlike the Expand Paths command, the connections are based on the schematic used as the starting point; the software does not add any objects that were not in the starting schematic.
filtering, Push/Pop mode, and expanding to view logic at different levels. However, if you must flatten the design, use the following techniques., which include flattening, dissolving, and hiding instances. 1. To flatten an entire design down to logic cells, use one of the following commands:
4-68
Because the flattened view is a new view, you cannot use Back to return to the unflattened view or the views before it. Use Unflatten Schematic to return to the unflattened top-level view. 3. To selectively flatten the design by hiding instances, select hierarchical instances whose hierarchy you do not want to flatten, right-click, and select Hide Instances. Then flatten the hierarchy using one of the Flatten commands described above. Use this technique if you want to flatten most of your design. If you want to flatten only part of your design, use the approach described in the next step. When you hide instances, the software generates a new view where the hidden instances are not flattened, but marked with an H in the lower left corner. The rest of the design is flattened. If unhidden hierarchical instances are not flattened by this procedure, use the Flattened View or Flattened to Gates View commands described in step 1 instead of the Flatten
4-69
Current Schematic command described in step 2, which only flattens transparent instances in filtered views. You can select the hidden instances, right-click, and select Unhide Instances to make their hierarchy accessible again. To return to the unflattened top-level view, right-click in the schematic and select Unflatten Schematic. 4. To selectively flatten some hierarchical instances in your design by dissolving them, do the following:
If you want to flatten more than one level, select Options->HDL Analyst
Options and change the value of Dissolve Levels. If you want to flatten just one level, leave the default setting.
internal logic, use one of the alternatives described in step 4 of Viewing Design Hierarchy and Context, on page 4-56. Use the Back button to return to the undissolved view.
Unfiltered
New, flattened view with the dissolved instances flattened in place (no nesting) to Boolean logic, and the hierarchy of the rest of the design unchanged. Select Unflatten Schematic to return to the top-level unflattened view. You cannot use the Back button to return to previous views because this is a new view.
LO
4-70
Dissolved logic for prgmcntr, shown nested when you start from a filtered view.
Dissolved logic for prgmcntr, shown flattened in context when you start from an unfiltered view.
Use this technique if you only want to flatten part of your design while retaining the hierarchical context. If you want to flatten most of the design, use the technique described in the previous step. Instead of dissolving instances, you can use a combination of the filtering commands and Push/Pop mode.
4-71
Temporarily divide your design into smaller working files. Before you do
any analysis, hide the instances you do not need. Save the design. The .srs and .srm files generated are smaller because the software does not save the hidden hierarchy. Close any open HDL Analyst windows to free all memory from the large design. In the Implementation Results view, double-click one of the smaller files to open the RTL or Technology schematic. Analyze the design using the smaller, working schematics.
Filter your design instead of flattening it. If you must flatten your design,
hide the instances whose hierarchy you do not need before flattening, or use the Dissolve Instances command. See Flattening Schematic Hierarchy, on page 4-67 for details. For more information on the Expand Paths and Isolate Paths commands, see RTL View and Technology View Popup Menu Commands, on page 3-129 of the Reference Manual.
LO
4-72
Analyzing Timing
Analyzing Timing
You can use the Timing Analyst and HDL Analyst functionality to analyze timing. This section describes the following:
Analyzing Clock Trees in the RTL View, next Viewing Critical Paths, on page 4-74 Analyzing Paths with the Timing Analyst, on page 4-76 Analyzing Paths with the Synplify Premier Timing Analyst, on page 4-79 Handling Negative Slack, on page 4-81
Synplify Premier users can also use island timing reports for analysis, as described in The Island Timing Report, on page 4-83.
4-73
Analyzing Timing
Select HDL Analyst->Set Slack Margin. To view only instances with the worst-case slack time, enter a zero. To set a slack margin range, type a value for the slack margin, and
click OK. The software gets a range by subtracting this number from the slack time, and the Technology view displays instances within this range. For example, if your slack time is -10 ns, and you set a slack margin of 4 ns, the command displays all instances with slack times between -6 ns and -10 ns. If your slack margin is 6 ns, you see all instances with slack times between -4 ns and -10 ns. 2. Display the critical path using one of the following methods. The Technology view displays a hierarchical view that highlights the instances and nets in the most critical path of your design.
Analyzing Timing
3. Use the timing numbers displayed above each instance to analyze the path. If no numbers are displayed, enable HDL Analyst->Show Timing Information. Interpret the numbers as follows:
Delay For combinational logic, it is the cumulative delay to the output of the instance, including the net delay of the output. For flip-flops, it is the portion of the path delay attributed to the flip-flop. The delay can be associated with either the input path or output path, whichever is worse, because the flip-flop is the end of one path and the start of another. Slack time Slack of the worst path that goes through the instance. A negative value indicates that timing has not been met.
8.8, 1.2 4. View instances in the critical path that have less than the worst-case slack time. For additional information on handling slack times, see Handling Negative Slack, on page 4-81. If necessary change the slack margin and regenerate the critical path. 5. Crossprobe and check the RTL view and source code. Analyze the code and the schematic to determine how to address the problem. You can add more constraints or make code changes.
4-75
Analyzing Timing
6. Click the Back icon to return to the previous view. If you flattened your design during analysis, select Unflatten Schematic to return to the top-level design. There is no need to regenerate the critical path, unless you flattened your design during analysis or changed the slack margin. When you flatten your design, the view is regenerated so the history commands do not apply and you must click the Critical Path icon again to see the critical path view. 7. Rerun synthesis, and check your results. If you have fixed the path, the window displays the next most critical path when you click the icon. Repeat this procedure and fix the design for the remaining critical paths. When you are within 5-10 percent of your desired results, place and route your design to see if you meet your goal. If so, you are done. If your vendor provides timing-driven place and route, you might improve your results further by adding timing constraints to place and route.
Analyzing Timing
this window, see Timing Analyst Command, on page 3-80 in the Reference Manual. 4. Select the objects and move them into the start and end point boxes using the appropriate arrows.
Use arrows to move objects and specify start and end points
5. Click Generate. The software generates and opens a timing report and a timing view schematic. The timing report (.ta file in the Implementation Results view) contains from-to information for just the path you specified, and is different from the timing report for the entire design that is in the log file. The timing view schematic (_ta.srm) is a filtered Technology view that shows the path between the start and end points You cannot generate a critical path or use the Timing Analyst from this view. If you close the report and schematic windows, reopen them by selecting the .ta (timing report) and name_ta.srm (Timing view) files from the Implementation Results view. 6. View the results. The following figure shows a timing view for a path; the file excerpt that follows shows associated details from the timing report.
4-77
Analyzing Timing
7. Use the HDL analyst commands described in Analyzing With the HDL Analyst Tool, on page 4-56 to analyze the path. LO
4-78
Analyzing Timing
Without a design plan With a deisgn plan With a design plan and fully placed regions enabled
Applicable timing information is used for each type of implementation. For some implementations, exact placement and net delay information is included in the calculations resulting in more accurate timing reports.
4-79
Analyzing Timing
You can specify any of the following: From points, To points, or From and To points.
5. Click Generate. The software generates and opens a timing report and a Timing view schematic. The timing report (.ta file) contains from-to information for just the path you specified, and is different from the timing report for the entire design that is in the log file. The timing view is a filtered Technology view that shows the path between the start and end LO points. By default, the software filters Sequential Instances, Input Ports, and Output Ports. You can also enter a limit for the number of paths to display.
4-80 Fpga User Guide, December 2005
Analyzing Timing
6. View the results. By default, the software opens the .ta timing report file and the Timing view for the path. If you close these windows, reopen them by selecting the .ta (timing report) and .srm (Timing view) files from the Implementation Results view. See Timing Report, on page 7-71 in the Reference Manual. 7. Use the HDL analyst commands to analyze the path.
Select/Deselect Checkbox
4-81
Analyzing Timing
For a hierarchical critical path, either click the Critical Path icon, select
HDL Analyst->Show Critical Path, or select HDL Analyst->Technology-> Hierarchical Critical Path.
Check the end points of the path. The start point can be a primary
input or a flip-flop. The end point can be a primary output or a flipflop.
LO
4-82
Generating the Island Timing Report, on page 4-83 Automatic Island Timing Report, on page 4-84 Defining the Group Range and Global Range, on page 4-85 Interactive Island Timing Analyst, on page 4-86 Viewing the Island Timing Report, on page 4-87
Automatic Island Timing Report, on page 4-84 Defining the Group Range and Global Range, on page 4-85 Interactive Island Timing Analyst, on page 4-86 Viewing the Island Timing Report, on page 4-87
4-83
Paths per Island specify the number of paths to report for each
island.
Group Range (ns) specify a group range in nano seconds from the
worst case slack of the island to determine the critical paths for each island.
Global Range (ns) specify a global range in nano seconds from the
worst case slack of the design to determine the number of islands displayed in the timing report.
3. After you have set all the implementation option settings, click OK and LO close the dialog box.
4-84
4. When you are ready to synthesize your design, select Run->Synthesize in the Project view or simply click on the Run button. After synthesis completes, the log file (.srr) displays the following message: @N|Hierarchical island-based critical path report is located in C:\path_directory\design_name.tah The timing report file (.tah) is listed in the Implementation Results view of your project. See Viewing the Island Timing Report, on page 4-87 for further information.
Example
The following table shows how different settings affect what is reported: Worst Case Slack Global Range
-3 ns 2 ns As the worst case slack is -3 ns, setting the global range to 2 causes the water level to be -1 ns (-3 + 2). The island report will not contain instances with a slack that exceeds (is more positive) than -1. This specifies a range from the worst case slack for an island; the software reports all island instances that fall within this range. If the worst-case slack for an island is -3 ns, the report for that island will contain instances with slack in the range of -3ns to -2 ns (-3 +1).
Group Range
1 ns
The following graphically shows how the island report lists all islands in the design that fall within the range from -3 to -1 (global range). For each island, it reports instances whose slack is within 1 ns of the worst-case slack for that island (group range).
Fpga User Guide, December 2005 4-85
-3 Slack (ns) -2
Island 1
Island 3 Island 2
-1
Other path
Water Level
4-86
See Viewing the Island Timing Report, on page 4-87 for more detailed information.
Double-click the .tah file. Select the .tah file, right-click and select Open as Text from the popup
menu.
4-87
3. To find information in the timing file, select Edit -> Find or press Ctrl-f. Fill out the criteria in the form and click OK. To view the island timing report interactively from the Island Timing Analyst tool, see Islands/Paths Summary View, on page 4-92 and Islands/Paths Details View, on page 4-95. See Island Timing Report Critical Paths, on page 4-98 for details about how to use the critical path timing information in this file or the tool for QoR improvements with physical synthesis.
Islands/Paths Control Panel, on page 4-89 Islands/Paths Summary View, on page 4-92 Islands/Paths Summary Management, on page 4-93 Islands/Paths Details View, on page 4-95
Use the Island Timing Analyst to generate and display the Islands/Paths Summary and Details reports. You can also cross probe these critical paths to the HDL Analyst view. The Island Timing Analyst contains the following:
Islands/Paths Control Panel use to set values for Global Range, Group
Range, and Max Paths/Island and generate the island timing report.
Islands/Paths Control Panel, on page 4-89 Islands/Paths Summary View, on page 4-92 Islands/Paths Summary Management, on page 4-93
LO
4-88
).
Using the keyboard shortcut key Ctrl-p. Right-click and select Controls from the popup menu.
4-89
Note that the Line Up command is currently not applicable in the Island Timing Analyst. Use the Islands/Paths control panel to generate an island timing report. To do this: 1. You must specify the following parameters either manually in their appropriate parameter fields, or else using the slider controls on the control panel.
Global Range (ns) specify a global range in nano seconds from the
worst case slack of the design to determine the number of islands displayed in the timing report. Type the range value in the parameter field or use the slider control. Only the islands above this global slack range (water level) are displayed in the island report.
Group Range (ns) specify a group range in nano seconds from the
worst case slack of the island to determine the critical paths for each island. Type the range value in the parameter field or use the slider control. Only the paths within this group slack range for an island are displayed in the island report.
4-90
The following figure shows the UI for the Islands/Paths control panel.
Group Range Slider and Tooltip Global Range Slider and Tooltip
Global Range Field Group Range Field Max Paths/Island Generate Report Button
To dock the control panel in the Island Timing Analyst to another location in the view, double-click on the top edge of the control panel where the pointer ( ) appears. To reposition, double-click on the header in the control panel. You can also move and then resize this window by selecting and dragging its edges.
4-91
The figure below shows the Islands/Paths control panel floating in the view.
End domain Total path delay Path required time Logic delay Max time allowed for route delay Route delay
The following figure show the UI for the Islands/Paths Summary. You must scroll to see all the column information for the critical paths.
You can choose to group by islands or display all the paths at a flat level. To toggle between these two display modes:
).
Select Islands or Critical Paths Crossprobe to the HDL Analyst Sort Columns
You can sort columns in ascending and descending order. To do this, click on the column header. When sorting several columns, the most recent column clicked will be the most significant column and the first column clicked becomes the least significant column in the summary display. Islands are sorted separately, unless you choose to display all paths at a flat level.
Make sure to open the HDL Analyst flattened Technology view first. If
you are going use the RTL view, make sure open the Technology view also.
Click on the Cross Probe button. You can then filter critical paths in the HDL Analyst view. Use crossprobing from the HDL Analyst view, to see timing data in the
Technology view. LO Note that when you choose to group by islands, simply select the island to crossprobe the entire island which includes all its paths in the HDL Analyst view.
4-94
Path properties display information, such as, worst case slack, number
of logic levels, start points, and end points. At the end of the timing report for each path, the total path delay (propagation time + setup time) is computed as a ratio of the logic and the routing.
Logic elements and nets include the following: cell logic element or net,
pin name, pin direction, delay, arrival time, and number of fanouts, if applicable. For more information about the contents of the Island Timing Report, see Synplify Premier Island Timing Report, on page 7-76 in the Reference Manual. To dock the Islands/Paths Details view in the Island Timing Analyst to another location in the view, double-click on the left edge of the window where the pointer ( ) appears. To reposition, double-click on the header in the Islands/Paths Details view. You can also move and then resize this window by selecting and dragging its edges. See the following figures:
4-95
LO
4-96
Use the Details button to hide or show the Islands/Paths Details report. When multiple islands or paths are selected from the Islands/Paths Summary report, you can:
Use the arrow keys to scroll to the desired island or critical path in the
timing report.
Select and copy island and critical path information from this window to
a log file. To do this, click on the save icon ( ) and then add this log file to your project. You can also right-click and select Select All (Ctrl-a), then Copy (Ctrl-c) from the popup menu to a log file.
Crossprobe to the HDL Analyst view. To do this, click on the Cross Probe
button.
Scroll Buttons
Save Icon
4-97
When all the start and end points are selected, right-click and press
Filter Analyst from the popup menu in the .tah file.
Click on the Cross Probe button in the Island Timing Analyst and filter
these selected gates in the flattened RTL view. Currently, for crossprobing to work properly in the Island Timing Analyst, open the flattened Technology view also. 7. Right-click and select Expand Paths from the popup menu in the flattened RTL view. LO 8. Either right-click and select Assign to->region_name or drag-and-drop the selected expanded paths to the region in the Design Plan Editor of the Design Planner view.
4-98
9. Run estimation for any design plans created. 10. Save these assignments to the Synplify Premier design plan file (.sfp). Run synthesis for this implementation with a design plan.
4-99
LO
4-100
CHAPTER 5
Physical Analyst
This document describes typical analysis tasks using graphical analysis with the Physical Analyst tool. It covers the following:
Synplify Premier Physical Analyst Tool, on page 5-2 Opening the Physical Analyst View, on page 5-4 Using the Physical Analyst Control Panel, on page 5-5 Using the Physical Analyst Device View, on page 5-8 Setting Object Display Options, on page 5-10 Selecting Objects, on page 5-14 Viewing Object Information, on page 5-17 Finding Objects, on page 5-23 Crossprobing in Physical Analyst, on page 5-34 Analyzing Timing with the Physical Analyst, on page 5-51
5-1
Display placement information such as cell locations and signal pins. Analyze netlists using various commands, such as filter, show critical
path, or route all nets.
Query object and properties of instances and nets. Cross probe between the Synplify Premier Physical Analyst and either
the HDL Analyst or the source code text file. This section describes basic procedures you use in the Physical Analyst view. The information is organized into these topics:
5-2
All appropriate .lef files providing physical cell library information for
the various devices
All appropriate .def files defined for the device floorplan .srm file for the netlist and instance placement
5-3
Select HDL Analyst->Physical Analyst in the Project view. Select the .srm file, then right-click and select Open Using Physical Analyst
from the popup menu. The Physical Analyst view is capable of showing instances and nets. The objects displayed are controlled by the Objects pane of the control panel (see Using the Physical Analyst Control Panel on page 5-5). The following figure shows the initial Physical Analyst default view for a Xilinx Virtex2p device.
LO
5-4
) in the Physical
Select Options->Physical Analyst Control Panel from the menu in this view. Use the keyboard shortcut key Ctrl-k.
Control Panel
Device
5-5
The control panel includes the Objects tab along the bottom of the pane that contains controls for displaying or hiding objects in the view. You can change the width of the panel by selecting the right side of the pane and dragging it to the desired size. To close the Physical Analyst control panel:
Select Options->Physical Analyst Control Panel from the menu in this view. Toggle off the display using the keyboard shortcut key Ctrl-k. Right-click in the control panel pane and select Hide from the popup
menu.
Object visibility for instances, nets, and sites Object selectability for instances, nets, and sites Controls for net pruning, signal flow display, and for the display of
instance signal pins in the view
5-6
configuration is useful when you are analyzing the critical path. You might want to view all nets and instances along the critical path, and have the nets only visible but not selectable.
Instances visible and selectable Make instance internals visible Dont show internal signal pins Nets visible and selectable Signal nets visible but not selectable Dont show signal flow Show pruned signals Sites visible
Instance Display signal pins for core instances can be shown or not
shown.
Nets nets are routed on demand using the command View->Route All
Nets. Nets are routed on one metal layer displaying their point-to-point connections from output pins to input pins. Once nets are routed, you can make the nets visible or visible and selectable. Signal Flow adds directional arrows to nets, and Pruned Signals disables the display of signals that are unconnected.
Sites as defined in the vendor-specific cell library files. Sites can only
be visible or hidden. Use tool tips to display the site row number and its boundaries (Instances must not be selectable).
5-7
LO
5-8
The Physical Analyst view is used to graphically analyze your design. To help you do this, use the information organized into the following topics:
Setting Object Display Options, on page 5-10 Selecting Objects, on page 5-14 Viewing Object Information, on page 5-17 Finding Objects, on page 5-23 Crossprobing in Physical Analyst, on page 5-34 Analyzing Timing with the Physical Analyst, on page 5-51
5-9
Displaying Instances, on page 5-10 Displaying Signal Pins, on page 5-10 Displaying Signal Flow for Selected Nets, on page 5-11 Routing Nets to Display, on page 5-12
Displaying Instances
To display instances in the Physical Analyst view, first make instances visible by setting the Vis option for objects from the Objects pane of the control panel. Instances that have physical placement information are shown. Instance features include:
LO
5-10
5-11
Net ALUA[1] Fanout=13 Connects to SIGNAL PIN I1 (input) (INST UC_ALU_LONGQ_2) Signal flows right
By selecting View->Route All Nets from the menu option. After the nets are
routed, this command is grayed out on the menu. When nets are routed, they are connected to their selective instances. Because of the long load time and the limited visibility when nets are superimposed on the view, net routes are not displayed by default. To enable the LO display of nets, you must explicitly unfilter (show) the nets or use the find command as an example.
5-12
Nets also have a Pruning option. When enabled, a net segment with an end connecting only to an invisible instance (for example because of filtering) is drawn in a diminished color. To reset the original view to hide all nets in the display, select Unfilter->Show All Instances, Hide All Nets from the popup menu or click the Reset filter icon ( ) on the Physical Analyst toolbar.
5-13
Selecting Objects
Selecting Objects
This section describes how to select objects, as well as implement the following:
Selecting Multiple Nets, on page 5-15 Transcribing Object Selections, on page 5-16
To select an object you must first enable the object to be selectable, and then you can click on the object. To select multiple objects, use one of these methods.
Draw a rectangle around the objects. Select an object, press Ctrl, and click other objects you want to select.
You can also deselect from the list of currently selected objects while holding the Ctrl key.
Position the cursor over an object and click the right mouse button; the
object is automatically selected in the view. To preserve a prior selection, hold the Ctrl key and press the right mouse button.
Right-click and choose one of the following from the popup menu: Select->All Instances and Nets Select->All Instances Select->All Nets Select->Deselect All Use Find to select the objects you want. You can also use the Find
command to select a subset of objects of a particular type (instances, symbols, nets, or ports). See Finding Objects with the Find Command on page 5-23.
5-14
Selecting Objects
You can enable or disable a class of objects to be selected. For example, you may wish to display nets but not have them selectable. You can only display site rows; they are not selectable.
Display selected net or cell instance Select all nets or cell instances in question Clear selection of all nets or cell instances
5-15
Selecting Objects
TCL Window
You can also use the information from the TCL window display to copy and LO paste into other windows or files such as SCOPE, the Find Object dialog box, or a text file.
5-16
Viewing Properties, on page 5-17 Using Tool Tips, on page 5-20 Using Mouse Strokes, on page 5-20 Using Keyboard Shortcuts, on page 5-21 Zooming in the Physical Analyst, on page 5-22
Viewing Properties
You can view properties for the device design and for selected objects displayed in the view. See:
Viewing Physical Analyst Properties, on page 5-18 Viewing Object Properties, on page 5-19
5-17
LO
5-18
Net Properties for information about nets including net name, logical nets,
pin count, fanout, if the net is globally routed, and if the net is a clock. The following example shows the properties for a core cell that is selected in the Physical Analyst view.
5-19
Floorplan site column Site row 21 bounds=(1260.00,72.00)~(176.00,3384.00) orien=N(0) site CLB (Core)
Core Cell UC_ALU.LONGQ[5] Type=LUT4_E2AA Inputs=4 Outputs=1 Location=(1656.00,1503.00) Device Location=SLICE_X47Y66 Delay=1.9900 Slack=0.5806
5-20
1. To view the current list of mouse stroke operations, select Help->Mouse Stroke Tutor. Select the operation from the list on the left and the corresponding mouse stroke is drawn on the right. 2. In a Physical Analyst window, hold down the right mouse button and draw the mouse stroke. Some mouse strokes only apply to HDL Analyst commands such as push and pop hierarchy. These mouse strokes are ignored while using the Physical Analyst viewer.
2. To move forward again, click the Forward icon or draw the appropriate mouse stroke. The software displays the next view in the display history.
5-21
can press and hold the Ctrl key and the letter K, instead of using the menu command Options->Physical Analyst Control Panel as shown in the following example.
Clicking the Zoom Selected ( ) icon. Right-click and selecting Zoom Selected from the popup menu. Using the following mouse stroke. See Using Mouse Strokes on
page 5-20.
The object or objects selected are centered in the view. When objects are not selected, the Zoom Selected command is disabled; you can use any of the following global zoom commands to change the display:
View->Zoom In from the menu or the Zoom In ( )icon. LO View->Zoom Out from the menu or the Zoom Out ( )icon. View->Full View from the menu or the Full View ( ) icon.
5-22 Fpga User Guide, December 2005
Finding Objects
View->Normal View from the menu or the Normal View ( Appropriate mouse strokes.
) icon.
For a description of the zoom options, see View Menu on page 3-22 in the Reference Manual. For a description of the mouse strokes, see Help->Mouse Stroke Tutor.
Finding Objects
To find and display objects in the Physical Analyst view, use the following options:
Finding Objects with the Find Command, on page 5-23 Finding Object Locations, on page 5-27 Using Markers, on page 5-29 Changing Color Schemes, on page 5-31 Configuring Enhanced Instance Display, on page 5-31
5-23
Finding Objects
Note: You can also bring up the Find Object dialog box by selecting Edit->Find from the menu or by clicking the Find (binoculars) icon in the tool bar 2. Select the tab (at the top of the dialog box) for the type of object. The Unhighlighted box on the left will list objects of the selected type (instances, symbols, nets, or ports). Note: The Find command does not include physical instances in its search. 3. You can choose to restrict your search for the design in the following ways: LO search for objects that you select from the list, go to step 4.
5-24
Finding Objects
use Search by Name, which filters the design depending on the name
you specify in this field, go to step 5.
use Filter Search, which filters the design depending on the type of filter
you choose from the pull-down list, go to step 6. The Unhighlighted box shows available objects within the scope you set when you click Find 200 or Find All. Objects are listed in alphabetical order. 4. Do the following to select objects from the list. To use wildcards in your selection, see the next step.
Click First 200 or Find All. The former finds the first 200 matches, and
then you can click the button again to find the next 200.
Click on the objects you want from the list. If the object name exceeds
the width of the Unhighlighted box, click the entry in the list to display the entire name in the field below the Unhighlighted box.
Click the right arrow to move the objects into the Highlighted box on the
right, or double-click individual names. Objects transferred to the Highlighted box are automatically highlighted in the view. 5. Do the following to select objects using patterns or wildcards.
Type a pattern in the Search By Name field. When you use wildcards
between hierarchies, all pattern matching is displayed from the top level to the lowest level hierarchy, inclusively. See Using Wildcards with the Find Command on page 5-26 for a detailed discussion of wildcards.
Click First 200 or Find All. The former finds the first 200 matches, and
then you can click the button again to find the next 200. The Unhighlighted list shows the objects that match the wildcard criteria. If the object name exceeds the width of the Unhighlighted box, click the entry in the list to display the entire name in the field below the Unhighlighted box.
Click the right arrow to transfer the selections to the Highlighted box on
the right, or double-click individual names. The objects are automatically highlighted in the view. You can use wildcards to avoid typing long path names. Start with a general pattern, and then make it more specific.
5-25
Finding Objects
Select the type of filter search you want to perform from the pulldown list. See Using Filter Search With the Find Command on page 5-26 for a complete list of selection options.
Click First 200 or Find All. The former finds the first 200 matches, and
then you can click the button again to find the next 200.
Click the right arrow to move the selected objects into the Highlighted
box on the right, or double-click individual names. For large designs, reduce the scope of the search using this technique. You can leave the dialog box open to do successive Find operations. Close the dialog box when you are done.
Unfiltering Nets
To enable the display of nets, you must explicitly unfilter (show) the nets that you want to display using the find command. To filter all nets: LO 1. Open the Find Object dialog box. 2. Select the Nets tab at the top of the dialog box.
5-26
Finding Objects
Right-click and select Go to Location from the popup menu Ctrl-g shortcut key Select View->Go to Location from the menu bar
The command displays the Goto Location dialog box.
5-27
Finding Objects
You can also copy and paste a coordinate pair location from a log file
(.srr) to the Go to Location dialog box. You must first copy (Edit->Copy or Ctrl-c) a coordinate pair location from the log file, then open the Go to Location dialog box in the Physical Analyst view and paste (Edit->Paste or Ctrl-v) this coordinate pair in to the field. Note that the unit of measurement used in the .def file is database units. If a history of location pairs exist, you can highlight a selection to reuse these values. Selecting a coordinate pair automatically updates the X and Y coordinate fields. LO 3. You can create a marker at the coordinate pair location. To do this:
Finding Objects
Scroll centers the specified location without zooming Zoom to Object similar to selecting an object and using Zoom Selected Zoom Normal similar to using the Zoom 100% ( ) icon
Using Markers
Markers are bookmarks for physical coordinates in the Physical Analyst view. Markers can be:
Adding Markers
To create a marker, right-click and select Markers->Add marker from the popup menu or use the Ctrl-m shortcut key. When a marker is created at an instance or net location, the marker takes on the objects name. Otherwise, markers are identified as Marker1, Marker2, and so on. A tool tip can be displayed over a marker to show its name and X and Y coordinates.
5-29
Finding Objects
Markers can also be added using the Go to Location command. See Finding Objects with the Find Command on page 5-23.
Moving Markers
When you select a marker symbol ( ), its dotted drag outline appears. To move a marker, press and hold the left-mouse button while dragging the marker to its new location and then release the mouse button.
Deleting Markers
To delete a marker, highlight the marker then right-click and select Markers->Remove Selected from the popup menu or use the Del key. To delete all markers, right-click and select Markers->Remove All from the popup menu.
Measuring Distances
You can measure the distance from a selected marker to a cursor location. The manhattan (X+Y) distance, calculated in microns, from the marker to the cursor and the X and Y coordinates of the cursor are displayed in the status LO bar at the bottom of the Physical Analyst view. If you select two markers, the
5-30
Finding Objects
distance between the two markers is calculated and displayed in the status bar. If you select more than two markers, the distance measurement is ignored. To advance to a next or previous marker, right-click and select either Markers->Go to Next or Markers->Go to Previous from the popup menu or use the F2 and Shift+F2 keys, respectively. Markers are selected in the order they were created, either forward or reverse. If the view is zoomed, the selected marker is centered in the view.
5-31
Finding Objects
Option Enhance Instance Shape for Better Visibility Visible Instance Limit for Enhancement Enhancement Size (pixels) Minimum Size for Normal Draw (pixels)
Description
Enables enhanced instance display when checked (same as selecting Enhance in the Inst. Display section of the Objects pane). Sets the maximum number of visible core cells that can be displayed in enhanced instance display mode. Sets the size (in pixels) of the instance; instances are drawn as diamonds to differentiate them from normal cell shapes. Sets the minimum size of an average core cell when the cell is drawn in normal mode and not enhanced
The following figure shows how enhanced instances are displayed in the Physical Analyst view.
LO
5-32
Finding Objects
5-33
Send Crossprobes when selecting Cross Probing from RTL Analyst Cross Probing from Tech Analyst Cross Probing to HDL Source Auto route cross probe insts
The Physical Analyst responds to incoming cross probes as well as sending out cross probes in response to selections. For efficiency reasons, you may want to send cross probes from the Physical Analyst only on demand by disabling the Send Crossprobes when selecting option. To automatically send cross probes from the Physical Analyst tool, the Send Crossprobes when selecting option must be enabled. To automatically route cross-probed instances, enable the Auto route cross probe insts option. Crossprobing works in conjunction with filtering. If an object is filtered (hidden) and a cross probe message is received, the object is unfiltered (in a new filter state). For example, you can filter all objects, then select objects in the HDL Analyst view. As objects are selected, they become visible and highlighted in the Physical Analyst view. You can select objects in an HDL Analyst view using the graphic view, hierarchy browser, or the Object Query dialog box.
LO
5-34
The following table summarizes the cross probing capabilities to and from the Physical Analyst view. From
Physical Analyst
To
Source code
Procedure
Double-click an instance. If the source code file is not open, a Text Editor window is opened to the appropriate section of code (for example, modules or instances). If the source file is already open, the software scrolls to the correct section of the code and highlights it. The Physical Analyst view must be open. Highlight the appropriate portion of text (for example, hierarchical instance name or instance name) in the text editor. In some cases, you may have to select the entire block of text to cross probe. From the log file, right click and select Select in Analyst or, to show only the object selected, click the Filter on Selected Gates icon in the menu bar after highlighting the text (use the Reset filter icon to redisplay the unfiltered objects). The Physical Analyst view must be open. Click the object (instance or macro) to highlight and crossprobe. Usage Note: To cross probe from the RTL Analyst view to the Physical Analyst view, you must enable the Cross Probing from RTL Analyst option. You can cross probe hierarchical objects in the RTL view to the set of objects for which the hierarchy is synthesized in the Physical Analyst view. You cannot cross probe primitives in the RTL view which do not have a counterpart in the mapped netlist.
Text File
Physical Analyst
RTL Analyst
Physical Analyst
5-35
From
Physical Analyst
To
RTL Analyst
Procedure
The RTL Analyst view must be open. Click the object to highlight and cross probe. Usage Note: To automatically cross probe from the Physical Analyst view to the RTL Analyst view, you must enable the Send crossprobes when selecting option. To cross probe only on demand, you must disable the Send cross probes when selecting option. Click the object to highlight, then rightclick and select Crossprobe Selected from the popup menu. The Physical Analyst view must be open. Click the object to highlight and cross probe. Usage Note: To cross probe from the Technology Analyst view to the Physical Analyst view, you must enable the Cross Probing from Tech Analyst option. The Technology Analyst view must be open. Click the object to highlight and cross probe. Usage Note: To automatically cross probe from the Physical Analyst view to the Technology Analyst view, you must enable the Send crossprobes when selecting option. To cross probe only on demand, you must disable the Send cross probes when selecting option. Click the object to highlight, then rightclick and select Crossprobe Selected from the popup menu.
Technology Analyst
Physical Analyst
Physical Analyst
Technology Analyst
3. Check the Physical Analyst view. Selected instances are highlighted in this view.
Log File
5-37
5-39
LO
5-40
Technology View
5-41
).
Press Alt and draw a narrow V-shaped mouse stroke in the schematic
window. See Help->Mouse Stroke Tutor for details. The software filters the design and displays the selected objects in a filtered view. You can now analyze the objects and perform operations such as:
Trace paths, build up logic Filter further Find objects Hide objects LO
) icon.
see all cells that are connected to a pin, up to the next register/port
5-43
LO
5-44
5-45
2. To expand logic from a net, use the commands shown in the following table. To...
select all instances on a net
Do this...
Select a net and select Select Net Instances->All Pins. The software shows an unfiltered view that includes all the instances connected to the net along the signal path. Usage Note: You can also select to show output pins or input pins. Select a net and select Highlight Visible Net Instances>All Pins. You see a filtered view of all instances connected to the selected net along the signal path. Usage Note: You can also select to show output pins or input pins. Select a net and select Select Net Driver. Shows an unfiltered view that includes the driver of the net. Select a net and select Go to Net Driver. Shows and scrolls to the driver of the net.
LO
5-46
5-47
LO
5-48
5-49
LO
5-50
Viewing Critical Paths, on page 5-51 Tracing Critical Paths Forward and Backwards, on page 5-54
5-51
2. Check the Technology view. Click the Filter on Selected Gates icon ( display the critical path.
) to
3. You can also cross probe the critical path from the flattened Technology view to the Physical Analyst view by clicking on the Show Critical Path icon ( ). Then, right-click and select Select All Schematic->Instances. Make sure the Physical Analyst view is open. LO 4. Check the Physical Analyst view. Critical path instances and nets should be highlighted in this view. See the figure in step 1.
5-52
5. In the HDL Analyst view that is already open, click on the Filter on Selected Gates icon ( ). Only the instances and nets belonging to the critical timing path are displayed, as shown below.
6. In the HDL Analyst view, right-click and select Expand Paths from the popup menu. Then, you can drag-and-drop this logic into a region on the device design plan (.sfp) file for further physical synthesis.
5-53
Right-click and select Critical Path->Expand Path Forward from the popup
menu
LO
5-54
Note: You can also use the Filter Search option of the Find command to locate the Critical path start point. The cell location of the critical path start point is displayed with the color green in the Physical Analyst view. 2. Use one of the critical path forward commands described in step 1 to continue to trace the net to the next instance in its path. The next instance containing the critical path and input ports that feed into the path are displayed and highlighted and shown connected to the critical path start point.
5-55
(Critical End)
(Critical Start)
3. Continue using the critical path forward command until you reach the end point. The following figure shows you how the critical path is finally displayed.
LO
5-56
Right-click and select Critical Path->Expand Path Backward from the popup
menu
5-57
Note: You can also use the Filter Search option of the Find command to locate the Critical path end point. The cell location of the critical path end point is displayed with the color red in the Physical Analyst view. 2. Use one of the critical path backward commands described in step 1 to continue to trace the net to the next instance in its path. The next instance containing the critical path and output ports that feed into the path are displayed and highlighted and shown connected to the critical path end point. 3. Continue using the Critical Path->Expand Path Backward command until you reach the start point. See the figure in step 3 of Trace Critical Paths Forward on page 5-54 to show you how the critical path is finally displayed.
LO
5-58
CHAPTER 6
Design Optimization
This chapter covers techniques for optimizing your design using built-in tools or attributes. For vendor-specific optimizations, see Chapter 8, VendorSpecific Optimizations. It describes the following:
Design Guidelines, on page 6-2 Optimizing Results, on page 6-5 Defining State Machines for Synthesis, on page 6-13 Using the Symbolic FSM Compiler, on page 6-17 Using FSM Explorer, on page 6-22 Using the FSM Viewer, on page 6-25 Defining Black Boxes for Synthesis, on page 6-30 Pipelining, on page 6-40 Retiming, on page 6-44 Inserting Probes, on page 6-50 Inferring RAMs, on page 6-54 Inferring Shift Registers, on page 6-80 Forward Annotation of Initial Values Working with LPMs, on page 6-87 Working with Gated Clocks, on page 6-99
6-1
Design Guidelines
Design Guidelines
The software automatically makes efficient tradeoffs to achieve the best results. However, you can optimize your results by using the appropriate control parameters. This section describes general design guidelines for optimization. The topics have been categorized as follows:
General Optimization Tips, next Area Optimization Tips, on page 6-3 Timing Optimization Settings, on page 6-4
For FSMs coded in VHDL using enumerated types, use the same
encoding style (syn_enum_encoding attribute value) on both the state machine enumerated type and the state signal. This ensures that there are no discrepancies in the type of encoding to negatively affect the final circuit.
6-2
Design Guidelines
Increase the fanout limit when you set the implementation options. A
higher limit means less replicated logic and fewer buffers inserted during synthesis, and a consequently smaller area. In addition, as P&R tools typically buffer high fanout nets, there is no need for excessive buffering during synthesis. See Setting Fanout Limits, on page 6-7 for more information.
Check the Resource Sharing option when you set implementation options.
With this option checked, the software shares hardware resources like adders, multipliers, and counters wherever possible, and minimizes area.See Sharing Resources, on page 6-5 for details.
For designs with large FSMs, use the gray or sequential encoding styles,
because they typically use the least area. For details, see Specifying FSMs with Attributes and Directives, on page 6-15.
If you are mapping into a CPLD and do not meet area requirements, set
the default encoding style for FSMs to sequential instead of onehot. For details, see Specifying FSMs with Attributes and Directives, on page 6-15.
For small CPLD designs (less than 20K gates), you might improve area
by using the syn_hier attribute with a value of flatten. When specified, the software optimizes across hierarchical boundaries and creates smaller designs.
6-3
Design Guidelines
Use realistic design constraints, about 10 - 15% of the real goal. Over
constraining your design can be counter-productive because you can get poor implementations. Use clock, false path, and multicycle path constraints to make the constraints realistic.
If the P&R and synthesis tools report different critical paths, use a
timing constraint with the -route option. With this option, the software adds route delay to its calculations when trying to meet the clock frequency goal. Use realistic values for the constraints.
For FSMs, use the onehot encoding style, because it is often the fastest
implementation. If a large output decoder follows an FSM, gray or sequential encoding could be faster.
For designs with black boxes, characterize the timing models accurately,
using the syn_tpd, syn_tco, and syn_tso directives.
If you saw warnings about feedback muxes being created for signals
when you compiled your source code, make sure to assign set/resets for the signals. This improves performance by eliminating the extra mux delay on the input of the register.
Make sure that you pass your timing constraints to the place-and-route
tools, so that they can use the constraints to optimize timing. LO
6-4
Optimizing Results
Optimizing Results
You can optimize your results with attributes and directives, some of which are specific to the technology you are using. Similarly, you can use specify objects or hierarchy that you want to preserve during synthesis. For a complete list of all the directives and attributes, see the Reference Manual. This section describes the following:
Sharing Resources, next Setting Fanout Limits, on page 6-7 Controlling Buffering and Replication, on page 6-8 Controlling Hierarchy Flattening, on page 6-10 Preserving Objects from Optimization, on page 6-10 Preserving Hierarchy, on page 6-12
Sharing Resources
One of the ways you can optimize area is to use resource sharing. With resource sharing, the software uses the same arithmetic operators for mutually exclusive statements; for example, with the branches of a case statement. Conversely, you can improve timing by disabling resource sharing, but at the expense of increased area. 1. Specify resource sharing globally for the whole design with one of the methods below. Enable the option to improve area; disable it to improve timing.
architecture rtl of top is attribute syn_sharing : string; attribute syn_sharing of rtl : architecture is off;
6-5
Optimizing Results
You cannot specify syn_sharing from the SCOPE interface, because it is a compiler directive. 2. To specify resource sharing on an individual basis, or to override the global setting, specify the syn_sharing attribute for the lower-level module/architecture, using the syntax described in the previous step.
Multiple adders with syn_sharing off.
LO
6-6
Optimizing Results
6-7
Optimizing Results
function as soft limits, and are replicated or buffered, as described in Controlling Buffering and Replication, on page 6-8. Attribute specified on... Module or view Non-primitive instance Clock nets or asynchronous control nets Effect Soft limit for the module; overrides the global setting. Soft limit; overrides global and module settings Soft limit.
4. To set a hard or absolute limit, set the syn_maxfan attribute on a port, net, register, or primitive instance. Fanouts that exceed the hard limit are buffered or replicated, as described in Controlling Buffering and Replication, on page 6-8p. 5. To preserve net drivers from being optimized, attach the syn_keep or syn_preserve attributes. For example, the software does not traverse a syn_keep buffer (inserted as a result of the attribute), and does not optimize it. However, the software can optimize implicit buffers created as a result of other operations; for example, it does not respect an implicit buffer created as a result of syn_direct_enable. 6. Check the results of buffering and replication in
The log file (click View Log). The log file reports the number of buffered
and replicated objects and the number of segments created for the net.
The HDL Analyst views. The software might not follow DRC rules
when buffering or replicating objects, or when obeying hard fanout limits.
6-8
Optimizing Results
into segments. This increases the number of register bits in the design. When replication is not possible, the software buffers the signals. Buffering is more expensive in terms of intrinsic delay and resource consumption. The following table summarizes the behavior. Replicates When... syn_maxfan is set on a register output syn_replicate is 1 Creates Buffers When...
syn_maxfan is set on input ports in Altera Apex, Actel ProASIC (500K), ProASIC PLUS (PA) and ProASIC3/3E, and QuickLogic pASIC3 designs
syn_replicate is 0. Note that the syn_replicate attribute must be used in conjunction with the syn_maxfan attribute for Actel families. The syn_replicate attribute is used only to turn off the replication.
I/O pad
The net driver has a syn_keep or syn_preserve attribute The net driver is not a primitive gate or register
You can control whether high fanout nets are buffered or replicated, using the techniques described here:
In Xilinx designs, you can handle extremely large clock fanout nets by
inserting a global buffer (BUFG) in your design. A global buffer reduces delay for a large fanout net and can free up routing resources for other signals.
6-9
Optimizing Results
The software flattens the design as directed. If there is a lower-level syn_hier attribute, it takes precedence over a higher-level one.
LO
6-10
Optimizing Results
To Preserve...
Nets
Attach... syn_keep on wire or reg (Verilog), or signal (VHDL). For Actel designs (except 500K and PA), use alspreserve as well as syn_keep. syn_probe on wire or reg (Verilog), or signal (VHDL)
Result
Keeps net for simulation, a different synthesis implementation, or for passing to the place-and-route tool.
Preserves internal net for probing. This attribute is only applicable to the Synplify Pro and Synplify Premier software. Preserves duplicate driver cells, prevents sharing Preserves logic of constant-driven registers, keeps registers for simulation, prevents sharing Prevents the output port or internal signal that holds the value of the state register from being optimized Keeps instance for analysis, preserves instances with unused outputs
syn_keep on input wire or signal of shared registers syn_preserve on reg or module (Verilog), signal or architecture (VHDL) syn_preserve on reg or module (Verilog), signal (VHDL) syn_noprune on module or component (Verilog), architecture or instance (VHDL)
Instantiated components
6-11
Optimizing Results
Preserving Hierarchy
The synthesis process includes cross-boundary optimizations that can flatten hierarchy. To override these optimizations, use the syn_hier attribute as described here. You can also use this attribute to direct the flattening process as described in Controlling Hierarchy Flattening, on page 6-10. 1. Attach the syn_hier attribute to the module or architecture you want to preserve. You can also add the attribute in SCOPE. If you use SCOPE to enter the attribute, make sure to use the v: syntax. 2. Set the attribute value: To...
Preserve the interface but allow cell packing across the boundary Preserve the interface with no exceptions (Actel, Altera, and Xilinx only) Preserve the interface and contents with no exceptions (Actel (except PA, 500K, and ProASIC3/3E), Altera, Lattice, and QuickLogic only) Flatten lower levels but preserve the interface of the specified design unit
flatten, firm
The software flattens the design as directed. If there is a lower-level syn_hier attribute, it takes precedence over a higher-level one.
LO
6-12
Defining State Machines in Verilog, next Defining State Machines in VHDL, on page 6-14 Specifying FSMs with Attributes and Directives, on page 6-15
For information about the attributes used to define state machines, see Running the FSM Compiler on Individual FSMs, on page 6-20.
In Verilog, model the state machine with case, casex, or casez statements in always blocks. Check the current state to advance to the next state and then set output values. Do not use if statements.
6-13
Use explicit state values for states using parameter or define statements. This is an example of a parameter statement that sets the current state to 2h2: parameter state1 = 2h1, state2 = 2h2; ... current_state = state2; This example shows how to set the current state value with define statements: define state1 2h1 define state2 2h2 ... current_state = state2;
Use CASE statements to check the current state at the clock edge,
advance to the next state, and set output values. You can also use IFTHEN-ELSE statements, but CASE statements are preferable.
If you do not cover all possible cases explicitly, include a WHEN OTHERS
assignment as the last assignment of the CASE statement, and set the state vector to some valid state.
If you create implicit state machines with multiple WAIT statements, the
software does not recognize them as state machines.
6-14
For information about how to add attributes, see Adding Attributes and Directives, on page 3-66. 2. To determine the encoding style used for the state machine, set the syn_encoding attribute in the source code or in the SCOPE window. For VHDL users there are alternative methods, described in the next step. The FSM Compiler and the FSM Explorer honor this setting. The different values for this attribute are briefly described here:
6-15
Situation: If...
Area is important Speed is important Recovery from an invalid state is important
syn_encoding Value sequential onehot safe, with another style. For example: /* synthesis syn_encoding = safe, onehot */
Explanation
One of the smallest encoding styles. Usually the fastest style and suited to most FPGA styles. Forces the state machine to reset. For example, where an alpha particle hit in a hostile operating environment causes a spontaneous register change, you can use safe to reset the state machine. Default encoding. Could be faster than onehot, even though the value must be decoded to determine the state. For sequential, more than one bit can change at a time; for gray, only one bit changes at a time, but more than one bit can be hot. Fastest style, because each state variable has one bit set, and only one bit of the state register changes at a time.
There are <5 states Large output decoder follows the FSM
onehot
3. If you are using VHDL, you have two choices for defining encoding:
Use syn_encoding as described above, and enable the FSM compiler. Use syn_enum_encoding to define the states (sequential, onehot, gray, and
safe) and disable the FSM compiler. If you do not disable the FSM compiler, the syn_enum_encoding values are not implemented. This is because the FSM compiler, a mapper operation, overrides syn_enum_encoding, which is a compiler directive. Use this method for user-defined FSM encoding. For example: LO attribute syn_enum_encoding of state_type : type is "001 010 101";
6-16
Choosing When to Use the FSM Compiler, on page 6-17, next Running the FSM Compiler on the Whole Design, on page 6-18 Running the FSM Compiler on Individual FSMs, on page 6-20 Specifying FSMs with Attributes and Directives, on page 6-15
source code describes your state machines correctly. You can also use the FSM Viewer to see a high-level bubble diagram and crossprobe from there. The FSM Viewer is only available in the Synplify Pro and Synplify Premier tools. For information about the FSM Viewer, see Using the FSM Viewer, on page 6-25.
The main panel on the left side of the project window The Options tab of the dialog box that comes up when you click the
New Impl or Impl Options buttons 2. To set a specific encoding style for a state machine, define the style with the syn_encoding attribute, as described in Specifying FSMs with Attributes and Directives, on page 6-15. If you do not specify a style, the FSM Compiler picks an encoding style based on the number of states. 3. Click Run to run synthesis. The software automatically recognizes and extracts the state machines in your design, and instantiates a state machine primitive in the netlist for each FSM it extracts. It then optimizes all the state machines in the design, using techniques like reachability analysis, next state logic optimization, state machine re-encoding and proprietary optimization
LO
6-18
algorithms. Unless you have specified encoding styles, it automatically selects the encoding style based on the number of states. Number of States
Up to 4 5-24 > 24
In the log file, the FSM Compiler writes a report that includes a description of each state machine extracted and the set of reachable states for each state machine. 4. Select View->View Log File and check the log file for descriptions of the state machines and the set of reachable states for each one. You see text like the following: Extracted state machine for register cur_state State machine has 7 reachable states with original encodings of: 0000001 0000010 0000100 0001000 0010000 0100000 1000000 .... original code -> new code 0000001 -> 0000001 0000010 -> 0000010 0000100 -> 0000100 0001000 -> 0001000 0010000 -> 0010000 0100000 -> 0100000 1000000 -> 1000000 5. Check the state machine implementation in the RTL and Technology views and in the FSM viewer.
In the RTL view you see the FSM primitive with one output for each
state.
In the Technology view, you see a level of hierarchy that contains the
FSM, with the registers and logic that implement the final encoding.
6-19
Enable the FSM Compiler by checking the box in the button panel of
the Project window.
reg [3:0] curstate /* synthesis syn_state_machine=0 */ ; signal curstate : state_type; attribute syn_state_machine : boolean; attribute syn_state_machine of curstate : signal is false;v
Run synthesis.
LO
The software automatically recognizes and extracts all the state machines, except the ones you marked. It optimizes the FSMs it
6-20
extracted from the design, honoring the syn_encoding attribute. It writes out a log file that contains a description of each state machine extracted, and the set of reachable states for each FSM. 2. If you have many state machines you do not want optimized, do this:
Disable the compiler by disabling the Symbolic FSM Compiler box in one
of these places: the main panel on the left side of the project window or the Options tab of the dialog box that comes up when you click the New Impl or Impl Options buttons. This disables the compiler from optimizing any state machine in the design. You can now selectively turn on the FSM compiler for individual FSMs.
reg [3:0] curstate /* synthesis syn_state_machine=1 */ ; signal curstate : state_type; attribute syn_state_machine : boolean; attribute syn_state_machine of curstate : signal is true;
For state machines with specific encoding styles, set the encoding
style with the syn_encoding attribute, as described in Specifying FSMs with Attributes and Directives, on page 6-15. When synthesized, these registers have the specified encoding style.
Run synthesis.
The software automatically recognizes and extracts only the state machines you marked. It automatically assigns encoding styles to the state machines with the syn_state_machine attribute, and honors the encoding styles set with the syn_encoding attribute. It writes out a log file that contains a description of each state machine extracted, and the set of reachable states for each state machine. 3. Check the state machine in the log file, the RTL and technology views, and the FSM viewer, which is not available to Synplify users. For information about the FSM viewer, see Using the FSM Viewer, on page 6-25.
6-21
Deciding When to Use the FSM Explorer, next Running the FSM Explorer, on page 6-23
LO
6-22
reg [3:0] curstate /* synthesis state_machine */ ; signal curstate : state_type; attribute syn_state_machine : boolean; attribute syn_state_machine of curstate : signal is true;
reg [3:0] curstate /* synthesis syn_encoding gray*/ ; signal curstate : state_type; attribute syn_encoding : string; attribute syn_encoding of curstate : signal is true;
The FSM Compiler honors the syn_state_machine attribute when it extracts state machines, and the FSM Explorer honors the syn_encoding attribute when it sets encoding styles. See Specifying FSMs with Attributes and Directives, on page 6-15 for details. 2. Enable the FSM Explorer by checking the FSM Explorer box in one of these places:
The main panel on the left side of the project window The Options tab of the dialog box that comes up when you click the
New Impl or Impl Options buttons. If you have not checked the FSM Compiler option, checking the FSM Explorer option automatically selects the FSM Compiler option. 3. Click Run to run synthesis. The FSM Explorer uses the state machines extracted by the FSM Compiler. If you have not run the FSM Compiler, the FSM Explorer invokes the compiler automatically to extract the state machines, instantiate state machine primitives, and optimize them. Then, the FSM Explorer runs through each encoding style for each state machine that
6-23
does not have a syn_encoding attribute and picks the best style. If you have defined an encoding style with syn_encoding, it uses that style. The FSM Compiler writes a description of each state machine extracted and the set of reachable states for each state machine in the log file. The FSM Explorer adds the selected encoding styles. The FSM Explorer also generates a <design>_fsm.sdc file that contains the encodings and which is used for mapping. 4. Select View->View Log File and check the log file for the descriptions. The following extract shows the state machine and the reachable states as well as the encoding style, gray, set by FSM Explorer. Extracted state machine for register cur_state State machine has 7 reachable states with original encodings of: 0000001 0000010 0000100 0001000 0010000 0100000 1000000 .... Adding property syn_encoding, value "gray", to instance cur_state[6:0] List of partitions to map: view:work.Control(verilog) Encoding state machine work.Control(verilog)cur_state_h.cur_state[6:0] original code -> new code 0000001 -> 000 0000010 -> 001 0000100 -> 011 0001000 -> 010 0010000 -> 110 0100000 -> 111 1000000 -> 101 5. Check the state machine implementation in the RTL and Technology views and in the FSM viewer. For information about the FSM viewer, see Using the FSM Viewer, on page 6-25. LO
6-24
Select the FSM instance, click the right mouse button and select View
FSM from the popup menu.
6-25
Do...
Click the Transitions tab at the bottom of the table. Click the RTL Encoding tab.
Click the Mapped Encodings tab (available after synthesis). Select View->FSM table or click the FSM Table icon. You might have to scroll to the right to see it.
This figure shows you the mapping information for a state machine. The Transitions tab shows you simple equations for conditions for each state. The RTL Encodings tab has a State column that shows the state names in the source code, and a Registers column for the corresponding RTL encoding. The Mapped Encoding tab shows the state names in the code mapped to actual values.
LO
6-26
Mapped Encoding
RTL Encoding
Select the state by clicking on its bubble. The state is highlighted. Click the right mouse button and select the filtering criteria from the
popup menu: output, input, or any transition. The transition diagram now shows only the filtered states you set. The following figure shows filtered views for output and input transitions for one state.
6-27
Similarly, you can check the relationship between two or more states by selecting the states, filtering them, and checking their properties. 4. To view the properties for a state,
Select the state. Click the right mouse button and select Properties from the popup
menu. A form shows you the properties for that state. To view the properties for the entire state machine like encoding style, number of states, and total number of transitions between states, deselect any selected states, click the right mouse button outside the diagram area, and select Properties from the popup menu. 5. To view the FSM description in text format, select the state machine in the RTL view and View FSM Info File from the right mouse popup. This is an example of the FSM Info File, statemachine.info. State Machine: work.Control(verilog)-cur_state[6:0] No selected encoding - Synplify will choose Number of states: 7 Number of inputs: 4 Inputs: 0: Laplevel 1: Lap 2: Start LO 3: Reset Clock: Clk
6-28
Transitions: (input, start state, destination state) -100 S0 S6 --10 S0 S2 ---1 S0 S0 -00- S0 S0 --10 S1 S3 -100 S1 S2 -000 S1 S1 ---1 S1 S0 --10 S2 S5 -000 S2 S2 -100 S2 S1 ---1 S2 S0 -100 S3 S5 -000 S3 S3 --10 S3 S1 ---1 S3 S0 -000 S4 S4 --1- S4 S0 -1-- S4 S0 ---1 S4 S0 -000 S5 S5 -100 S5 S4 --10 S5 S2 ---1 S5 S0 1--0 S6 S6 ---1 S6 S0 0--- S6 S0
6-29
Instantiating Black Boxes and I/Os in Verilog, next Instantiating Black Boxes and I/Os in VHDL, on page 6-32 Adding Black Box Timing Constraints, on page 6-34 Adding Other Black Box Attributes, on page 6-38
The Fix Gated Clocks option is only available in the Synplify Pro and Synplify Premier tools. For information about using black boxes with the Fix Gated Clocks option, see Working with Gated Clocks, on page 6-99.
Select the library file with the macro you need from the
Synplify_install_dir/lib/technology directory. Files are named LO technology.v. Most vendor architectures provide macro libraries that predefine the black boxes for primitives and macros.
6-30
Make sure the library macro file is the first file in the source file list
for your project. 2. To instantiate a module that has been defined in another input source as a black box:
Create an empty macro that only contains ports and port directions. Put the syn_black_box synthesis directive just before the semicolon in
the module declaration. module myram (out, in, addr, we) /* synthesis syn_black_box */; output [15:0] out; input [15:0] in; input [4:0] addr; input we; endmodule
Make an instance of the stub in your design. Compile the stub along with the module containing the instantiation
of the stub.
Create an empty macro that only contains ports and port directions. Put the syn_black_box synthesis directive just before the semicolon in
the module declaration.
6-31
Make an instance of the stub in your design. Compile the stub along with the module containing the instantiation
of the stub. 4. Add timing constraints and attributes as needed. See Adding Black Box Timing Constraints, on page 6-34 and Adding Other Black Box Attributes, on page 6-38. 5. After synthesis, merge the black box netlist and the synthesis results file using the method specified by your vendor.
Select the library file with the macro you need from the
Synplify_install_dir/lib/vendor directory. Files are named family.vhd. Most vendor architectures provide macro libraries that predefine the black boxes for primitives and macros.
Add the appropriate library and use clauses to the beginning of your
design units that instantiate the macros. library family ; use family.components.all; 2. To create a black box for a component from another input source:
Create a component declaration for the black box. Declare the syn_black_box attribute as a boolean attribute. LO Set the attribute to be true.
6-32
library synplify; use synplify.attributes.all; entity top is port (clk, rst, en, data: in bit; q; out bit); end top; architecture structural of top is component bbox port(Q: out bit; D, C, CLR: in bit); end component; attribute syn_black_box of bbox: component is true; ...
Create a component declaration for the I/O. Declare the black_box_pad_pin attribute as a string attribute. Set the attribute value on the component to be the external pin name
for the pad. library synplify; use synplify.attributes.all; ...
Fpga User Guide, December 2005 6-33
component mybuf port(O: out bit; I: in bit); end component; attribute black_box_pad_pin of mybuf: component is "I";
syn_tpd
LO
6-34
1. Define the instance as a black box, as described in Instantiating Black Boxes and I/Os in Verilog, on page 6-30 or Instantiating Black Boxes and I/Os in VHDL, on page 6-32. 2. Determine the kind of constraint for the information you want to specify: To define...
Propagation delay through the black box Setup delay (relative to the clock) for input pins Clock-to-output delay through the black box
The following table shows the appropriate syntax for att_value. See the Reference Manual for complete syntax information.
6-35
<n> is a numerical suffix. bundle is a comma-separated list of buses and scalar signals, with no intervening spaces. For example, A,B,C. ! indicates (optionally) a negative edge for a clock. value is in ns.
The following is an example of black box attributes, using VHDL signal notation: architecture top of top is component rcf16x4z port( ad0, ad1, ad2, ad3 : in std_logic; di0, di1, di2, di3 : in std_logic; wren, wpe : in std_logic; tri : in std_logic; do0, do1, do2 do3 : out std_logic; end component attribute syn_tpd1 of rcf16x4z : component is "ad0,ad1,ad2,ad3 -> do0,do1,do2,do3 = 2.1"; attribute syn_tpd2 of rcf16x4z : component is "tri -> do0,do1,do2,do3 = 2.0"; attribute syn_tsu1 of rcf16x4z : component is "ad0,ad1,ad2,ad3 -> ck = 1.2"; attribute syn_tsu2 of rcf16x4z : component is "wren,wpe,do0,do1,do2,do3 -> ck = 0.0"; 4. In Verilog, add the directives as comments, as shown in the following example. For explanations about the syntax, see the table in the previous step or the Reference Manual. module ram32x4 (z, d, addr, we, clk) /* synthesis syn_black_box syn_tpd1="addr[3:0]->z[3:0]=8.0" LO syn_tsu1="addr[3:0]->clk=2.0" syn_tsu2="we->clk=3.0" */; output [3:0[ z;
6-36
input [3:0] d; input [3:0] addr; input we; input clk; endmodule 5. To add black box attributes through the SCOPE interface, do the following:
Open the SCOPE spreadsheet and select the Attributes panel. In the Object column, select the name of the black-box module or
component declaration from the pull-down list. Manually prefix the black box name with v: to apply the constraint to the view.
In the Attribute column, type the name of the timing attribute, followed
by the numerical suffix, as shown in the following table. You cannot select timing attributes from the pull-down list.
6-37
1. To specify that a clock pin on the black box has access to global clock routing resources, use syn_isclock. Depending on the technology, different clock resources are inserted. In Xilinx, the software inserts BUFG, for Actel it inserts CLKBUF, and for QuickLogic, it inserts Q_CKPAD. 2. To specify that the software need not insert a pad for a black box pin, use black_box_pad_pin. Use this for technologies that automatically insert pad buffers for the I/Os like Xilinx, some Altera families, Actel, Lattice, QuickLogic, and some Lattice technologies. 3. To define a tristate pin so that you do not get a mixed driver error when there is another tristate buffer driving the same net, use black_box_tri_pins.
LO
6-38
4. To ensure consistency between synthesized black box netlist names and the names generated by third party tools or IP cores, use the following attributes (Xilinx only):
syn_edif_bit_format syn_edif_scalar_format
5. To specify that a port on a black box is connected to an internal STARTUP block in Xilinx XC4000architectures, use the xc_isgr directive.
Startup
xc_isgr R
Black Box
6-39
Pipelining
Pipelining
The pipelining feature is only available in the Synplify Pro and Synplify Premier tools. Pipelining is the process of splitting logic into stages so that the first stage can begin processing new inputs while the last stage is finishing the previous inputs. This ensures better throughput and faster circuit performance. If you are using selected Altera or Xilinx technologies, you can use or the related technique of retiming to improve performance. See Retiming, on page 6-44 for details. For pipelining, The software splits the logic by moving registers into the multiplier or ROM: This section discusses the following pipelining topics:
For Xilinx Virtex, Virtex-E, Virtex-II, Virtex-II Pro, and Virtex-4 devices,
you can only pipeline multipliers if the adjacent register has a SYNCHRONOUS reset.
For Xilinx Virtex designs, you can push any kind of flip-flop into the
module, as long as all the flip-flops in the pipeline have the same clock, the same set/reset signal or lack of it, and the same enable control or LO lack of it. For Altera designs, you must have asynchronous set/resets if you want to do pipelining.
6-40
Pipelining
Use this approach as a first pass to get a feel for which modules you can pipeline. If you know exactly which registers you want to pipeline, add the attribute to the registers in the source code or interactively using the SCOPE interface. 3. To check whether individual registers are suitable for pipelining, do the following:
Open the RTL view of the design. Select the register and press F12 to filter the schematic view.
6-41
Pipelining
In the new schematic view, select the output and type e (or select
Expand from the popup menu. Check that the register is suitable for pipelining.
Check the Pipelining checkbox and attach the syn_pipeline attribute with
a value of 0 or false to any registers you do not want the software to move. This attribute specifies that the register cannot be moved for pipelining.
6-42
Pipelining
Verilog Example: reg [lefta:0] a_aux; reg [leftb:0] b_aux; reg [lefta+leftb+1:0] res /* synthesis syn_pipeline=1 */; reg [lefta+leftb+1:0] res1; VHDL Example: architecture beh of onereg is signal temp1, temp2, temp3, std_logic_vector(31 downto 0); attribute syn_pipeline : boolean; attribute syn_pipeline of temp1 : signal is true; attribute syn_pipeline of temp2 : signal is true; attribute syn_pipeline of temp3 : signal is true; 5. Click Run. The software looks for registers where all the flip-flops of the same row have the same clock, no control signal, or the same unique control signal, and pushes them inside the module. It attaches the syn_pipeline attribute to all these registers. If there already is a syn_pipeline attribute on a register, the software implements it. 6. Check the log file (*.srr). You can use the Find command for occurrences of the word pipelining to find out which modules got pipelined. The log file entries look like this: @N:|Pipelining module res_out1 @N:|res_i is level 1 of the pipelined module res_out1 @N:|r is level 2 of the pipelined module res_out1
6-43
Retiming
Retiming
The retiming feature is only available in the Synplify Pro and Synplify Premier tools. Retiming is a powerful technique for improving the timing performance of sequential circuits without having to modify the source code. Retiming automatically moves registers (register balancing) across combinatorial gates or LUTs to improve timing while ensuring identical behavior as seen from the primary inputs and outputs of the design. Retiming moves registers across gates or LUTs, but does not change the number of registers in a cycle or path from a primary input to a primary output. However, it can change the total number of registers in a design. The retiming algorithm retimes only edge-triggered registers. It does not retime level-sensitive latches. Currently you can use retiming only for certain Actel, Altera, and Xilinx families. The option is not available if it does not apply to the family you are using. These sections contain detailed information about using retiming.
Controlling Retiming, next Retiming Example, on page 6-46 Retiming Report, on page 6-48 How Retiming Works, on page 6-48
Controlling Retiming
The following procedure shows you how to use retiming. 1. To enable retiming for the whole design, check the Retiming check box. You can set the Retiming option from the button panel in the Project window, or with the Project->Implementation Options command (Device tab). The option is only available in certain technologies.
LO
6-44
Retiming
For Altera and Xilinx designs, retiming is a superset of pipelining, so when you select Retiming, you automatically select Pipelining. See Pipelining, on page 6-40 for more information. For Actel designs, retiming does not include pipelining. Retiming works globally on the design, and moves edge-triggered registers as needed to balance timing. 2. To enable retiming on selected registers, use either of the following techniques:
6-45
Retiming
Retiming Example
The following example shows a design with retiming disabled and enabled. LO
6-46
Retiming
The top figure shows two levels of logic between the registers and the output, and no levels of logic between the inputs and the registers. The bottom figure shows the results of retiming the three registers at the input of the OR gate. The levels of logic from the register to the output are reduced from two to one. The retimed circuit has better performance than the original circuit. Timing is improved by transferring one level of logic from the critical part of the path (register to output) to the non-critical part (input to register).
6-47
Retiming
Retiming Report
The retiming report is part of the log file, and includes the following:
The number of registers added, removed, or untouched by retiming. Names of the original registers that were moved by retiming and which
no longer exist in the Technology view.
Names of the registers created as a result of retiming, and which did not
exist in the RTL view. The added registers have a _ret suffix.
Flip-flops with no control signals (resets, presets, and clock enables) are
the most common type of component moved. Flip-flops with minimal control logic can also be retimed. Multiple flip-flops with reset, set or enable signals that need to be retimed together are only retimed if they have exactly the same control logic.
You might not be able to crossprobe retimed registers between the RTL
and the Tech view, because there may not be a one-to-one correspondence between the registers in these two views after retiming. A single LO register in the RTL view might now correspond to multiple registers in the Technology view.
6-48
Retiming
Effect
Does not retime flip-flops with different false path constraints. Retimed registers affect timing constraints. Does not retime flip-flops with different multicycle constraints. Retimed registers affect timing constraints. Does not maintain define_reg_input_delay and define_reg_output_delay constraints. Retimed registers affect timing constraints. Does not retime registers in a macro with this attribute. Does not retime across keepbufs generated because of this attribute. Does not retime registers in a macro with this attribute. Automatically enabled if retiming is enabled. Does not retime flip-flops with this attribute set. Does not retime net drivers with this attribute. If the net driver is a LUT or gate, no flip-flops are retimed across it. On a critical path, does not retime registers with different syn_reference_clock values together, because the path effectively has two different clock domains. Does not override attribute-specified packing of registers in I/O pads. It the attribute value is false, the registers can be retimed. If the attribute is not specified, the timing engine determines whether the register is packed into the I/O block. Registers are not retimed if the value is 0.
Multicycle constraint
Register constraint
syn_reference_clock
syn_useioff
syn_allow_retiming
6-49
Inserting Probes
Retiming does not change the simulation behavior (as observed from
primary inputs and outputs) of your design, However if you are monitoring (probing) values on individual registers inside the design, you might need to modify your test bench if the probe registers are retimed.
If the retimed register and its driver and load remain in a Synplify
Premier-specific region, then the register will remain in the region.
If the retimed register and its driver and load are moved outside a
Synplify Premier-specific region, then the register will be moved outside the region.
If the retimed register is moved to the boundary of a Synplify Premierspecific region, then tunneling can occur.
Inserting Probes
The probe insertion feature is only available with the Synplify Pro and Synplify Premier tools. Probes are extra wires that you insert into the design for debugging. When you insert a probe, the signal is represented as an output port at the top level. You can specify probes in the source code or by interactively attaching an attribute. LO
6-50
Inserting Probes
6-51
Inserting Probes
This figure shows some probes and probe entries in the log file.
Adding property syn_probe, value 1, to net pc[0] Adding property syn_probe, value 1, to net pc[1] Adding property syn_probe, value 1, to net pc[2] Adding property syn_probe, value 1, to net pc[3] .... @N|Added probe pc_keep_probe_1[0] on pc_keep[0] in eight_bit_uc @N|Also padding probe pc_keep_probe_1[0] @N|Added probe pc_keep_probe_2[1] on pc_keep[1] in eight_bit_uc @N|Also padding probe pc_keep_probe_2[1] @N|Added probe pc_keep_probe_3[2] on pc_keep[2] in eight_bit_uc
Drag the net into a SCOPE cell. Add the prefix n: to the net name in the SCOPE window. If you are
adding a probe to a lower-level module, the name is created by concatenating the names of the hierarchical instances.
If you want to attach probes to part but not all of a bus, make the
change in the Object column. For example, if you enter LO n:UC_ALU.longq[4:0] instead of n:UC_ALU.longq[8:0], the software only inserts probes where specified.
6-52
Inserting Probes
6-53
Inferring RAMs
Inferring RAMs
There are two methods of handling RAMs: instantiation and inference. The software can automatically infer RAMs if they are structured correctly in your source code. For details, see the following sections:
Inference vs. Instantiation, next Coding RAMs for Inference, on page 6-55 Specifying RAM Implementation Styles, on page 6-59 Implementing Altera RAMs Automatically, on page 6-61 Implementing Xilinx RAMs Automatically, on page 6-64 Implementing Altera RAMs: FLEX and APEX, on page 6-67 Implementing Altera RAMs: Stratix Multi-Port RAMs, on page 6-69 Inferring Xilinx Block RAMs Using Registered Addresses, on page 6-70 Inferring Xilinx Block RAMs Using Registered Output, on page 6-73 Setting Xilinx RAM Initialization Values, on page 6-78 Mapping Xilinx ROM to Block RAM, on page 6-79
6-54
Inferring RAMs
Inference in Synthesis Limitations Glue logic to implement the RAM might result in a sub-optimal implementation. Can only infer synchronous RAMs No support for address wrapping No support for RAM enables, except for write enable Pin name limitations means some pins are always active or inactive
Instantiation Limitations Source code is not portable because it is technology-dependent. Limited or no access to timing and area data if the RAM is a black box. Inter-tool access issues, if the RAM is a black box created with another tool.
6-55
Inferring RAMs
library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_signed.all; entity ramtest is port (q : out std_logic_vector(3 downto 0); d : in std_logic_vector(3 downto 0); addr : in std_logic_vector(2 downto 0); we : in std_logic; clk : in std_logic); end ramtest; architecture rtl of ramtest is type mem_type is array (7 downto 0) of std_logic_vector (3 downto 0); signal mem : mem_type; begin q <= mem(conv_integer(addr)); process (clk, we, addr) begin if rising_edge(clk) then if (we = '1') then mem(conv_integer(addr)) <= d; end if; end if; end process; end rtl;
For technology-specific details, see Implementing Altera RAMs Automatically, on page 6-61 and Implementing Xilinx RAMs Automatically, on page 6-64. LO 4. For a dual-port RAM, make the write-to and read-from addresses different. The following figure and code example illustrate how the software infers a dual-port RAM.
6-56 Fpga User Guide, December 2005
Inferring RAMs
module ram16x8(z, raddr, d, waddr, we, clk); output [7:0] z; input [7:0] d; input [3:0] raddr, waddr; input we; input clk; reg [7:0] z; reg [7:0] mem0, mem1, mem2, mem3, mem4, mem5, mem6, mem7; reg [7:0] mem8, mem9, mem10, mem11, mem12, mem13, mem14, mem15; always @(mem0 or mem1 or mem2 or mem3 or mem4 or mem5 or mem6 or mem7 or mem8 or mem9 or mem10 or mem11 or mem12 or mem13 or mem14 or mem15 or raddr) begin case (raddr[3:0]) 4'b0000: z = mem0; 4'b0001: z = mem1; 4'b0010: z = mem2; 4'b0011: z = mem3; 4'b0100: z = mem4; 4'b0101: z = mem5; 4'b0110: z = mem6; 4'b0111: z = mem7; 4'b1000: z = mem8; 4'b1001: z = mem9; 4'b1010: z = mem10; 4'b1011: z = mem11; 4'b1100: z = mem12; 4'b1101: z = mem13; 4'b1110: z = mem14; 4'b1111: z = mem15; endcase end
6-57
Inferring RAMs
always @(posedge clk) begin if(we) begin case (waddr[3:0]) 4'b0000: mem0 = d; 4'b0001: mem1 = d; 4'b0010: mem2 = d; 4'b0011: mem3 = d; 4'b0100: mem4 = d; 4'b0101: mem5 = d; 4'b0110: mem6 = d; 4'b0111: mem7 = d; 4'b1000: mem8 = d; 4'b1001: mem9 = d; 4'b1010: mem10 = d; 4'b1011: mem11 = d; 4'b1100: mem12 = d; 4'b1101: mem13 = d; 4'b1110: mem14 = d; 4'b1111: mem15 = d; endcase end end endmodule For technology-specific details, see Implementing Altera RAMs Automatically, on page 6-61 and Implementing Xilinx RAMs Automatically, on page 6-64. 5. To infer multi-port RAMs or nrams (certain technologies only), do the following:
Target a technology that supports multi-port RAMs. Register the read address. Add the syn_ramstyle attribute with a value of no_rw_check. If you do not
do this, the compiler errors out.
Make sure that the writes are to one process. If the writes are to
multiple processes, use the syn_ramstyle attribute to specify a RAM. 6. For RAMs where inference is not the best solution, use either one of these approaches:
6-58
Inferring RAMs
Instantiate RAMs using the black box methodology. Use this method
in cases where RAM is implemented in two cells instead of one because the the RAM address range spans the word limit of the primitive and the software does not currently support address wrapping. If the address range is 8 to 23 and the RAM primitive is 16 words deep, the software implements the RAM as two cells, even though the address range is only 16 words deep. Refer to the list of limitations in Inference vs. Instantiation, on page 6-54 and the vendor-specific information referred to in the previous step to determine whether you should instantiate RAMs. 7. Synthesize your design. The compiler infers one of the following RAMs from the source code. You can view them in the RTL view: RAM1
RAM2 NRAM
RAM
Resettable RAM Multi-port RAM
If the number of words in the RAM primitive is less than the required address range, the compiler generates two RAMs instead of one, leaving any extra addresses unused. Once the compiler has inferred the RAMs, the mapper implements the inferred RAMs in the technology you specified. For details of how to map the RAM inferred by the compiler to the implemention you want, see Specifying RAM Implementation Styles, on page 6-59, Implementing Altera RAMs Automatically, on page 6-61, and Implementing Xilinx RAMs Automatically, on page 6-64.
6-59
Inferring RAMs
If you would rather set up your design so that the software automatically maps the RAMs to the components you want, see Implementing Altera RAMs Automatically, on page 6-61 and Implementing Xilinx RAMs Automatically, on page 6-64 for some vendor-specific details. 1. If you do not want to use RAM resources, attach the syn_ramstyle attribute with a value of registers to the RAM instance name or to the signal driven by the RAM. Use this value for small RAMs. The software implements the RAMs according to the technology. They can be implemented as registers (Altera, Xilinx), LPMs (Atmel, Cypress), dedicated RAM resources (QuickLogic) or synchronous dual-port memory cells (some Lattice technologies). 2. To use the dedicated memory resources on the FPGA (Altera technologies), do the following:
Set syn_ramstyle to block_ram. For newer Altera technologies like Stratix, specify mapping to
TriMatrix memories by setting syn_ramstyle to M512 , M4K , or M-RAM.
If you do not want glue logic created, register the RAM output. For
Altera Stratix designs, you can set syn_ramstyle to no_rw_check. The software implements the RAMS as EABs or ESBs, depending on the technology. 3. To implement RAMs using dedicated Block SelectRAM+ in Xilinx Virtex technologies, do the following. To use distributed memory, see the next step.
Set syn_ramstyle to block_ram. Register the read address, because the technology is fully
synchronous.
If you do not want to generate glue logic for dual-port RAMs, either
register the RAM output or set syn_ramstyle to no_rw_check. Use this attribute value only if you do not care about a read/write check. LO 4. To implement RAMs using distributed memory in Xilinx technologies, you can set syn_ramstyle to select_ram. If you do not set syn_ramstyle
6-60
Inferring RAMs
explicitly, the software automatically uses this value, because it is the default.
If you are a Verilog user, avoid using blocking statements when you
model the RAMs because not all blocking assignments are mapped to block RAM.
Bidirectional
6-61
Inferring RAMs
The read and write addresses share a single address. There is only one data input. There is only RAM output. Either the read address or the output is registered. For multiple clocks, both the read address and the output must be registered.
The mapper maps the RAM to the dedicated memory resource, ALTSYNCRAM, which is fully synchronous. It is mapped in SINGLE_PORT mode, and all ports are registered. The ALTSYNCRAM implementation is determined by the Quartus place-and-route tool.
The code is written so that the hardware exactly matches the RTL
behavior. For example, if your code allows simultaneous reads and writes to the same address, it can result in a mismatch between the RTL and hardware behaviors. In such a case, the mapper does not map the RAM inferred by the compiler to the dedicated ALTSYNCRAM resources and you get a warning message. See Stratix Dual-Port RAM Code Examples, on page B-42 of the Reference Manual.
The design has different read and write addresses. There is only one data input. There is only RAM output. Either the read address or the output is registered. LO The read and write addresses can have different clocks. However if you register the read, write, and output, at least two of them must share a clock.
6-62
Inferring RAMs
For multiple clocks, both the read address and the output must be
registered. The mapper maps the RAM to ALTSYNCRAM in DUAL_PORT mode, which is fully synchronous. The actual ALTSYNCRAM implementation is determined by the Quartus place-and-route tool. The following figure shows one dual-port RAM implementation:
6. To implement Stratix dual-port RAMs in bidirectional mode, make sure of the following:
The design has different read and write addresses. There are two read
addresses.
There is only one data input. There are two RAM outputs. Either the read address or the output is registered. The read and write addresses can have different clocks. However if you register the read, write, and output, at least two of them must share a clock. registered.
For multiple clocks, both the read address and the output must be
6-63
Inferring RAMs
The mapper maps the RAM to ALTSYNCRAM in BIDIR_DUAL_PORT mode, which is fully synchronous. The actual ALTSYNCRAM implementation is determined by the Quartus place-and-route tool. 7. To implement Stratix multi-ports RAMs automatically, see Implementing Altera RAMs: Stratix Multi-Port RAMs, on page 6-69.
Make sure the RAM size is at least 2K. Make sure the write operation is synchronous and the read operation
is asynchronous. The Xilinx mapper implements RAMs inferred by the compiler as asynchronous RAMs, using the CLB resources. 3. To implement block SelectRAM+, do the following:
Register the read address (see Inferring Xilinx Block RAMs Using
Registered Addresses, on page 6-70).
6-64
Inferring RAMs
Register the output. (see Inferring Xilinx Block RAMs Using Registered
Output, on page 6-73).
Make the read and write addresses the same. Make sure that the read and write clocks are the same. Make sure the read and write enables are the same.
The Xilinx mapper automatically implements RAMs inferred by the compiler as single-port Block SelectRAM+ , using the dedicated memory resources on the FPGA. The enable signal has the highest priority. Where applicable, the tool uses the parity bus to infer data bus widths. The mapper also uses the Write modes in some Xilinx architectures, as described in the next step. 5. To implement dual-port block RAM automatically, do the following:
Register the output. (see Inferring Xilinx Block RAMs Using Registered
Output, on page 6-73).
Your design can have different read and write addresses, multiple
clocks, and different read and write enables. The Xilinx mapper implements RAMs inferred by the compiler as dualport block SelectRAM+, using the dedicated memory resources on the FPGA. The dual-port RAM has only one write port. The software automatically inserts glue logic for address collision and recovery, unless you specify otherwise with the syn_ramstyle attribute. The mapper also implements the Write modes available with certain Xilinx architectures to indicate the output value when the write enable is active. The RAM implementations are shown here:
6-65
Inferring RAMs
Xilinx Architecture
Virtex-II, Virtex-II Pro, Virtex-4, Spartan-3, Spartan-3 Automotive, and Spartan-3E Virtex, Virtex-E, Spartan-II, Spartan-IIE, and Spartan-IIE Automotive
RAM Implementation
Block SelectRAM+ (single-port or dual-port) Distributed RAM Block SelectRAM+ (single-port or dual-port) Distributed RAM Block SelectRAM+ (single-port) Distributed RAM Distributed RAM
Virtex-II, Virtex-II Pro, Virtex-4, Spartan-3, Spartan-3 Automotive, and Spartan-3E Virtex, Virtex-E, Spartan-II, Spartan-IIE, and Spartan-IIE Automotive
Virtex-II, Virtex-II Pro, Virtex-4, Spartan-3, Spartan-3 Automotive, and Spartan-3E Virtex, Virtex-E, Spartan-II, Spartan-IIE, and Spartan-IIE Automotive
6. To implement true dual-port block (multi-port) RAM automatically, make sure the design meets the following conditions:
The compiler has inferred multi-port RAMs (nrams). See Coding RAMs
for Inference, on page 6-55 for details.
The inferred nram has two writes and one read. The read shares an
address with only one of the write ports, or two inferred RAMs share the same write addresses, clocks, and enables, but have different read addresses. In the latter case, the mapper pairs the RAMs together and maps them to true dual-port RAM. The Xilinx mapper implements RAMs inferred by the compiler as true dual-port block SelectRAM+, using the dedicated memory resources on LO the FPGA. The dual-port RAM has has one read port and multiple write ports. Each write port has its own write clock, write enable, data in, and write address.
6-66
Inferring RAMs
6-67
Inferring RAMs
always @(posedge clk) begin if(we) //Register RAM data and read address mem[read_add] <= d; read_add <= a; end endmodule When you synthesize this example, the software creates a single-port synchronous RAM, implemented with as few registers as possible. If you do not care about the insertion of glue logic, do not register the RAM output: module ram_test(q, a, d, we, clk); output[7:0] q; input [7:0] d; input [6:0] a; input we, clk; reg [6:0] read_add; reg [7:0] mem [127:0]; assign q = mem[read_add]; always @(posedge clk) begin if(we) //Register RAM data and read address mem[read_add] <= d; read_add <= a; end endmodule When you synthesize this example, the software creates a bypass mux to resolve the read/write simulation behavior on the positive and negative edges of the clock. You can use the syn_ramstyle attribute to ensure that the RAM is implemented as an EAB or ESB, or to disable RAM inference as needed. See Specifying RAM Implementation Styles, on page 6-59 for details. 4. Run synthesis. The software automatically infers Altera-specific synchronous RAMs and implements them in EABs or ESBs. When source code is written as a single-port RAM, the software implements it as a dual-port RAM with single-port RAM functionality, using the LPM_RAM_DQ:ALTDPRAM primitive. The following tableLO lists the family-specific details of implementation:
6-68
Inferring RAMs
LPMRAMDQ ALTDPRAM
The nram has two writes and one read. The read shares an address
with only one of the write ports.
Make sure there are only two clocks, one for each port. You cannot have more than two write ports; nram primitives with more
than two ports are mapped to logic.
The read address is registered. If the output is registered, the mapper retimes and infers block RAM.
The software maps nram primitives as follows:
6-69
Inferring RAMs
Primitive Description
2 write ports, 1 read. The read shares an address with only one of the write ports 2 nrams each with 2 write addresses and 1 read, which share the same write addresses, clocks, and enables, but different read addresses > 2 write ports > 2 clocks
After synthesis, the software writes out the following for the place-androute tool: defparam mem_1_1_Z.lpm_type = altsyncram;
RAMs with enable signals, RAM resets, or initialization settings. Inaccessible pins: read enable pins are always active, and reset pins
are always inactive.
LO
6-70
Inferring RAMs
Make sure the read and write clocks are the same. Make sure the read and write addresses are the same. Make sure the enable signals are the same. Use only write enable
signals.
6-71
Inferring RAMs
LO
6-72
Inferring RAMs
Advantages of Using Registered Output, on page 6-73 Block RAM Mapping for Virtex-II Write Modes, on page 6-73 Xilinx Single-Port Example with Registered Output, on page 6-75 Xilinx Single-Output Dual-Port Example with Registered Output, on
page 6-77
Registered Output
Can have different clocks Supports enable and reset signals
6-73
Inferring RAMs
Virtex
Virtex-E
Virtex-II
Virtex-II Pro
WRITEFIRST Mode
With enable and reset, enable takes precedence With enable and reset, reset takes precedence Without enable Without reset Without enable or reset SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP SP
READFIRST Mode
With enable and reset, enable takes precedence With enable and reset, reset takes precedence Without enable Without reset Without enable or reset Select RAM Select RAM Select RAM Select RAM Select RAM Select RAM Select RAM Select RAM Select RAM Select RAM SP SP SP SP SP SP SP SP SP SP
NOCHANGE Mode
With enable and reset, enable takes precedence With enable and reset, reset takes precedence Without enable Without reset Without enable or reset DP DP DP DP DP DP DP DP DP DP SP SP SP SP SP SP SP SP SP SP
LO
6-74
Inferring RAMs
6-75
Inferring RAMs
library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity ramtest is port( do : out std_logic_vector(8 downto 0); addr : in std_logic_vector(8 downto 0); di : in std_logic_vector(8 downto 0); en,clk,we,rst : in std_logic); end ramtest; architecture beh of ramtest is type memtype is array (256 downto 0) of std_logic_vector(8 downto 0); signal mem : memtype; attribute syn_ramstyle : string; attribute syn_ramstyle of mem : signal is "block_ram"; begin process(clk) begin if clk'event and clk='1' then if(en='1') then if (rst='1') then do <= "000000000"; elsif (we='1') then do <= di; else do <= mem(CONV_INTEGER(addr)); end if; end if; end if; end process; process(clk) begin if clk'event and clk='1' then if (en='1' and we='1') then mem(CONV_INTEGER(addr)) <= di; end if; end if; end process; end beh; LO
6-76
Inferring RAMs
6-77
Inferring RAMs
attribute INIT of object : label is "value"; attribute INIT_xx of object : label is "value";
2. For RAM, specify a hex value for the INIT statement as shown in these examples:
Verilog VHDL
RAM16X1S RAM1(...) /* synthesis INIT = "0000" */; attribute INIT of RAM1 : label is "0000";
All Virtex block RAMs have 16 INIT statements because they are all LO 4Kbits in size, although they are configured differently: 4Kx1, 2Kx2, 1Kx4, 512x8, and 256x16.
Inferring RAMs
When you synthesize the design, the software forward-annotates the RAM initialization information to the Xilinx place-and-route software.
where dffe is an enabled flip-flop, dffre is an enabled flip-flop with asynchronous reset, dffse is an enabled flip-flop with asynchronous set, and dffpatre is an enabled, vectored flip-flop with asynchronous reset pattern. 2. Ensure that the registers and ROMs are within the same hierarchy. 3. Ensure that the number of outputs of the candidate ROM is 64 or fewer. 4. Make sure that at least half the addresses possess assigned values. For example, in a ROM with ten address bits (1024 unique addresses), at least 512 of those unique addresses must be assigned values. 5. Specify the syn_romstyle attribute with the value set to block_rom. 6. Synthesize the design. The software maps the ROM into block RAM.
6-79
The contents of only one register can be seen at a time, based on the
read address.
For static components, the software only taps the output of the last
register. The read address of the inferred component is set to a constant. 2. If needed, set the implementation style with the syn_srlstyle attribute. If you do not want the components automatically mapped to shift registers, set the value to registers. syn_srlstyle Value registers select_srl no_extractff_srl altshift_tap Implemented as...
registers Xilinx SRL16 primitives Xilinx SRL16 primitives without output flip-flops Altera Altshift_tap components
LO
6-80
3. For Altera shift registers, use attributes to control how the registers are packed: To...
Prevent a register from being packed into shift registers Prevent two registers from being packed into the same shift registers
Attach... syn_useioff or syn_noprune to the register. You can also use syn_srlstyle with a value of registers. syn_keep between the two registers. The algorithm slices the chain vertically, and packs the two registers into separate shift registers. syn_srlstyle with different group names for the registers you want to separate (syn_srlstyle= altshift_tap, group_name)
4. Run synthesis After compilation, the software displays the components as seqShift components in the RTL view. The following figure shows the components in the RTL view.
In the technology view, the components are implemented as Xilinx SRL16 or Altera altshift_tap primitives or registers, depending on the attribute values you set. 5. Check the results in the log file and the technology file. The log file reports the shift registers and the number of registers packed in them.
6-81
end rtl;
6-82
always @(posedge clk) if (shift) begin q[0] <= din; for (n=0; n<63; n=n+1) begin q[n+1] <= q[n]; end end endmodule
6-83
6-84
always @(posedge clk) begin if (enable == 1) begin for (i=15; i>0; i=i-1) begin regBank[i] <= regBank[i-1]; end regBank[0] <= dataIn; end end assign result = regBank[addr]; endmodule
6-85
LO
6-86
Instantiating LPMs as Black Boxes (Altera), on page 6-88, next Instantiating LPMs as Black Boxes (Cypress), on page 6-92 Instantiating LPMs Using VHDL Prepared Components, on page 6-94 Instantiating LPMs Using a Verilog Library (Altera), on page 6-97
6-87
6-88
module mylpm ( data, wren, wraddress, rdaddress, clock, q)/* synthesis syn_black_box */; input input input input input output [7:0] data; wren; [4:0] wraddress; [4:0] rdaddress; clock; [7:0] q;
wire [7:0] sub_wire0; wire [7:0] q = sub_wire0[7:0]; altsyncram altsyncram_component ( .wren_a (wren), .clock0 (clock), .address_a (wraddress), .address_b (rdaddress), .data_a (data), .q_b (sub_wire0)); defparam altsyncram_component.operation_mode = "DUAL_PORT", altsyncram_component.width_a = 8, altsyncram_component.widthad_a = 5, altsyncram_component.numwords_a = 32, altsyncram_component.width_b = 8, altsyncram_component.widthad_b = 5, altsyncram_component.numwords_b = 32, altsyncram_component.lpm_type = "altsyncram", altsyncram_component.width_byteena_a = 1, altsyncram_component.outdata_reg_b = "UNREGISTERED", altsyncram_component.indata_aclr_a = "NONE", altsyncram_component.wrcontrol_aclr_a = "NONE", altsyncram_component.address_aclr_a = "NONE", altsyncram_component.address_reg_b = "CLOCK0", altsyncram_component.address_aclr_b = "NONE", altsyncram_component.outdata_aclr_b = "NONE", altsyncram_component.read_during_write_mode_mixed_ports = "DONT_CARE", altsyncram_component.ram_block_type = "AUTO", altsyncram_component.intended_device_family = "Stratix"; endmodule
Fpga User Guide, December 2005 6-89
: STRING;
LO
6-90
PORT ( wren_a : IN STD_LOGIC ; clock0 : IN STD_LOGIC ; address_a : IN STD_LOGIC_VECTOR (4 DOWNTO 0); address_b : IN STD_LOGIC_VECTOR (4 DOWNTO 0); q_b : OUT STD_LOGIC_VECTOR (7 DOWNTO 0); data_a : IN STD_LOGIC_VECTOR (7 DOWNTO 0) ); END COMPONENT; BEGIN <= sub_wire0(7 DOWNTO 0); altsyncram_component : altsyncram GENERIC MAP ( operation_mode => "DUAL_PORT", width_a => 8, widthad_a => 5, numwords_a => 32, width_b => 8, widthad_b => 5, numwords_b => 32, lpm_type => "altsyncram", width_byteena_a => 1, outdata_reg_b => "CLOCK0", indata_aclr_a => "NONE", wrcontrol_aclr_a => "NONE", address_aclr_a => "NONE", address_reg_b => "CLOCK0", address_aclr_b => "NONE", outdata_aclr_b => "NONE", read_during_write_mode_mixed_ports => "DONT_CARE", ram_block_type => "AUTO", intended_device_family => "Stratix" ) PORT MAP ( wren_a => wren, clock0 => clock, address_a => wraddress, address_b => rdaddress, data_a => data, q_b => sub_wire0 ); END SYN;
6-91
6-92
module adder(r, a, b); output [3:0] r; input [3:0] a, b; my_madd_sub inst0(.dataa(a), .datab(b), .cin(0), .add_sub(1), .result(r), .cout(), .overflow()); endmodule
6-93
begin U1: Madd_sub -- Configured as an adder port map ( dataA => dataA, dataB => dataB, -cin => zero, -add_sub => one, result => sum, cout => open, overflow => open ); end archadder;
6-94
This is an example of an LPM instantiated at a higher level: library ieee, lpm; use ieee.std_logic_1164.all; use lpm.components.all; entity test is port(data : in std_logic_vector (5 downto 0); distance : in std_logic_vector (7 downto 0); result : out std_logic_vector (5 downto 0); end test; architecture arch1 of test is begin u1 : lpm_clshift generic map (LPM_WIDTH=>6, LPM_WIDTHDIST =>8) port map (data=>data, distance=>distance, result=>result); end arch1;
6-95
port map ( dataA => dataA, dataB => dataB, -cin => zero, -add_sub => one, result => sum, cout => open, overflow => open ); end archadder;
LO
6-96
input [lpm_width-1:0] data; input [lpm_widthad-1:0] rdaddress, wraddress; input rdclock, wrclock, rdclken, wrclken, wren, rden; output [lpm_width-1:0] q; endmodule //lpm_ram_dp 2. Instantiate the LPM in the higher-level module. For example: module top(d, q1, wclk, rclk, wraddr, raddr, wren, rden, wrclken, rdclken) ; parameter AWIDTH = 4; parameter DWIDTH = 8; parameter WDEPTH = 1<<AWIDTH; input [AWIDTH-1:0] wraddr, rdaddr; input [DWIDTH-1:0] d; input wclk, rclk, wren, rden; input wrclken, rdclken; output [DWIDTH-1:0] q1;
6-97
lpm_ram_dp u1(.data(d), .wrclock(wclk), .rdclock(rclk), .q(q1), .wraddress(wraddr), .rdaddress(rdaddr), .wren(wren), .rden(rden), .wrclken(wrclken), .rdclken(rdclken)); defparam u1.lpm_width = DWIDTH; defparam u1.lpm_widthad = AWIDTH; defparam u1.lpm_indata = REGISTERED; defparam u1.lpm_outdata = REGISTERED; defparam u1.lpm_wraddress_control = REGISTERED; defparam u1.lpm_rdaddress_control = REGISTERED; endmodule For information about using the LPMs in Altera simulation flows, see Using LPMs in Simulation Flows, on page 8-20.
LO
6-98
The Synplicity Approach to Gated Clocks, next Synthesizing a Gated Clock Design, on page 6-101 Prerequisites for Gated Clock Conversion, on page 6-103 Gated Clock Conversion Report, on page 6-105 Gated Clocks for Black Boxes, on page 6-108 Restrictions to Using Fix Gated Clocks, on page 6-110 Generated-Clock Optimization, on page 6-111
6-99
Moving the gating from the clock input pin to the dedicated enable pin,
when this pin is available. The ungated or base clock is routed to the clock inputs of the sequential devices using the global FPGA clock resources. Typically, many gated clocks are derived from the same base clock, so separating the gating from the clock allows a single global clock tree to be used for all gated clocks that reference that base clock. See the following figure for examples of eliminating gated clocks.
d a b clk
d a b clk
Gated Clock
d a b clk en
d
D Q
clk
EN
EN
Gated Clock
keep1
d clk
keep2 en1
EN
6-100
6-101
On the Device tab, set the value of Fixed Gated Clocks according to the
kind of report you want to generate in the log file (see the following table). Value Effect
1 2 3 0 The default. Does not report any gated clock conversions. Only reports sequential elements that could not be converted. Reports the conversion status of all sequential elements. Disables the option.
5. Synthesize the design. The Fix Gated Clocks option works on flip-flops, counters, latches, synchronous memories, and instantiated technology primitives. The software logically separates the gating from the clock and routes the gating to the clock enables on the sequential devices, using the programmable routing resources of the FPGA. The ungated base clock is routed to the clock inputs of the sequential devices using the global clock resources. Because many gated clocks are normally derived from the same base clock, separating the gating from the clock allows a single global clock tree to be used for all gated clocks that reference the same base clock. See Restrictions to Using Fix Gated Clocks, on page 6-110 for additional information. 6. Check the results in the Gated Clock Report section of the log file. See Gated Clock Conversion Report, on page 6-105 for an example of this report.
LO
6-102
Description
The gated clock logic must consist only of combinational logic. A derived clock that is the output of a register is not converted. Identify only one input to the combinational logic for the gated clock as a base clock. To identify a net as a clock, specify a period or frequency constraint for either the gate or the clock in the constraint (.sdc) file. This example defines the clk input as the base clock.
For at least one set of gating input values, the value output for the gated
clock must be constant and not change as the base clock changes.
For at least one value of the base clock, changes in the gating input
must not change the value output for the gated clock. The correct logic format requirements are illustrated with the simple gates shown in the following figures. When the software synthesizes a design with the Fix Gated Cock option enabled, clock enables for the AND gate and OR gate are converted, but the exclusive-OR gate shown in the second figure is not converted. The following table explains.
6-103
If either gate[1] or gate[2] is 0, then gclks[1] is 0, independent of the value of clk which satisfies the first condition. Also, if clk is 0, then gclks[1] is 0, independent of the values of gate[1] and gate[2] which satisfies the second condition. Because gclks[1] satisfies both conditions, it is successfully converted to the clock-enable format. If either gate[1] or gate[2] is 1, then gclks[2] is 1 independent of the value of clk which satisfies the first condition. Also, if clk is 1, then gclks[2] is 1 independent of the value of gate[1] or gate[2] which satisfies the second condition. Because gclks[2] satisfies both conditions, it is successfully converted to the clock-enable format. Irrespective of the value of gate[3], gclks[3] continues to toggle. The exclusive-OR function causes gclks[3] to fail both conditions which prevents gclks[3] from being converted.
OR gate gclks[2]
Exclusive-OR gate
gclks[3]
[3] D
[3]
[1:3]
dout[1:3]
gclks[3]
dout_1[3]
[2] D Q [2]
[1] [2]
gclks[2]
[1] [2]
gclks[1]
dout_1[1]
LO
6-104
[3] D
[3]
[1:3]
dout[1:3]
gclks[3]
dout_1[3]
[2] D CE Q [2]
After Gated Clock Conversion The clock enables for the AND and OR gates are converted, but the clock enable for the exclusive OR remains the same.
[1] [2]
dout_1[2]
[1] D CE Q [1]
un15_ce
[1] [2]
dout_1[1] ce[1]
For elements that could not be converted, the conversion also lists why the conversion did not occur.
6-105
Example
When Fix Gated Clocks is set to 3 (all sequential elements reported), the report for the logic shown in Correct Logic Format, on page 6-103 would look like this: ================= Gated clock report ================= The following instances have been converted Seq Inst Clock ------------------dout_1[2] clk_c dout_1[1] clk_c =================== The following instances have NOT been converted Seq Inst Clock Reason for not converting ------------------------------------------------------dout_1[3] G_8 Gating structure not compatible =======================================================
user clock the clock defined in the SDC file by the user clock driver the driver to the clock pin of the sequential element
Error Message Added MUX in data path Explanation
The software added a MUX to the gated clock path because the sequential element did not have an equivalent gate with enable. The software encountered a primitive in the gating logic that cannot be handled by gated clock conversion. The software cannot find a syn_gatedclk_data_in and/or syn_gatedclk_data_out property on the sequential instance. LO There is no enable pin on an equivalent sequential element with enable.
Cannot convert primitive instance of the type Cannot find gated clock property Enable pin not found
6-106
Error Message Found combination loop involving the gating logic Found unsupported combinational gate in gating logic Gated clock does not have declared clock, add/enable clock constraint in SDC file Gated clock either has NO DRIVER or has MULTIPLE DRIVERS
Explanation
There is a combinational loop in the gating logic, which prevented gated clock conversion. There is an instance in the gating logic that could not be handled currently by gated clock conversion. The user-defined clock signal is not defined in the SDC file, and this causes the gated clock conversion to fail. The gated clock conversion code cannot determine which clock to use because of one of the following: There is no user clock driving the sequential element through the gating logic. There are multiple user-defined clocks driving the gating logic. The gating logic that corresponds to the sequential element could not be reduced to a form where it satisfies the following three rules needed for gated clock conversion: For certain combinations of the gating signals, the gated clock signal must be capable of being disabled For the remaining combinations of the gating signals, the gated clock signal equals either the clock signal or its inverted value Finally, all gated clock signal transitions can only result from the clock signal transitions, and no enable signal transition can result in a gated clock signal transition The sequential gate does not have a clock pin. The latch is gated by an OR-gate or an OR-gate equivalent and cannot be converted. The library cell has been marked as non sequential, with the property syn_force_seq_prim set to zero. There are multiple user-defined clocks in the gating logic. There is no gating logic (this message is no longer displayed in the gated clock report).
Instance has no clock pin Latch clock driven by an OR gate Library cell is not marked as sequential Multiple declared clocks found No gating logic found
6-107
Error Message Not in chip Property dontfixgatedclock found The width of the input not equal to the width of the output
Explanation
The clock driver is in another FPGA, not in the FPGA in which the sequential element is present. There is a syn_dontfixgatedclock on a sequential instance, which prevented gated clock conversion. There is an input/output data width mismatch on the sequential element. This prevents the software from using a MUX-based feedback loop to enable gated clock conversion. The sequential element does not have an equivalent gate with enable. The software is nable to determine the reason why gated clock conversion is failing. Contact Synplicity Support. There is a user-asserted syn_keep on one of the gates in the gating logic or one of the nets found in the gating logic. This prevented gated clock conversion.
Unknown reason
Verilog
module bbe (ena, clk, data_in, data_out) /* synthesis syn_black_box */ /* synthesis syn_force_seq_prim="clk" */ ; input clk /* synthesis syn_isclock = 1 */ LO /* synthesis syn_gatedclk_clock_en="ena" */; input data_in,ena; output data_out; endmodule
6-108 Fpga User Guide, December 2005
VHDL
library synplify; use synplify.attributes.all; entity bbe is port ( clk : in std_logic; en : in std_logic; data_in : in std_logic; data_out : out std_logic); attribute attribute attribute attribute end bbe; architecture behave of bbe is attribute attribute attribute attribute begin end behave; syn_black_box : boolean; syn_force_seq_prim : string; syn_black_box of behave : architecture is true; syn_force_seq_prim of behave : architecture is "clk"; syn_isclock : boolean; syn_isclock of clk : signal is true; syn_gatedclk_clock_en : string; syn_gatedclk_clock_en of clk : signal is "en";
6-109
If the syn_keep attribute is assigned to a net, the Fix Gated Clocks option
does not preserve this net during optimization. Refer to the third example in The Synplicity Approach to Gated Clocks, on page 6-99.
The Fix Gated Clocks option cannot be implemented for inferred counters
in Altera technologies.
Rgn1
Rgn2
LO
6-110
Generated-Clock Optimization
For Altera and Xilinx families, generated-clock optimization is included with the Fix Gated Clocks option. When the option is enabled, the generated clock logic is replaced with logic that uses the initial clock with an enable. With generated-clock optimization, the original circuit functionality is preserved and performance is improved by reducing clock skew.
e n 1 _ tm p
en2
D [0 ] R
Q [0 ]
e n 2 _ tm p
c lk rst
[1 :0 ]
D [1 :0 ] R
Q [1 :0 ]
1
[1 :0 ]
u 1 .c o u n t[1 :0 ]
u 1 .u n 4 _ c o u n t[1 :0 ]
FDR
Q
FDRE LUT2_4
D C R CE Q
u1.count_i[0]
u1.count[0]
u1.un4_count_axbxc1
en1_tmp_cnv G_2
FDRE
D C R CE Q
en2_tmp_cnv
LO
6-112
Generated-clock optimization is enabled by entering a non-zero value in the Fix Gated Clock Value field in the Device tab of the Options for implementation dialog box. The following table describes the options. Fix Gated Clock Value 0 1 2 3 Description
Disable generated-clock optimization. Perform optimization with no messages. Perform optimization and report unoptimized sequential elements. Perform optimization and report the status of all sequential elements.
When a value of 2 or 3 is entered, the log file includes a generated clock optimization report.
6-113
LO
6-114
CHAPTER 7
Using the Design Planner on page 7-2 Pin Assignments on page 7-6 Working with Regions on page 7-19 Checking Synplify Premier Utilization on page 7-25 Using Process-Level Hierarchy on page 7-25 Bit Slicing on page 7-26 Zippering on page 7-33
You should be familiar with the recommended Synplify Premier design flows and the Design Planner tool to use these design planning tips effectively.
7-1
Creating a Design Plan on page 7-2 Cutting, Copying, and Pasting in the Design Planner on page 7-5
For more information about the Design Planner, see the Synplicity FPGA Synthesis Reference Manual.
If you click No, the Design Planner is displayed. See Figure 7-2 on
page 7-4.
If you click Yes, the Running Estimation dialog pops up in the upper-left
corner of the window displaying the runtime of the job. Once estimation is completed, the Design Planner opens. See Figure 7-1 on page 7-3. Note: The No area estimate warning check box must be selected on the Preferences dialog box to invoke this estimation needed message. Access the Preferences dialog box from the Tools->Design Planner Preferences menu and select the Assignments tab.
LO
7-2
Figure 7-1: Estimation Needed and Running Estimation Dialog Boxes The following figure shows the Design Planner and RTL views.
7-3
Figure 7-2: Design Planner The Synplify Premier Design Planner consists of an RTL view and three subviews:
Design Plan Editor - shows the physical layout of the device and the
placement of the constraints. LO See The Design Planner View on page 2-25 of the Reference Manual for information on the Design Planner user interface.
7-4
Pin Assignments
Pin Assignments
This section discusses the following general guidelines for displaying and assigning pin assignments for design planning:
Methods for Specifying Pin Assignments on page 7-6 Specifying Pins Using the Design Plan Editor on page 7-7 Implementing Pin Assignments on page 7-11 Storing Temporary Pin Assignments on page 7-14 Displaying Rats Nesting on page 7-15 Assigning Clock Pins on page 7-17
Add pins to a constraint (.sdc) file using the SCOPE editor. Convert locked I/O pins to a constraint (.sdc) file using Run->Translate
Constraints in the Project view. See Converting Pin Location Constraint Files in the Synplify Premier Tool on page 3-43 for details.
Using the Design Plan Editor in Design Planner to assign pins. See
Specifying Pins Using the Design Plan Editor on page 7-7 for details.
7-6
Pin Assignments
Figure 7-3: Expanded Pin View - Enabled and Disabled (Altera Device)
7-7
Pin Assignments
Figure 7-4: Adjust Pin View Dialog Box To adjust the pin view:
Click OK to save your new pin view setting or Cancel to restore your
original pin view setting.
In the Design Plan Hierarchy Browser, select the expand icon next to
Pins to display all the available I/O pins. When you select a pin in the Design Plan Hierarchy Browser, its corresponding pin location is highlighted in the Design Plan Editor.
In the Design Plan Hierarchy Browser, select the Pins folder to list the
pins in the Design Plan view. When you select a pin in the Design Plan view, its corresponding pin location is highlighted in the Design Plan Editor.
In the Design Plan view, right-click and select Show/Hide columns, then
select the columns (Clock, Name, Side, Seq, Dir, or Port/Net) to display from the Select Columns dialog box. LO
7-8
Pin Assignments
Figure 7-5: Show/Hide Columns for I/O Pins in the Design Plan View
In the Design Plan Editor, the pin number is displayed when you
place the cursor over an I/O pin location. The following figure shows an example of I/O pins displayed for an Altera device in all three views of the Design Planner.
Design Plan Hierarchy Browser Design Plan View Design Plan Editor
7-9
Pin Assignments
Figure 7-7: Import Pin Information Dialog Box 2. Select either an Altera.pin or a Xilinx .pad file and click Open. The imported pin assignments are displayed and highlighted in the Design Planner view.
The .sdc file might contain I/O pin locks that conflict with the pin locks
specified in the .sfp file. Note: The SCOPE constraintLO (.sdc) typically takes precedence over file the Design Plan file (.sfp) when conflicts exist after pin assign-
7-10
Pin Assignments
ments. It is highly recommended you avoid creating these mismatches in the .sdc and .sfp files.
If pin locks are specified using the back end place-and-route tool that
are added into the .sfp file, potential pin lock conflicts may occur. When conflicts exist, an appropriate warning message appears in the .srr log file and is displayed in the Messages window.
Figure 7-8: Drag a Port to a Pin Location in the Design Plan Editor
7-11
Pin Assignments
Once the pin is assigned, you can reassign its location in the Design Plan Editor by dragging and dropping it to another pin location.
Figure 7-9: Drag a Bus Port to a Pin Location in the Design Plan Editor Pins located on the left and right sides of the device are allocated from bottom to top. Pins located on the top and bottom of the device are allocated from left to right. Pins that are occupied will be skipped. All devices allocate pins using this convention.
LO
7-12
Pin Assignments
In the Design Plan view, assigned I/O pins display pin directions and the port or net assignments. If these columns are not visible, right-click in the Design Plan view and select Show/Hide columns.
In the RTL view, assigned ports appear blue. When your cursor is above the assigned port, a tool tip appears showing the pin assignment information.
7-13
Pin Assignments
Note: You can also drag the port from the HDL Analyst->RTL view and drop it to the pin location in either the Hierarchy Browser, or else, the Design Plan view of the Synplify Premier Design Planner.
You can drag and drop pin assignments from the Design Plan Editor to
Temporary Assigns. However, you cannot drag and drop assignments from the HDL Analyst RTL view to Temporary Assigns.
You can drag and drop pin assignments from the Temporary Assigns
container to the new pin or region location in the Design Plan Editor.
Select the assignment in the Temporary Assigns. Then, right-click and select Reassign from the pop-up menu. To empty the Temporary LO Assigns container: Select the Temporary Assigns icon. Then, right-click and select Empty from the menu.
7-14 Fpga User Guide, December 2005
Pin Assignments
Click on the Column heading in the Design Plan View to sort. You can Edit->Undo or Edit->Redo operations in the Temporary Assigns
container.
To enable rats nesting for all regions of a design, right-click in the Design
Plan Editor and select Rats Nest->Show from the pop-up menu.
To enable rats nesting for a region, select a region and right-click in the
Design Plan Editor. Select Rats Nest->Show Selected from the menu
To disable rats nesting, right-click in the Design Plan Editor and select
Rats Nest->Hide.
7-15
Pin Assignments
You can also select View->Rats Nest from the Project menu, then choose the Show, Hide, or Show Selected command.
In the Design Plan Hierarchy Browser, right click on the Pins folder and
select Properties from the pop-up menu. The Properties dialog box shows the total number of pins, the number of assigned pins, and the percentage of pins assigned.
When you select assigned port(s) in the HDL Analyst RTL view, their
corresponding pin(s) are highlighted in the Synplify Premier Design Planner views. Likewise, you can also select assigned pin(s) from any Design Planner view and their corresponding port(s) will be highlighted in the HDL Analyst RTL view. Note: You can also crossprobe ports from the HDL Analyst RTL view to their pin assignments in the Hierarchy Browser and Design Plan views. LO
When you select an internal net with a pin assignment from the HDL
Analyst RTL view, its corresponding pin will be highlighted in the
7-16
Pin Assignments
Synplify Premier Design Planner views. Likewise, you can also select this assigned pin from any Design Planner view, and its corresponding internal net will be highlighted in the HDL Analyst RTL view.
Clock pins are available for Altera and Xilinx devices. Clock pins are displayed in the color green to differentiate them from
signal I/O pins in the Design Plan Editor.
You can drag and drop a signal pin to a clock pin. When you do so, a
message asks you to confirm the assignment to ensure that the correct signal gets assigned to the clock pin.
You cannot drag and drop a bus (group of signals) to a clock pin. You can drag and drop a bus to an I/O pin near a clock pin(s). The clock
pin(s) will be skipped when assigning this bus to the I/O pins. Refer to Specifying Pins Using the Design Plan Editor on page 7-7 for information about how to use the Synplify Premier Design Planner pin assignment capabilities. In the Design Planner, you can similarly assign clock pins as you do I/O pins. The color of the pin changes after you assign a clock pin. In the Design Plan view, you can enable or disable the Clock column on the Select Columns dialog box which displays whether or not a pin is a clock (Yes or No). See the following figure.
7-17
Pin Assignments
Clock Pins
Figure 7-12: Design Plan Editor Showing Clock Pins (Xilinx Device)
LO
7-18
Viewing Intellectual Property (IP) Core Areas on page 7-19 Placing Regions on page 7-20 Moving and Sizing Regions on page 7-21 Replicating Logic Manually on page 7-23 Assigning Register to Pin-Locked I/O Paths to Regions on page 7-24 Checking Synplify Premier Utilization on page 7-25
IP core areas are available on Xilinx Virtex-II Pro (Virtex2p - Implementation options name) devices.
A tool tip is displayed when the cursor is placed over an IP core area in
the Design Plan Editor.
7-19
IP Core
For more information on IPs, see Handling Xilinx IPs (Design Planner) on page 9-35.
Placing Regions
Where you place a region is dependent on how the data flows in your design and where the pins are locked. For Altera, you can determine where the target place-and-route tool places the critical path after you run with no constraints. Determine where the critical path is placed using the Design Plan Editor. This can be a good starting place for you to determine what row to begin with when placing the critical path on the logic device using the Synplify Premier Design Planner tool. For Xilinx, the size and location of a region can be easily modified, so a rough estimate of the region is usually sufficient. However, a starting point for determining where to place the region is to gather information from the Xilinx floorplanner. Run placement and routing without constraints, then use the floorplanner to determine where the critical path logic is placed. From this LO information, you can begin by creating the region in the same general area on the logic device using the Design Planner tool.
7-20
For Altera, you can also overlap regions. When overlapping regions, be aware that the Synplify Premier Design Planner software treats overlapping regions no differently than regions that do not overlap. For Xilinx, it is not recommended that you overlap regions for some designs. The Xilinx place-and-route tool cannot always place these designs, and therefore, can potentially create an error. But keep in mind, Synplify Premier Design Planner software can still support regions that overlap.
WYSIWYG region boundaries Cursor arrow keys region manipulation Preserving logic and memory resources WYSIWYG Region Boundaries
The Design Planner tool shows you region boundaries when a create, move, or resize region operation is performed. Region boundaries are adjusted to fit around logic and memory contained in the region.
Moving Regions
You can move regions using either the cursor arrow keys or the mouse button.
7-21
Resizing Regions
You can resize regions using either the cursor arrow keys or the mouse button. To resize a region:
7-22
Note: Logic and memory resources are not preserved when you resize a region, using either the cursor arrow keys or the mouse button.
7-23
LO
7-24
Device Utilization
Device utilization above 90% can lead to longer timing closure. If your design uses over 90% of the device and if the design contains several finite state machines, try using the sequential encoding style, (instead of one-hot) to possibly provide more space on the device.
Region Utilization
Area utilization of a region should not be more than 80% to allow for Synplify Premier Design Planner area estimations and for any additional room required for routing and replicating. The place-and-route tools consider the design plan to be a hard constraint, so if there is not enough area in the region for the routing process, the place-and-route tool will error out. Make sure the utilization estimates are up-to-date (using Run->Estimate Area in the Project view and right-click->Estimate Regions after making any changes to the design plan) and that utilization does not exceed 80% before going on to the placement and routing phase. After synthesis, you can also check the utilization in the .srr file to get a better estimate for the design.
7-25
Bit Slicing
Process-level hierarchy is turned off by default in the Synplify Premier UI. The mapper is intended to treat designs with and without process-level hierarchy the same way. However, the presence of process-level hierarchy changes names of instances extensively and this affects the mappers as well as the back end place-and-route tools.
Bit Slicing
The following topics describe bit slicing in the Synplify Premier tool.
About Bit Slicing on page 7-26 Using Bit Slicing on page 7-26 Bit Slice Examples on page 7-29 Bit Slicing Guidelines on page 7-32
LO
7-26
Bit Slicing
1. In the Synplify Premier project window, open a new (File->New->Netlist Restructure File) or existing .nrf file, then click on the Bit Slices tab.
Figure 7-14: Bit Slicing 2. Type in or drag and drop the instance to slice from the RTL view onto this tab. To slice an instance by a specified number of bits per slice or by a specified number of slices: 1. Enter a value for Bits per Slice or Slices clicking the corresponding button and entering a value in the adjacent field. If you enter a Bits per Slice value, an instance is allocated for each group of bits with any remaining bits allocated to the last instance. When using a Slices value, the bits are divided equally among the specified number of instances with the last instance assigned any partial number. 2. Save the file. 3. Close the RTL view and redisplay the Project view. The netlist restructure folder displays in the Project view. 4. Display the Options for Implementation dialog box (click Impl Options or select Project->Implementation Options) and click on the Netlist Restructure tab. Make sure that the netlist restructure file that you just created is checked in the Netlist Restructure Files section, and click OK. 5. Select Run->Compile Only (F7) to run netlist restructuring on your design. The sections of the sliced element are displayed and can now be individually assigned.
7-27
Bit Slicing
Custom Slicing
A custom slice setting is available for defining slices of varying widths. To use the custom setting: 1. Click on the Custom button. This enables the MSB/LSB table. 2. Select the entry in the table, then click on the Slice button. This displays the Select New Slice MSB.
Figure 7-15: Select New Slice MSB 3. Either click OK to slice the number of bits into two or enter the starting MSB for the second (least significant) slice. 4. Continue to select entries in the table and click Slice to redisplay the Select New Slice MSB popup menu (see Slicing into Predefined Primitives on page 7-30). 5. Save the file. 6. Close the RTL view and redisplay the Project view. 7. Display the Options for Implementation dialog box (click Impl Options or select Project->Implementation Options) and select the Netlist Restructure tab. Make sure that the netlist restructure file is checked. 8. Recompile the design. The sections of the sliced element can be individually assigned. LO
7-28
Bit Slicing
Slice all instances of this typeglobal application of the bit slice definition to
all same-type instances in the netlist Note: If you use zippering on a module before bit slicing a primitive within the module, the post zippering name of the module instance must be used in the bit slicing command. For example, after using zippering on a module, run Compile Only (F7) and open the RTL view to get the new module instance name. Drag and drop the element to be bit sliced from the new RTL view.
7-29
Bit Slicing
Figure 7-17: Setting the Bits per Slice The Bits per Slice setting divides the output of the y[95:0] primitive into three individual primitives. The first two primitives each contain the requested 36 bits; the last primitive contains the remaining 24 bits (y[95:72]). The RTL Device view for this bit slicing example is shown in the following figure.
7-30
Bit Slicing
Figure 7-19: Setting the Bits per Slice Clicking the Slice button prompts you to accept the displayed MSB for the new (next) slice or to enter another MSB for the slice.
Figure 7-20: Creating the First Slice For this example, click OK to create an initial bit slice of 48. The upper limit of the bit range is always one less than the previously assigned MSB so that each slice is at least one bit wide. When you click OK, the table is updated and the Slice button is again enabled. Select the second entry in the table and click Slice. You are again prompted to accept the displayed MSB for the new slice or to enter another MSB for the slice. Enter 15 (the MSB for the third slice) and click OK. The table is updated as shown in the following figure.
7-31
Bit Slicing
You can merge two (or more) adjacent slice definitions in the table by selecting the entries with the Ctrl key and clicking Join. Using this feature allows you to essentially undo an entry with an incorrect width. Save the .nrf file, make sure that the filename is checked on the Netlist Restructure tab, and run Compile Only (press F7) on the design. The RTL Device view for this bit slicing example is shown in the following figure.
LO See slice_primitive in the Tcl Commands and Scripts chapter of the Synplicity FPGA Reference Manual for information on using the bit-slicing command in a .nrf file or in a .tcl script.
7-32
Zippering
Zippering
You can use zippering whenever a logic block is too large to fit into a region. Zippering allows you to break up a block into a number of smaller instances where each can be placed into separate regions, as appropriate. This help section consists of the following Zippering topics:
Using Zippering Analyzing a Design for Zippering Zippering Example Zippering Guidelines
Zippering works by allowing the outputs of a block to be divided into groups. Once divided, a cone-of-logic is traced down through the hierarchy to the input pins to create instances containing only the requisite logic. While calculating the cone of logic, logic replication occurs based on the number of inputs in the cone. The individual instances can then be assigned to different regions.
Using Zippering
Use the zipper_inst_hier command in the .nrf or .tcl file to define where to logically divide a module by identifying groups of output signals. Zippering references the file and uses the netlist filter to control the logical division of the module. A graphical user interface simplifies the creation and editing of .nrf files (existing .tcl files can be used directly or renamed with a .nrf extension for viewing in the graphical user interface). To use the Project environment for zippering: 1. In the Synplify Premier project view, create a new file (File->New->Netlist Restructure File) or existing .nrf file, then click on the Zippering tab.
7-33
Zippering
Figure 7-23: Zippering 2. Drag and drop the block to be zippered from the RTL view to the UI. 3. Click on the + sign to expand the Group 0. This displays the output nets. 4. Click on Add Group to add an empty group to the Pin Groups window. If necessary, continue to click on Add Group to add additional groups (each group defined represents a zippered section). 5. Click on a net in group 0 and drag the net to the new group. You can use the Ctrl and Shift keys to select more that one net.
LO
Zippering
6. Continue to arrange the groups by dragging nets to the individual groups. Note that you can slice a net (see Slicing a Bus Net on page 7-35) by selecting the net and clicking Slice Pin. 7. When all of the nets are arranged in groups, save the file. 8. Close the RTL view and redisplay the Project view. 9. Display the Options for Implementation dialog box (click Impl Options or select Project->Implementation Options) and select the Netlist Restructure tab. Make sure that the netlist restructure file is checked. 10. Run Compile Only (F7) on your design with the netlist restructure file and open the partition. The sections of the zippered element can be individually assigned. 11. The additional logic replication performed during zippering increases the total area of the design. To update area estimates, run area estimation (press F9) after zippering. Take care when using zippering since non-optimal zippering can cause extensive replication which can significantly increase design size.
7-35
Zippering
3. Click OK to create a slice equal to half the width of the initial bus net or enter an MSB for the new (second) slice and click OK. The upper limit of the bit range displayed is always one less than the MSB of the parent slice so that each slice is at least one bit wide. If you split a bus net incorrectly, you can essentially undo the split by selecting the nets using the Ctrl or Shift key and clicking Join Pins.
Figure 7-26: RTL View of top_inst Hierarchical Block The hierarchical block in Figure 7-26 requires 325 I/O pins including 256 output pins for the eight output buses and 69 input pins. In a design, the number of I/O pins required for this block may be too large to fit into one region. Looking down a level into the blocks hierarchy (see Figure 7-27 on page 7-37), if you were to logically divide the block into two instances as shown by the broken line, each instance would require a smaller number of output pins for the split buses and some number of input pins with some LO redundancy (common logic). These two instances could then be assigned to different regions.
7-36
Zippering
With zippering, you only need to specify the outputs and corresponding instance. The cone of logic is used to trace outputs back to their inputs and only logic necessary to control the specified outputs is included.
Common Logic
Zippering Example
The following example illustrates zippering a 256-output block shown in Figure 7-27 on page 7-37 into two instances. In this example, the outputs from module top_inst are divided between two instances: out1, out2, out3, and out4 in one instance and out5, out6, out7, and out8 in the other instance. To zipper the example design: 1. Open a new or existing .nrf. 2. Drag and drop top_inst from the RTL view to the UI. 3. Click on the + sign to Expand Group 0 in the Pin Groups window.
7-37
Zippering
Figure 7-28: Expand Group 0 4. Click Add Group to add an empty group to the Pin Groups window as shown in the following figure.
Figure 7-29: Add a Second Group 5. Select net out5[31:0] in Group 0 and drag it to Group 1. Expand Group 1 (click the + sign) to show the new assignment. 6. In order, drag and drop nets out6[31:0], out7[31:0], and out8[31:0] from Group 0 to Group 1. The groups are shown in the following figure.
LO
7-38
Zippering
Figure 7-30: Defining the Groups 7. Save the file. 8. Close the RTL view and redisplay the Project view. 9. Display the Options for Implementation dialog box (click Impl Options or select Project->Implementation Options) and select the Netlist Restructure tab. Make sure that the netlist restructure file is checked. 10. Run Compile Only (F7) on the design.
7-39
Zippering
Figure 7-31: Zippered Module As shown in Figure 7-31, the original block is split into two instances. The first instance is named top_inst_0.1_1 and contains the out5 through out8 buses, and the second instance is named top_inst_0.1_0 and contains the out1 through out4 buses. Looking at the I/O pin requirements, the first instance requires 153 I/O pins, and the second instance requires 197 I/O pins.
LO
7-40
Zippering
Zippering Guidelines
For zippering:
You can combine zippering and bit slicing in a single .nrf. Bit slicing
commands are automatically placed ahead of the zippering commands in the file so that as the file is read, line-by-line, all of the primitives are sliced before any outputs are zippered.
If you zipper a block before bit slicing a primitive in the block, the post
zippering name of the instance must be used in the bit slicing command. For example, after zippering a block, run Compile Only (F7), open the RTL view, and push down into the new hierarchical block containing the primitive. Drag and drop the primitive to bit slice onto the Bit Slices tab of the UI.
Zippering can be done at any level in the hierarchy above the leaf level;
the full hierarchical instance name must be specified.
After zippering, individual instances may not include all of the contents
of the original instance.
Zippering through an existing .tcl file is supported; add the .tcl file
with the Add File button or select the Netlist Restructure tab of the Option for Implementation dialog box and click Add Restructure File.
Hierarchical instances cannot be used when the Zipper all instances of this
type box is checked (or the -nl option is used with the zipper_inst_hier command).
7-41
Zippering
LO
7-42
CHAPTER 8
Vendor-Specific Optimizations
This chapter covers techniques for optimizing your design for various vendors. The information in this chapter is intended to be used together with the information in Chapter 6, Design Optimization. This chapter describes the following:
Passing Information to the P&R Tools, on page 8-2 Generating Vendor-Specific Output, on page 8-6 Working with Actel Designs, on page 8-8 Working with Altera Designs, on page 8-11 Working with Lattice Designs, on page 8-23 Working with Xilinx Designs, on page 8-28
8-1
Specifying Pin Locations, on page 8-2 Specifying Locations for Actel Bus Ports, on page 8-3 Specifying Macro and Register Placement, on page 8-3 Passing Technology Properties, on page 8-4 Specifying Padtype and Port Information, on page 8-5
To add the attribute from the SCOPE interface, click the Attributes tab
and specify the appropriate attribute and value.
To add the attribute in the source files, use the appropriate attribute
and syntax. See the Reference Manual for syntax details. Family Attribute and Value LO Actel (except 500K and PA) alspin {pin_number}
Altera APEX
altera_chip_pin_lc {pin_number}
8-2
altera_chip_pin_lc {@pin_number} loc {pin_number} ql_placement {pin_number} xc_loc {pin_number}. See Controlling Placement with RLOCs, on page 8-35 for details about relative placement.
For...
Relative placement of Actel macros and IP blocks Placement of Lattice ORCA input or output registers next to I/O pads
Use...
alsloc Attribute
LO
8-4
Vendor
8-5
Targeting Output to Your Vendor, on page 8-6 Customizing Netlist Formats, on page 8-7
Output Netlist
EDIF (.edn) *_sdc.sdc EDIF (.edf) AHDL (.tdf) Verilog (.vqm)
P&R Tool
Designer Series MAX+PLUSII or Quartus II Quartus II
EDIF (.edf) AHDL (.tdf) EDIF (.edf) VHDL (.vhn) EDIF (.edf)
EDIF (.edn)
8-6
Vendor
QuickLogic Xilinx CoolRunner Xilinx Spartan and XC4000, XC4500, etc. Xilinx Virtex and Spartan-3
Output Netlist
EDIF (.qdf or .edf) EDIF (.edf) or .src EDIF (.edf )or XNF (.xnf) EDIF (.edf)
P&R Tool
SpDE Web Fitter for EDIF files, Minc for *.src files Design Manager or ISE Project Navigator Design Manager or ISE Project Navigator
3. To generate mapped Verilog/VHDL netlists and constraint files, check the appropriate boxes and click OK. See Specifying Result Options, on page 3-9 for details about setting the option. For more information about constraint file output formats and how constraints get forward-annotated, see Generating Constraint Files for Forward Annotation, on page 3-64.
Use...
syn_netlist_hierarchy Attribute (Altera, Xilinx, Actel)
8-7
Using Predefined Actel Black Boxes, on page 8-8 Using ACTGen Macros, on page 8-9 Working with Radhard Designs, on page 8-10
For additional Actel-specific information, see Passing Information to the P&R Tools, on page 8-2 and Generating Vendor-Specific Output, on page 8-6.
Use the macro file that corresponds to your target architecture. If you are targeting the 1200XL architecture, use the act2.v or act2.vhd macro library. 2. Add the Actel macro library at the top of the source file list for your synthesis project. Make sure that the library file is first in the list. 3. For VHDL, also add theLO appropriate library and use clauses to the top of the files that instantiate the macros:
8-8
library family ; use family.components.all ; Specify the appropriate technology in family; for example, act3.
Edit the ACTgen VHDL file, and add the appropriate library clause at
the top of the file: library family ; use family.components.all
Include the appropriate Actel macro library file for your target
architecture in your the source files list for your project.
Include the Verilog version of the ACTgen result in your source file
list. Make sure that the Actel macro library is first in the source files list, followed by the ACTgen Verilog files, followed by the other source files. 5. Synthesize your design as usual.
8-9
Set the value in the source file for the module. The following sets all
registers of module_b to cc: VHDL library synplify; use synplify.attributes.all; attribute syn_radhardlevel of behav: architecture is cc; Verilog module module_b (a, b, sub, clk, rst) /*synthesis syn_radhardlevel=cc*/;
Make sure that the corresponding Actel macro file (see step 1) is the
first file listed in the project. 3. To set a syn_radhardlevel value on a per register basis, set it in the source file. You can use a register-level attribute to override a default value with another value, or set it to a value of none, so that the global default value LO is not applied to the register.
8-10
To set the value in the source file, add the attribute to the register. For
example, to set the value of register bl_int to tmr_cc, enter the following in the module source file: VHDL library synplify; use synplify.attributes.all; attribute syn_radhardlevel of bl_int: signal is tmr_cc Verilog reg [15:0] a1_int, b1_int /*synthesis syn_radhardlevel = tmr_cc*/;
APEX Design Tips, next FLEX Design Tips, on page 8-12 Determining ROM Implementation, on page 8-12 Working with Altera EABs and ESBs, on page 8-14 Working with Altera PLLs, on page 8-15 Implementing Megafunctions with Clearbox, on page 8-16 Packing I/O Cell Registers, on page 8-18 Using LPMs in Simulation Flows, on page 8-20 Working with Quartus II, on page 8-22
In addition, you can use the techniques described in these other topics, which apply to other vendors as well as Altera:
Defining Black Boxes for Synthesis, on page 6-30 Inferring RAMs, on page 6-54 Inferring Shift Registers, on page 6-80
Fpga User Guide, December 2005 8-11
Working with LPMs, on page 6-87 Passing Information to the P&R Tools, on page 8-2 Generating Vendor-Specific Output, on page 8-6
Set the option to map to ATOM primitives. When the software maps
elements to ATOM primitives, the Quartus tool can skip synthesis, thus reducing run time. The pin assignments, part information, and cliquing information are forward-annotated to Quartus.
If you have a large design and need to conserve flip-flops, pack the registers into Apex I/O cells. See Packing I/O Cell Registers, on page 8-18 for more information.
Set the value of the attribute to block_ROM. You can set the attribute
in the source code, the SCOPE interface, or directly in the constraint
8-12 Fpga User Guide, December 2005
file. See Adding Attributes and Directives, on page 3-66 for information. Format
Verilog VHDL
Example reg [3:0] z /* synthesis syn_romstyle=block_rom */; signal z : std_logic_vector(3 downto 0); attribute syn_romstyle : string; attribute syn_romstyle of z : signal is block_rom; define_attribute {z_20[3:0]} syn_romstyle {block_rom}
Run synthesis.
The software implements all small ROMs (less than seven address bits) as logic. It implements the larger ROM structures as extended system blocks (ESBs) in APEX designs and extended array blocks (EABs) in FLEX designs. If you have to conserve ROM resources, you can turn off ROM implementation globally with the altera_auto_use_esb and altera_auto_use_eab attributes, and then specify the ROMs you want implemented as block ROMs with the syn_romstyle attribute. 2. To implement the ROM structure as discrete logic, do the following:
Apply the syn_romstyle attribute to the signal output value. Set the value of the attribute to logic.
Format
Verilog VHDL
Example reg [3:0] z /* synthesis syn_romstyle=logic */; signal z : std_logic_vector(3 downto 0); attribute syn_romstyle : string; attribute syn_romstyle of z : signal is logic; define_attribute {z_20[3:0]} syn_romstyle {logic}
8-13
Run synthesis.
The software implements all small ROMs (less than seven address bits) and all other ROMs with this attribute as discrete logic primitives instead of blocks. 3. To view the ROM in your design, do the following:
Open the RTL view of the design. Find the ROM block and push into it. A text window opens and
displays the ROM table view of the data in the block.
Attach the altera_implement_in_esb attribute to the component. Set the value to true.
When this attribute is set, the software implements the logic as a PTERM in an extended system block. 3. Run synthesis. For FLEX10KE, APEX20K, and 20KE designs, the software generates Altera-specific single or dual-port RAMs with asynchronous READs. When source code is written as a single port RAM, the software implements it as a dual-port RAM with single port RAM functionality, using the LPM_RAM_DQ:ALTDPRAM primitive.
LO
8-14
8-15
7. Set the target technology and the Quartus version (Implementation Options > Implementation Results), and synthesize as usual. The software uses the altpll component information and the constraints to synthesize. The synthesis software forward-annotates the PLL input constraints.
8-16
The VHDL file generated by Megawizard uses the stratix.vhd declaration. Because of ongoing modifications in Quartus, you might need component declarations that match particular versions of Quartus. These component declarations are packaged with the software in the lib/altera directory and are named for the technology and Quartus version. For example, stratix_41.vhd corresponds to Quartus 4.1. 3. Instantiate the modules in your design. 4. Add the Verilog/VHDL files to your project.
If you are using Verilog, make sure to include the stratix.v file from
the lib/altera directory. Make sure to use the version that matches the version of Quartus you are going to use. For example, if you are using Quartus 4.1, make sure you use the stratix_41.v file. This file contains the port and parameter definitions of the Clearbox primitives. It is not automatically included because Verilog does not support library statements. 5. Click Implementation Options, set the implementation options, and synthesize the design.
On the Device tab, set the target technology to Stratix, Stratix II,
Cyclone, or Cyclone II.
8-17
The .vqm file generated for Quartus after synthesis only contains the Clearbox module, and does not write out the internals of the module. 6. Before you run Quartus, put all these files in the same result directory:
The .vqm file generated after synthesis, which only contains the toplevel module.
8-18
1. To pack the registers globally, set syn_useioff=1 on the top level module or architecture. Specify the attribute in the source code, the SCOPE interface, or directly in the constraint file. Format
Verilog VHDL
Example module test(d, clk, q) /* synthesis syn_useioff=1 */; architecture rtl of test is attribute syn_useioff : boolean; attribute syn_useioff of rtl : architecture is true; define_global_attribute syn_useioff 1
Example module test(d, clk, q); input [3:0] d; input clk; output [3:0] q /* synthesis syn_useioff=1 */; reg q; entity test is port (d : in std_logic_vector (3 downto 0); clk : in std_logic; q : out std_logc_vector (3 downto 0); attribute syn_useioff : boolean; attribute syn_useioff of q : signal is true; end test; define_attribute {p:q[3:0]} syn_useioff 1
VHDL
The software packs registers with asynchronous clear pins and asynchronous preset pins for APEX20KE I/O cells. The software can infer the I/O cell if you have a preset or clear, and an embedded flip-flop in the I/O cell.
8-19
Simulation Flows
The simulation flows vary, depending on the method used to instantiate the LPMs. For information about instantiating the LPMs, see Instantiating LPMs Using VHDL Prepared Components, on page 6-94, Instantiating LPMs as Black Boxes (Altera), on page 6-88, and Instantiating LPMs Using a Verilog Library (Altera), on page 6-97. The following table summarizes the differences between the flows: Black Box Flow
Applies to any LPM Synthesis LPM timing support Synthesis procedure RTL simulation Post-synthesis (.vm) simulation Post- P&R (.vo) simulation Software version Yes No Many steps Complicated steps Yes Yes Any version Max+PlusII Quartus II 1.0 or earlier
8-20
Test bench The design (RTL, post-synthesis .vm file, or the post-P&R .vo file) The .v file you generated in the previous step
3. Compile the LPM megafunction simulation model: 220model.v or altera_mf.v. 4. For .vm or .vo simulation, compile the primitive simulation model. For example apex20Ke_atoms.v. 5. Simulate the design.
8-21
Set options by selecting Set Option. You can configure options like
cliquing and black boxes. The Quartus II software opens. The synthesized Verilog netlist, forward annotated timing constraints, and pin assignments are placed in a named Quartus project
Start Quartus II. Select <project_name>_cons.tcl from the Run Tcl Script menu.
LO The software uses the synthesis results to run Quartus II.
8-22
Instantiating Lattice Macros, on page 8-23 Using Lattice GSR Resources, on page 8-24 Inferring Carry Chains in Lattice XPLD Devices, on page 8-25 Controlling I/O Insertion in Lattice Designs, on page 8-25 Forward-Annotating Lattice ORCA Constraints, on page 8-26
For additional information about working with Lattice designs, see Passing Information to the P&R Tools, on page 8-2 and Generating Vendor-Specific Output, on page 8-6.
synplify_install_dir/lib/lucent/orca*.v Replace the asterisk with either 2, 3, or 4, according to the Orca series you are using synplify_install_dir/lib/lattice/lava1.v synplify_install_dir/lib/lucent/ecp.v synplify_install_dir/lib/cpld/lattice.v
8-23
2. To use a VHDL macro library, add the appropriate library and use clauses to your VHDL source code at the beginning of the design units that instantiate the macros. You only need the VHDL macro libraries for simulation, but it is good practice to add them to the code. The library names may vary, depending on the map file name, which is often user-defined. The simulator uses the map file names to point to a library.
CPLD Devices Orca Devices
library lava; use lava.components.all; library ec; use ec.components.all; library ecp; use ecp.components.all;
3. Instantiate the macros from the library as described in Instantiating Black Boxes and I/Os in Verilog, on page 6-30 and Instantiating Black Boxes and I/Os in VHDL, on page 6-32.
When you set this option, the synthesis software creates a GSR instance to access the resource. It uses the GSR resource for reset signals, instead of general routing. All registers are reset. when the GSR is activated, even if some flip-flops do not have a reset.
If a global set/reset does not correctly initialize the design, turn off
the option. Select Project ->Implementation Options and disable the Force GSR Usage option on the Device tab. When this option is off, the software does not use the GSR resource unless all flip-flops have resets, and all resets use the same signal. 2. To optimize area, set the Resource Sharing option, as described in Sharing Resources, on page 6-5. 3. To check resource usage, do the following:
Synthesize the design. Select View Log and check the Resource Usage section. For ORCA
families, you can compare the LUTs in the synthesis usage report to the occupied PFUs (function units) in the report generated after placement and routing. Each PFU consists of four 4-input LUTs and four registers. An occupied PFU means that least one LUT or register was used.
8-25
If you do not want to insert any I/O pads in the design, enable Disable
I/O Insertion Do this if you want to check the area your blocks of logic take up, before you synthesize an entire FPGA. If you disable automatic I/O insertion, you do not get any I/O pads in your design, unless you manually instantiate them.
If you want to insert I/O pads, disable the Disable I/O Insertion option.
When this option is set, the software inserts I/O pads for inputs, outputs, and bidirectionals in the output netlist. Once inserted, you can override the I/O pad inserted by directly instantiating another I/O pad. 2. To force I/O pads to be inserted for input ports that do not drive logic, follow the steps below.
To force I/O pad insertion at the module level, set the syn_force_pad
attribute on the module. Set the attribute value to 1. To disable I/O pad insertion at the module level, set the syn_force_pad attribute for the module to 0.
8-26
Click the Multi-Cycle Paths tab. Depending on the type of constraint you
want to set, select or type the instance name under the To, From or Through column. Next, set the number of clock cycles under the Cycles column. When you set this constraint, the software runs timing-driven synthesis and then forward-annotates the constraint.
Click the False Paths panel. Depending on the type of constraint you
want to set, select or type the instance name under the To, From or Through column. When you set this constraint, the software runs timing-driven synthesis and then forward-annotates the constraint.
When you set this constraint from the Other tab, the software forwardannotates the constraint, but does not run timing-driven synthesis using this constraint. 3. Select Project->Implementation Options and enable the Write Vendor Constraint File option on the Implementation Results tab. 4. Run your design. The Synplify synthesis tool creates a .prf file in the same directory as your result files.
8-27
5. Start the Lattice ispLEVER place-and-route tool and run the Map stage. The place-and-route software includes the constraints from the synthesis .prf file when it generates another .prf file after mapping. 6. Run the PAR and BIT stages in ispLEVER.
Designing for Xilinx Architectures, next Instantiating CoreGen Cores, on page 8-29 Packing Registers for I/Os, on page 8-33 Controlling Placement with RLOCs, on page 8-35 Using Clock Buffers in Virtex Designs, on page 8-36 Reoptimizing With EDIF Files, on page 8-39 Instantiating Special I/O Standard Buffers for Virtex, on page 8-38
For additional Xilinx-specific techniques, see The Xilinx MultiPoint Synthesis Flow, on page 10-48, Using the Xilinx Modular Flow, on page 10-54, Working with Gated Clocks, on page 6-99, Inferring RAMs, on page 6-54, and Inferring Shift Registers, on page 6-80. Note that some of these features are not available in the Synplify product.
For critical paths, attach the xc_fast attribute to the I/Os. To ensure that frequency constraints from register to output pads are LO
forward annotated to the P&R tools, add default input_delay and output_delay constraints of 0.0 in the synthesis tool. The synthesis tool forward-annotates the frequency constraints as PERIOD constraints
8-28
(register-to-register) and OFFSET constraints (input-to-register and register-to-output). The place-and-route tools use these constraints.
Use the Xilinx CORE generator to create structural EDIF netlists. For
legacy cores, generate a single flat .edf netlist file. For newer cores, generate a top-level flat .edf netlist file that instantiates .ndf files for each hierarchical level in the design.
In the synthesis software, add the generated files (.edf only for legacy
cores; .edf and .ndf for newer cores) to your project.
Fpga User Guide, December 2005 8-29
4. Instantiate the black box in the module or architecture. ram64x8 r1(din, addr, we, clk, dout); 5. Synthesize the design. If you supplied structural EDIF netlists, the software optimizes the design based on the information in the structural netlists. The generated reports contain the optimization information .
BUFG
FF
PCI_LC_I
PING64
BUFG I/O
FF
FF I/O
LO
8-30
Bottom-Up Method
The bottom-up method synthesizes lower-level modules first. The synthesized modules are then treated as black boxes and synthesized at the next level. The following procedure refers to the figure shown above. 1. Synthesize the user-defined application (PING64) by itself.
Make sure that the Disable I/O Insertion option is on. Specify the syn_edif_bit_format = %u<%i> and
syn_edif_scalar_format = %u attributes. This ensure that the EDIF bus names match the Xilinx upper-case, angle bracket style bus names and the Xilinx upper-case net names, respectively. The software generates an EDIF file for this module. 2. Synthesize the top-level module that contains the PCI core, with the Disable I/O Insertion option enabled and the EDIF naming attributes described in the previous step. Use the following files to synthesize:
The top-level module (PCIM_LC) file, with the PCI core (PCI_LC_I)
declared as a black box with the syn_black_box attribute.
A black box file for the core (PCI_LC_I), that only contains information
about the PCI core ports. This file is the source file that is generated for simulation, not the .ngo file.
The source file for CFG. A black box file for PING64. A black box file for PCIM_LC. A top-level file that contains black box declarations for PING64 and PCIM_LC.
8-31
4. Place and route using the Xilinx .ngo file for the core, and the three EDIF files generated from synthesis: one for each of the modules PING64 and PCIM_LC, and the top-level EDIF file. Select the top-level EDIF file when you run place-and-route.
Top-down Methodology
The top-down method instantiates user application blocks and synthesizes all the source files in one synthesis run. This method can result in a smaller, faster design than with the bottom-up method, because the tool can do crossboundary optimizations. The following procedure refers to the design shown in the previous figure. 1. Create your own configuration file for your application model (CFG). 2. Edit the top-level source file to do the following:
Instantiate your application block (PING64) in the top-level source file. Add the ports from your application.
3. Add the appropriate Synplicity Virtex file (<install>/lib/xilinx) to the project. This file contains module definitions of the I/O pads in the PCIM_LC module. 4. Specify the top-level file in the project. 5. Synthesize your design with the following files:
Virtex module definition file (previous step) Source files for top-level design, user application (PING64), PCIM_LC,
and CFG
LO
8-32
The chip interfaces with another, and you have to minimize the registerto-output or input-to-register delay.
You have limited CLB resources, and packing the registers in an IOB can
free up some resources. To pack registers in an IOB, you set the syn_useioff attribute. 1. To globally embed all the flip-flops into IOBs, attach the syn_useioff attribute to the module in one of these ways:
To add the attribute in the Verilog source code, add this syntax to the
top level: module global_test(d, clk, q) /* synthesis syn_useioff = 1 */;
To add the attribute in the VHDL source code, add this syntax to the
top level architecture declaration: architecture rtl of global_test is attribute syn_useioff : boolean; attribute syn_useioff of rtl : architecture is true; For details about attaching attributes using the SCOPE interface and in the source code, see Adding Attributes and Directives, on page 3-66. When set globally, all boundary registers and (OE) registers associated with the data registers are marked with the Xilinx IOB property. This property is forward annotated in the EDIF netlist, and used by the Xilinx place-and-route tools to determine how the registers are packed. All marked registers are packed in the corresponding IOBs.
8-33
Add the attribute in the SCOPE window, attaching it to the ports you
want to pack, and set the attribute value to 1.The resulting constraint file syntax looks like this: define_attribute {p:q[3:0]} syn_useioff 1
To add the attribute in the Verilog source code, add this syntax:
module test is (d, clk, q); input [3:0] d; input clk; output [3:0] q /* synthesis syn_useioff = 1 */; reg q;
To add the attribute in the VHDL source code, add syntax as shown
inside the entity for the local port: entity test is port (d : in std_logic_vector(3 downto 0); clk : in std_logic q : out std_logic_vector(3 downto 0); attribute syn_useioff : boolean; attribute syn_useioff of q : signal is true; end test; The software attaches the IOB property as described in the previous step, but only to the specified flip-flops. Packing for ports and registers without the attribute is determined by timing preferences. If a register is to be packed into an IOB, the IOB property is attached and forward annotated. If it is to be packed into a CLB, the IOB property is not forward annotated. In Virtex designs where the synthesis software duplicates OE registers, setting the syn_useioff attribute on a boundary register only enables the associated OE register for packing. The duplicate is not packed, but placed in CLBs. The packed registers are used for data path, and the CLB registers are used for counter implementation. In Virtex designs where a shift register is at a boundary edge and the syn_useioff attribute is enabled, the software extracts only the initial or final SRL16 shift register from the LUT for packing. The shift register that is implemented in the technology view is smaller because of the LO extraction.
8-34
This Verilog example shows a 4-input Spartan XOR module: module fmap_xor4(z, a, b, c, d) /* synthesis xc_map=fmap*/ ; output z; input a, b, c, d; assign z = a ^ b ^c ^d; endmodule This is the equivalent VHDL example: library IEEE; use IEEE.std_logic_1164.all; entity fmap_xor4 is port (a: in std_logic; b: in std_logic; c: in std_logic; d: in std_logic ); end fmap_xor4; architecture rtl offmap_xor4 is attribute xc_map : STRING; attribute xc_map of rtl: architecture is fmap; begin z <= a xor b xor c xor d; end rtl; 2. Instantiate the modules you created at a higher hierarchy level.
Fpga User Guide, December 2005 8-35
3. Group the instances together (xc_uset attribute) and specify the relative locations of instances in the group with the xc_rloc attribute. This example shows the Verilog code for the top-level CLB that includes the 4-input module in the previous example: module clb_xor9(z, a) ; output z; input [8:0] a; wire x03, x47; //Code for XC4000 or Spartan fmap_xor4 x03 /*synthesis xc_uset=SET1 xc_rloc=R0C0.f */ (z03, a[0], a[1], a[2], a[3]); fmap_xor4 x47 /*synthesis xc_uset=SET1 xc_rloc=R0C0.g */ (z47, a[4], a[5], a[6], a[7]); hmap_xor3 zz /*synthesis xc_uset=SET1 xc_rloc=R0C0.h */ (z, z03, z47, a[8]); //Code for Virtex differs because it includes the slice fmap_xor4 x03 /*synthesis xc_uset=SET1 xc_rloc=R0C0.S0 */ (z03, a[0], a[1], a[2], a[3]); fmap_xor4 x47 /*synthesis xc_uset=SET1 xc_rloc=R0C0.S0 */ (z47, a[4], a[5], a[6], a[7]); hmap_xor3 zz /*synthesis xc_uset=SET1 xc_rloc=R0C0.S1 */ (z, z03, z47, a[8]);endmodule 4. Create a top-level design and instantiate your design.
8-36
The output EDIF netlist contains text like the following: (instance clk_ibuf (viewRef PRIM (cellRef BUFGDLL (libraryRef VIRTEX) ) ) 2. To specify the attribute in Verilog, add the attribute as shown in this example. module test(d, clk, rst, q); input [1:0] d; input clk /* synthesis xc_clockbuftype = BUFGDLL */, rst; output [1:0] q; //other coding 3. To specify the attribute in VHDL, add the attribute as shown in this example. entity test_clkbuftype is port (d: in std_logic_vector(3 downto 0); clk, rst : in std_logic; q : out std_logic_vector(3 downto 0) ); attribute xc_clockbuftype of clk : signal is BUFGDLL; end test_clkbuftype
8-37
The design should not have mixed language files. The name of the EDIF file matches the module name.
2. Create a project and add the EDIF file to the design. 3. Specify the EDIF as the top-level design.
Click Impl Options and go to the Verilog or VHDL tab. Enter the module name in the Top Level Module/Entity field. If your
module is not in the work library, specify the library first: <library>.<module>
Click OK.
4. Set any other options you want and resynthesize your design.
To start Xilinx floorplanner, select Options->Xilinx->Start Floorplanner. To start the ISE tool, select Options->Xilinx->Start ISE Project Navigator.
8-39
LO
8-40
CHAPTER 9
Design Planning with Xilinx Designs on page 9-8 Handling Xilinx Critical Paths (Design Planner) on page 9-14 Handling Xilinx Black Boxes (Design Planner) on page 9-22 Handling Xilinx Block RAMs (Design Planner) on page 9-24 Handling Block Multipliers (Design Planner) on page 9-30 Handling DSP Blocks (Design Planner) on page 9-32 Handling Xilinx IPs (Design Planner) on page 9-35
9-1
Stratix and Cyclone Devices on page 9-2 Displaying Stratix Devices on page 9-2 Creating Regions for Stratix Devices on page 9-4
Robust clock management and frequency synthesis for managing onand off-chip timing to maximize system performance using full-featured, embedded phase-locked loops (PLLs)
9-2
A row and column coordinate system. The origin (1,1) is located at the
lower-left corner of the device.
Device features that all align on these row and column boundaries. The following component features: LABs (logic blocks), DSPs (digital
signal processors), 512 RAMs, 4K RAMs, and MRAMs (512K RAMs). Depending upon the part and package used, the number of these blocks on the device may vary.
Tool tips displayed as you move the mouse cursor over a feature
describing what it represents and its location on the device. The following figure shows an example of an Altera Stratix device from the Design Plan Editor.
9-3
LABs
512 RAMs
4K RAMs
MLABs
DSPs
9-4
To create a region on the device: 1. Place the cursor over the device in the Design Plan Editor and click the right mouse button to display a popup menu. 2. Select the Add Region option from the popup menu or use Ctrl-r. The popup menu disappears, but the cursor is initialized to create a region. 3. Press the left mouse button while dragging the cursor across the desired LABs/RAMs/DSPs, if available, in the selected rows/columns of the device, and then release the mouse button. A blue rectangle appears displaying the region you created. Note: You can create regions that contain only LABs, only RAMs, only DSPs, or that overlap any combination of LABs, RAMs, and DSPs, as required. Regions can then be moved or resized. The Design Planner tool prevents you from creating a region that is completely contained inside any of these types of blocks; these regions are invalid. Whenever you create, move, or resize regions, all operations snap to the row/column grid locations on the device.
Assigning to Regions
When you assign MAC/RAM/ROM blocks to a region on the device, the Design Planner software applies the following conditions, respectively:
For MACs: Place MAC blocks in a region containing DSP resources. Otherwise,
the MAC block is mapped to logic and a warning message is generated in the log file (.srr). DSP resource utilization can also be displayed in the Design Plan view after you run Estimate Regions. Refer to Checking Region Utilization on page 9-7.
9-5
Do not place signed and unsigned multipliers in the same DSP block.
Note: Use the Create MAC Hierarchy optimization on the Netlist Restructure tab of the Implementation Options dialog box, to conveniently map MAC configurations together into one MAC block so that this block can be easily assigned to DSP regions for physical synthesis. This option is enabled by default for Stratix devices only.
LO
9-6
View the status in the Tcl Script window. Or, select Run->Job Status.
2. Click on Regions in the Design Plan Hierarchy Browser. This should update information for the rgn in the Design Plan view with statistics for the assigned logic. 3. To choose desired options to report, right-click in the Design Plan view and select Show/Hide Columns from the pull-down menu. You can display region usage for any of the following from the Select Columns dialog box:
Area, Area Use, Area Use (%) DSP, DSP Use, DSP Use (%) RamBits, RamBit Use, and RamBit Use (%)
9-7
Displaying Xilinx Device Resources on page 9-8 Creating Regions for Xilinx Designs on page 9-12 Handling Xilinx Critical Paths (Design Planner) on page 9-14 Handling Xilinx Black Boxes (Design Planner) on page 9-22 Handling Xilinx Block RAMs (Design Planner) on page 9-24 Handling Block Multipliers (Design Planner) on page 9-30 Handling DSP Blocks (Design Planner) on page 9-32 Handling Xilinx IPs (Design Planner) on page 9-35
Block FIFOs (Virtex-4 devices only) Digital Signal Processing Elements (DSPs - Virtex-4 devices only) Block RAMs Block Multipliers Digital Clock Managers (DCMs) I/O Banks
The following example displays these resources on a Virtex-4 device. The LO figure shows the lower-left corner of the device. Notice that I/O banks are located within the device.
9-8
BRAM/FIFO Blocks
DSPs
DCMs
I/O Banks
9-9
Block Multipliers
Block RAMs
DCMs
Block FIFOs
Use the Design Planner to view block FIFOs displayed on the Virtex-4 device in the Design Plan Editor. See Figure 9-2 on page 9-9. In the Virtex-4 architecture, dedicated logic in the block RAM enables you to easily implement synchronous or asynchronous FIFOs. This eliminates the need for additional CLB logic for counter, comparator, or status flag generation, and uses just one block RAM resource per FIFO.
LO
9-10
DSPs
Use the Design Planner to view digital signal processing blocks (DSP48) displayed on the Virtex-4 device in the Design Plan Editor. These application specific module blocks provide a programmable mix of logic, memory, I/O processors, clock management, and digital signal processing. For DSP support, refer to Handling DSP Blocks (Design Planner) on page 9-32.
Block RAMs
Use the Design Planner to view block RAMs displayed on the device in the Design Plan Editor. For block RAM support, refer to Handling Xilinx Block RAMs (Design Planner) on page 9-24.
Block Multipliers
Use the Design Planner to view block Mults displayed on the device which appear as rectangles adjacent to the block RAM resources in the Design Plan Editor. See Figure 9-3 on page 9-10. For Block Mult support, refer to Handling Critical Paths with Large Multiplexers on page 9-21.
I/O Banks
Use the Design Planner to view I/O banks displayed on the device in the Design Plan Editor. See Figure 9-3 on page 9-10. I/O banks group device pins together within a rectangular area. I/O Bank 0 starts at the top-left corner of the device with I/O banks incrementing in a clockwise direction around the device. You can move the mouse cursor over any of these I/O regions to identify which I/O bank it belongs. For more information about pin assignment support, refer to Pin Assignments on page 7-6.
For Virtex-II and Spartan-3 devices, each block RAM column contains
two DCMs. One DCM is located above the top block RAM column and the other DCM is located below the bottom block RAM column.
9-11
You can move the mouse cursor over any resource on the device to
display a tool tip describing what it represents.
The Configurable Logic Block (CLB) coordinate system for the device
depends on the following:
The number of CLB rows in a region must be greater than the length of
the cascade/carry chain logic assigned to it. Refer to Handling Critical Paths with Cascading Cells or Carry Chain Logic on page 9-17.
9-12
Row Overlap
9-13
Splitting a Critical Path into Multiple Regions Creating Smaller Regions for Long Critical Paths Handling Critical Paths with High Fanout Nets Handling Critical Paths with Cascading Cells or Carry Chain Logic Handling Critical Paths with Bit Slicing Handling Critical Paths with Pipelining Handling Designs with Multiple Critical Paths Handling Critical Paths with Large Multiplexers
9-14
A
CP logic Critical path start point CP logic
B
CP logic
9-15
logic
Include this mux in same region with the critical path to extract enable register
critical path
9-16
Also, if the critical path is too large to fit into one block region so that you need to divide the path among two or more regions, place the mux along with the register into the same region to ensure that the enable register is extracted.
Include mux with register in the same region to extract enable register
logic
2 bit slices/CLB for Virtex-E and Virtex 4 bit slices/CLB for Virtex-4, Virtex-II Pro, Virtex-II, and Spartan-3
For example, an 8-bit adder requires that you create a region with at least 4 CLBs in the vertical direction to accommodate the carry chain for Virtex and Virtex-E designs. If a region is not large enough, the Xilinx place-and-route tool fails. The Carry Chain DRC checks will be implemented after you have created a region and have assigned cascade/carry chain logic to that region:
The Design Plan View displays: MaxChainLength The length of the longest cascade/carry chain that
can fit into the specified region. This maximum length accommodates all cascade/carry chains less than or equal to this length.
9-17
A Carry Chain DRC violation changes the color of the region area in the
Design Plan Editor to orange. You must then resize the region to avoid a place and route failure. See Design Plan Editor with Cascade/Carry Chain on page 9-18.
Design Plan View Design Plan Editor
LO
9-18
Use bit-slicing to divide the datapath. Replicate the register and place with the common logic of the critical
path.
Place one half of the critical path in one region and the other half of the
critical path in another region.
16
logic
16
16
16
R1 reg _1 8 logic 8 8 8
Critical path starting point CP1 8 8 R2 CP2 start point (replicate reg_1) 8
R1
R2
reg _2
Place the critical path starting point and logic in one region. Place the multiplier or ROM with the pipeline register in another region.
Place multiplier with pipelining in one region (R2)
logic
Place critical path starting point and and logic in one region (R1)
R1
R2
LO
9-20
9-21
Design Planning Xilinx Black Boxes on page 9-22 Creating Block RAM Regions on page 9-25 Assigning to Block RAM Regions on page 9-27
When you use the Design Plan Editor to assign a black box to a region,
then placement constraints will be written to the .ncf file for that black box. Synplify Premier software will also search for the syn_resources attribute, to determine the type of black box (LUTs, registers, or block RAMs) and the size of the black box module (number of LUTs, registers, or block RAMs) to constrain. The Design Planner software supports the following types of black box:
Contains only LUTs. Contains only block RAMs. If you do not define the black box, by default, it is treated as a logic
only black box.
Cannot support a mixed black box (logic and block RAMs in the same
module). If this occurs, a warning message is displayed and constraints are not written to the.ncf file.
Another way you can constrain a black box to a specific CLB location or
region is by placing a constraint in the user constraint file (.ucf) for the Xilinx place-and-route tool.
Instantiate the blackLO box. If a critical path contains a black box, then place the black box in one
region and the logic portion in another region as shown below.
9-22
R1
R2
Black Box
logic
Place element in R1
9-23
The target FPGA device footprint displays the following resources: CLBs,
Block RAMs (BRAMs), and I/O pins.
A tool tip displays the memory size and coordinate location of block
RAMs when you drag the cursor over these locations.
Refer to Pin Assignments on page 7-6 for information on I/O pins. The height and width of BRAMs resemble the images viewed from the
Xilinx place-and-route tool. For example, the height of BRAMs:
LO
9-24
Overlap with each other. Calculate region-to-region delay based on the CLB location. For regions
consisting only of block RAMs, region-to-region delay can be calculated from a representative CLB location. To create a block RAM region: 1. Place the cursor over the Design Plan Editor view and click the right mouse button to display a dialog box. 2. Select Add->Block Region from the dialog box. 3. Press the left mouse button while dragging the cursor across the desired rows and columns and then release the mouse button. A blue rectangle appears displaying the region you created. Note: You can also move or resize block RAM regions. Any changes made to the region are reflected in the Design Planner view. A tool tip displays the coordinate locations for CLBs and BRAMs and the capacity of the region, when you drag the cursor over these locations. See the following example.
9-25
The following tips are recommended when you create block RAM regions:
Select a block RAM that is within or close-to the region containing the
rest of the critical path logic.
If a critical path contains several RAMs, place block RAMs in one region
and place standard logic in another region. See Critical Path Contains Block RAMs (Case 1) on page 9-26.
Place logic portion in R2
R1 R2
RAM 1
logic
RAM 2
Place element in R1
Place element in R1
If the block RAMs span all CLB rows, select region R2 instead of R1.
Region R2 allows more area for routing. See Critical Path Contains Block RAMs (Case 2) on page 9-26.
R1 R2
9-26
You might want to show rats nesting for block RAM regions. Refer to
Displaying Rats Nesting on page 7-15.
Drag and drop the RAM modules from the HDL Analyst RTL view to the
Design Planner view.
Design Planner software automatically recognizes inferred block RAMs. Make sure the register driving the RAM and the block RAM are
assigned to the same region.
For Virtex-II and Spartan-3 designs, make sure the block RAM and its
output register are assigned to the same region.
For instantiated block RAMs with non-Xilinx primitive names, you must
specify the syn_resources "Blockrams=value" attribute in the HDL source code.
Mapped to registers
registers
9-27
Conflicts that occur when assigning RAM logic to a particular type of block RAM region are resolved as follows:
If block RAMs contain standard logic and are assigned to pure block
RAM regions, then that logic is not constrained and can float anywhere on the device. You must estimate the block RAM region to ensure all logic can fit into that region.
Region estimations can be run. If a violation occurs the color of the block
RAM region area in the Design Plan Editor changes to orange. LO After you run area estimations, block RAM utilization is displayed in the Design Plan view. The utilization report shows: dimensions of CLBs and
9-28
BRAMs, number of BRAMs, BRAM usage, and percentage of BRAM usage for each block RAM region.
Right-click and select Show/Hide columns... from the Select Columns dialog
box to enable these options in the Design Plan view.
Design Plan View Design Plan Editor
Location constraints for block RAM regions are written to a Xilinx netlist
constraint file (.ncf). The Xilinx place-and-route tool should recognize and honor these constraints.
9-29
Block Multiplier Support on page 9-30 Creating Block Mult Regions on page 9-30 Assigning to Block Mult Regions on page 9-31 Region Utilization on page 9-31
You can move the mouse cursor over any resource on the device to
display a tool tip identifying its description.
You can create a block Mult region and assign logic to the region. Thereafter, you can display block Mult capacity and utilization results for these resources.
Overlap with each other. Calculate region-to-region delay based on the CLB location. For regions
consisting only of block Mults, region-to-region delay can be calculated from a representative CLB location. To create a block Mult region: 1. Place the cursor in the Design Plan Editor, right-click and select Add>Block Region from the popup menu. 2. Press the left mouse button while dragging the cursor across the desired rows and columns and then release the mouse button. A blue rectangle appears displaying the region you created. Note: You can also move or resize block Mult regions. Any changes made to the region are reflected in the Design Plan view.
You might want to show rats nesting for block Mult regions. Refer to
Displaying Rats Nesting on page 7-15.
To assign multipliers, drag and drop the multiplier instances from the
HDL Analyst RTL view to the Design Plan Editor.
Region Utilization
The Design Planner software calculates resource capacity and usage by logic assigned to the region, and displays this information in the Design Plan view. To update and view the area of a region reflecting the actual utilization, perform the following: 1. Right-click on the device in the Design Plan Editor, then select Estimate Regions or Estimate All Regions from the popup menu. As the job runs, the region is greyed-out and you can:
9-31
View the status in the Tcl Script window. Or, select Run->Job Status.
2. Click on Regions in the Design Plan Hierarchy Browser. This should update information for the rgn in the Design Plan view with statistics for the assigned logic. 3. To choose desired options to report, right-click in the Design Plan view and select Show/Hide Columns from the pull-down menu. You can display region usage for the following from the Select Columns dialog box: BlockMults, Block Mult Use, and Block Mult Use (%).
Multipliers Multiplier accumulators (MACs) Multipliers followed by an adder Three-input adders Wide bus multiplexers Magnitude comparators Wide counters
The Design Planner tool allows you to create DSP block regions on the device. You can assign multipliers, for example, to this DSP region to help constrain the multiplier and its surrounding logic to this region for synthesis. LO
9-32
The following figure shows a section of the floorplan for a Virtex-4 device, where a multiplier is assigned to the mult region and its surrounding logic is assigned to regions rgn1 to rgn5.
DSP Mult Region
After you run synthesis, the HDL Analyst Technology view shows that the multiplier and its surrounding logic are constrained to the DSP48 module.
9-33
LO
9-34
Intrusive IP Flow
The intrusive IP flow allows the Synplify Premier software to perform logic and physical optimizations for the components contained within the IP. You must add the Xilinx netlist files (.edn) that include the contents of the IPs to your project. You can optionally include a design plan file (.sfp) which constrains the IP components to specified placement locations. The intrusive IP flow is the default mode to run physical synthesis providing the most optimal QoR improvements. Note: This intrusive IP flow only supports Virtex-4, Virtex-II Pro, and Spartan-3 technologies when you run the Synplify Premier Graph-based Physical Synthesis feature. The following figure shows the Xilinx netlist file added to the Project file.
9-35
You can run physical synthesis for the following intrusive IP flows with Xilinx .edn netlist files:
LO
9-36
Macro IP Flow
The macro IP flow forces the Synplify Premier software to leave the contents of the IP untouched. Only a timing model is generated for the IP during synthesis. You must add the Xilinx netlist files (.ngc/.ngo) that include the contents of the IPs to your project. You must also include a design plan file (.sfp) which constrains the IP components to specified placement locations. The following figure shows the Xilinx netlist file added to the Project file.
9-37
When you run physical synthesis for the macro IP flow with a Xilinx .ngc or .ngo netlist file:
Click on the New Design Plan icon ( ). Select File->New from the Project menu.
2. In the New dialog box, select the design plan file type and specify a Design Plan file name and file location directory to add to your project.
LO
9-38
3. In the Design Plan Editor pane of the Design Planner view, create a region by doing either of the following:
Right-click and select Add->Block Region. Use the left-mouse button to draw a region at the desired location.
Good design planning is required to ensure better QoR improvements. Make sure to place regions so that they are near required resources, such as I/O ports or contain RAMs if necessary. Do not place regions where they might create an obstruction for the rest of the design. Design planning is an iterative process to ensure that IP regions are placed in an optimal location. 4. Assign IP logic to this region by selecting the IP module in the RTL Analyst view and dragging it to the desired location in the Design Plan Editor.
Design Planner View Design Plan Hierarchy View Design Plan View Design Plan Editor
IP Module
IP Region
5. Specify the type of constraint to apply to this region. First select the IP region. Then, right-click and select Region Type and one of the following options:
IP Block
The following Tcl command is saved to the design plan file: assign_property syn_rgn_ip_block {region_name} 1 See Intrusive IP Flow on page 9-35 and Macro IP Flow on page 9-37 for a description of these options.
LO
9-40
CHAPTER 10
Using Batch Mode, on page 10-2 Working with Tcl Scripts and Commands, on page 10-4 Automating Flows with synhooks.tcl, on page 10-10 The VIF Formal Verification Flow, on page 10-13 Running Place-and-Route After Synthesis, on page 10-21 MultiPoint Synthesis, on page 10-28 The Altera LogicLock Flow, on page 10-39 The Xilinx MultiPoint Synthesis Flow, on page 10-48 Using the Xilinx Modular Flow, on page 10-54 Integrating with Third-Party Software, on page 10-70 Working with the Identify RTL Debugger, on page 10-72
10-1
Running Batch Mode on a Project File, next Running Batch Mode with a Tcl Script, on page 10-3
0 - ok
LO 2 - error 3 and above - abnormal exit (but no details).
10-2
3. If there are errors in the source files, check the standard output for messages. On UNIX systems, this is generally the monitor; on Windows systems, it is the sdout.log file. 4. After synthesis, check the result_file.srr log file for error messages about the run.
For source file or Tcl script errors, check the standard output for
messages. On UNIX systems, this is generally the monitor in addition to the stdout.log file; on Windows systems, it is the stdout.log file.
10-3
Crossprobing from the Tcl Script Window, next Using Tcl Commands and Scripts, on page 10-4 Generating a Job Script, on page 10-5 Creating a Tcl Synthesis Script, on page 10-5 Using Tcl Variables to Try Different Clock Frequencies, on page 10-7 Using Tcl Variables to Try Several Target Technologies Running Bottom-up Synthesis with a Script, on page 10-9
You can also use synhooks Tcl scripts, as described in Automating Flows with synhooks.tcl, on page 10-10.
Refer to the online help (Help -> Tcl Help) for general information about
Tcl syntax.
Type help * in the Tcl window for a list of all the Tcl synthesis
commands. The Tcl window is not available in Synplify.
10-4 Fpga User Guide, December 2005
Type help <command_keyword> in the Tcl window to see the syntax for
the command. 2. To run a Tcl script, do the following:
Create a Tcl script. Refer to Generating a Job Script, on page 10-5 and
Creating a Tcl Synthesis Script, on page 10-5.
Run the Tcl script by either typing source Tcl_scriptfile in the Tcl
script window, or selecting File -> Run Tcl Script, selecting the Tcl file and clicking Open. The software runs the selected script and executes the commands in it. For more information about Tcl scripts, refer to the following sections.
The following procedure covers general guidelines for creating a synthesis script from scratch. 1. Use a text file editor or select File->New, click the Tcl Script option and type a name for your Tcl script. 2. Start the script by specifying the project with the project -new command. For an existing project, use load project.prj. 3. Add files. This may not be needed for an existing project.
Save the project with project -save. Run the project withLO project -run. Open the RTL and Technology views:
10-6
Check case, because Tcl is case-sensitive. Start all comments with a hash mark (#). Enclose all pathnames and filenames in double quotes. Always use a forward slash (/) in directory and pathnames, even on the PC.
Foreach loop
set try_freq { 85.0 90.0 Tcl commands that set the 92.0 frequency, create separate log files 95.0 for each run, and run synthesis 97.0 100.0 ) foreach frequency $try_freq { set_option -frequency $frequency project -log_file $frequency.srr project -run}
10-7
The following code shows the complete script: project -load "design.prj" set try_these { 20.0 24.0 28.0 32.0 36.0 40.0 } foreach frequency $try_these { set_option -frequency $frequency project -log_file $frequency.srr project -run open_file -edit_file $frequency.srr }
10-8
# Open a new project, set frequency, and add files. project -new set_option -frequency 33.3 add_file -verilog "D:/test/simpletest/prep2_2.v" # Create the Tcl variable to try different target technologies. set try_these ISPGDX APEX20K Virtex2 # list of technologies } # Loop through synthesis for each target technology. foreach technology $try_these { impl -add set_option -technology $technology project -run -fg open_file -rtl_view }
Add source files with add_file -vhdl or add_file -verilog. Add constraint files with add_file -constraint. Set the top-level options with set_option. Set the output file information with project -result_file and project -log_file.
Save the project with project -save. Run the project with project -run.
4. Save the top-level script, and then run it using this syntax: source block_script.tcl
10-9
When you run this, the entire design is synthesized, beginning with the lower-level logic blocks specified in the sourced files, and then the top level.
Customize the file by deleting the ones you do not need and by adding
your customized code to the callbacks you want to use. The following table summarizes the various design phases where you can use the callbacks and lists the corresponding functions. For details of the syntax, refer to Tcl synhooks File Syntax, on page 5-58 in the LO Reference Manual.
10-10
Application Callbacks
Starting the application after opening a project Exiting the application
Run Callbacks
Starting a run. See Example: proc syn_on_start_run, on page 10-12. Ending a run
proc syn_on_start_run
proc syn_on_end_run
proc syn_on_press_ctrl_f8
10-11
LO
10-12
Overview of the VIF Flow, next Generating a VIF File, on page 10-14 Generating a VIF File, on page 10-14 Using a Tcl Script for VIF Conversion, on page 10-16 Handling Equivalency Check Failures, on page 10-18
10-13
HDL
Set Technology to an Altera or Xilinx family that supports the VIF flow. Disable Retiming. This is an optional, but recommended step. Register
retiming optimizations are hard to verify. The disadvantage is that LO you may lose performance when you disable retiming.
10-14
Enable the Verification Mode option. This is another optional step that
disables various sequential optimizations that can not be easily verified; the inference of resettable SRLs for example. The trade-off when you enable the Verification Mode option is that you may sacrifice performance or area, because the optimizations are not performed. The reason for disabling sequential optimizations is to make it easy for the verification tool to sync up registers. Sequential optimizations are hard to verify because registers are moved or optimized away. For a list of VIF optimization commands, see step 4, below. 2. Go to the Implementation Results tab and enable Write Verification Interface Format (VIF) File.
Figure 10-2: Implementation Results Options for Generating VIF Output Note: For Altera designs, make sure to use .vqm as the output format, not .vm. 3. Synthesize the design as usual. The Synplify Pro software generates the .vif file and stores it in the project/verif directory. 4. Check the .vif file to see how the optimizations were handled. The following table lists the VIF commands used to map some synthesis optimizations. For details of the command syntax, refer to Tcl VIF Commands, on page 5-62 in the Reference Manual. Optimization
FSM register mapping FSM state encoding Register merging
10-15
Optimization
Register replication Pruning of duplicate registers Black boxes for undefined modules Port direction changes
5. Use the .vif file as input to any formal verification tool that supports a Tcl interface. Do one of the following:
If you are using the Cadence Conformal tool, run the translation
script vif2conformal.tcl which is in the <install dir>/lib directory (see Using a Tcl Script for VIF Conversion, on page 10-16 for details). This translates the .vif file commands to commands for the Conformal tool.
10-16
source $LIB/vif2conformal.tcl 2. In the Tcl window, navigate to the verification folder containing the <design>.vif file, and type the following command: vif2conformal <design>.vif The vif2conformal.tcl script runs on the <design>.vif file and translates the information into Conformal side files (*.vtc, *.vsc, *.vmc, and so on). You can now run Conformal using these files.
10-17
Check the log file report and fix the errors reported. Check the optimization mapping in the vif file. See step 4 of Overview of
the VIF Flow, on page 10-13 for a list of commands.
LO
10-18
IP Flow Diagram
The following diagram illustrates the IP flow for FPGAs using Synplicity software.
10-19
Using IP in a Design
To use an IP in a design, do the following 1. Add the vendor-encryted IP with your other files in the project. The encrypted files must be encrypted by the vendor in the vendor format, not encrypted by the user. 2. Synthesize the design. The tool decrypts the IP and synthesizes it. The software then reencrypts the IP file for the place-and-route tool. For Lattice technologies, the encryption can be decrypted by the place-and-route tool. For all other technologies, the place-and-route tool cannot decrypt the encrypted IP in the output netlist. The simulation netlists produced after synthesis do not contain the details of the IP. You need the netlist from the vendor to simulate the IP. 3. Analyze the design. The software treats the IP as a black box in HDL Analyst views. The RTL and Technology HDL Analyst tools do not allow you to view or push/pop into encrypted code.
LO
10-20
Creating and Running P&R Projects, next Specifying Xilinx Place-and-Route Options, on page 10-23 Backannotating Place-and-Route Data, on page 10-25 Analyzing Physical Synthesis (Synplify Premier), on page 10-26
Click on the New P& R... button from the Project view. Select a synthesis implementation, then right-click and select Add New
Place & Route Job from the popup menu. The Add New Place and Route Job dialog box opens. The available options vary slightly depending on the synthesis tool you are using and the chosen technology. See Running Physical Synthesis, on page 11-9 for a description of the Synplify Premier place-and-route flow.
10-21
2. Type a name for the place-and-route implementation in Place & Route Flow Name. A default place-and-route name appears in the display. Avoid using spaces in the implementation name. 3. For Xilinx users, select a place-and-route options file. See Specifying Xilinx Place-and-Route Options, on page 10-23 for details. 4. For Synplify Premier users, you can choose to backannotate data. See Backannotating Place-and-Route Data, on page 10-25 for details. 5. Enable the Run Place & Route following synthesis option and click OK. The application creates a place-and-route implementation under the current synthesis implementation in the Project view. Currently, you cannot change the location of the P&R directory. Conversely, if you do not want to create a place-and-route implementation, disable the Run Place & Route following synthesis option. 6. Click the current implementation in the Project view to see the placeand-route implementation. LO
Place and Route implementation
10-22
To create subsequent place-and-route implementations, select the placeand-route implementation, right-click, and select Add Place & Route Job from the popup menu. You can repeat the preceding steps to add as many P&R implementations as you need. 7. Synthesize the design. You can either
Press the Run button. Right-click and select Run Place & Route Job from the popup menu.
If the synthesis implementation associated with the place-and-route implementation has not been synthesized, then running place-and-route invokes synthesis as well. After synthesis, the software automatically runs the place-and-route tool. If you have a Xilinx design and specified an options file, the software uses the options to run place-and-route. 8. To run in batch mode, do the following:
Create a place-and-route implementation, as described previously. Use the -run all command to synthesize the design and then place
and route. If the synthesis implementation is selected the software only runs synthesis; you must run place-and-route separately.
Click the New P&R button in the Project view. Click Existing Options File. Select the file name in the next dialog box,
and click Open.
10-23
Return to the Add New Place & Route Job dialog box and make sure the
correct options file is selected. Click OK. If you want to customize this file, edit the default file. The software uses the options in this file to place and route the design after synthesis. You can now view the results, as described in step 4. 3. To create a new Xilinx place-and-route options file, do either of the following:
Click the New P&R button in the Project view. In the dialog box, click
Create New Options File. Specify the file name in the next dialog box, and click Open. Alternatively, select File->New. Set the file type to Xilinx Option File. Type a file name; for example, design_par.opt. Enable the Add to Project option. Click OK. A text window opens with the file. The software creates an options file (.opt) with the default options and adds it to the project. The Project view displays this file. You can now edit this file to customize it.
Customize the options file by editing it. Save the file. Return to the Add New Place & Route Job dialog box, and make sure the
options file you created is selected. Select Run Place & Route following synthesis. Click OK. The software uses the options file to place and route the design after synthesis. 4. View the results.
Select the P&R implementation in the Project view. The result files are
displayed in the Implementation Results view.
View the log file xflow.log for information about the run.
LO
10-24
Click on the New P&R... button from the Project view. On the Add New Place
& Route Job dialog box, enable the Backannotate placement and timing data following Place & Route option.
However, this option is only applicable for certain Altera and Xilinx technologies. See Device Support for the Physical Synthesis Flows, on page 11-3.
10-25
See Viewing the Log File, on page 4-2 for complete information on how to interpret the log file results. In addition, you can generate a stand-alone timing report to display more or less information than what is provided in the log file. See the following:
Analyzing Timing, on page 4-73 The Island Timing Report, on page 4-83
Also, check the place-and-route results to determine if further synthesis is required. For example, click on Xilinx P&R Report to check the xflow_par.log LO file to verify that all constraints were met as shown below. For Full Chip
10-26
Physical Synthesis, you can also click on Initial Placement Report to check the xflow_gp.log file. Click on Quartus P&R Report to check the quartus.log file for place-and-route results for Altera devices.
For more information on analyzing synthesis results graphically, see the following topics:
Synplify Premier Physical Analyst Tool, on page 5-2 Analyzing With the HDL Analyst Tool, on page 4-56
10-27
MultiPoint Synthesis
MultiPoint Synthesis
This document describes the MultiPointTM synthesis flow, which automates the traditional bottom-up flow for large designs. This feature is available with the Synplify Pro product, for use with certain technology families.
Traditional Bottom-up Design and MultiPoint Synthesis, on page 10-28 The Synplify Pro MultiPoint Synthesis Flow, on page 10-29
For information about technology-specific flows, see The Altera LogicLock Flow, on page 10-39 and Using the Xilinx Modular Flow, on page 10-54
10-28
MultiPoint Synthesis
points independently of the rest of the design. A design may have any number of compile points, and compile points may be nested. See the Reference Manual for details about compile points. You must provide timing constraints (timing budgeting) for each compile point; the more accurate the constraints, the better your results. Constraints are not automatically budgeted, so manual time budgeting is important.
Set Implementation Options, on page 10-30 Compile the Design, on page 10-31 Set Implementation Options, on page 10-30 Define Compile Points and Top-Level Constraints, on page 10-31 Set Constraints, on page 10-33 Synthesize, on page 10-36 Analyze Results, on page 10-37 Resynthesize or Incrementally Synthesize, on page 10-38
The following figure shows the general procedure for using the Synplify Pro MultiPoint flow. For flows with vendor-specific details, see The Altera LogicLock Flow, on page 10-39 and The Xilinx MultiPoint Synthesis Flow, on page 10-48. For Actel designs, follow the generic flow.
10-29
MultiPoint Synthesis
F7
Set Constraints
Synthesize
Meets requirements
MultiPoint Synthesis
In the Implementation Options dialog box, go to the tab and disable Netlist
Optimization Options.
For Altera Stratix devices, also disable Create MAC Hierarchy. Remember that Synplify Premier Multipoint synthesis ignores the
following optimizations for compile points: Feedthrough Optimization, Constant Propagation, and Create Always/Process Level Hierarchy. You are now ready to compile the design (Compile the Design, on page 10-31).
10-31
MultiPoint Synthesis
Alternatively, you can create a new top-level constraint file when you create the module-level constraint files, as described in Create Compile Point and Top-Level Constraint Files, on page 10-34. The SCOPE window opens. 2. Click the Compile Points tab.
Set the module you want as a compile point using either of these
methods: select a module from the drop down list in the Module column, or drag the instance from the HDL Analyst RTL view to the Module column.
10-32
MultiPoint Synthesis
The next figure shows the rgn1 (region) module set as a compile point in the Synplify Premier Multipoint flow.
3. Set any other top-level constraints like input/output delays, clock frequencies or multicycle paths. The parent level includes lower-level constraints. The software considers the lower-level constraints when it maps the top level. 4. Save the top-level .sdc file. You can now set constraints as described in Set Constraints, on page 10-33.
Set Constraints
This is a step in the The Synplify Pro MultiPoint Synthesis Flow, on page 10-29. You must specify constraints for each compile point in individual .sdc files, as well as set separate top-level constraints for the entire design. You need a compile point constraint file for each compile point, and a constraint file for the top level. Do not define the compile point constraints in the same file as the top-level constraints.
10-33
MultiPoint Synthesis
See the following sections for details about compile point constraints:
Create Compile Point and Top-Level Constraint Files, next Set Compile Point Constraints, on page 10-35 Create Compile Point and Top-Level Constraint Files
You can create a module (compile point) constraint file as follows. Optionally, you can generate a top-level constraint file at the same time that you define the compile points. 1. In an open project, click the SCOPE icon ( File dialog box opens. ). The Create a New SCOPE
2. Click the Select File Type tab and click the Compile Point option.
3. Select the module you want to make a compile point. 4. Click OK. If you do not have a top-level file, you are prompted to create one. If you have multiple top-level files, you can choose one or create a new one by clicking New. For information about defining compile points in a topLO level file, see Define Compile Points and Top-Level Constraints, on page 10-31.
10-34
MultiPoint Synthesis
5. Click OK to exit the prompt box, and then click OK again in the Create a New SCOPE File dialog box to initialize the constraints. Two SCOPE windows open, one for the top-level and one for the compile point constraint file. You must define constraints for both the top-level and the compile point. See Set Compile Point Constraints, on page 10-35 for details about setting compile point constraints. Set top-level constraints as in a normal design flow.
Define clocks for the compile point. Specify I/O delay constraints for non-registered I/O paths that may
be critical or near critical.
Set port constraints for the compile point that are needed for top-level
mapping. You must set compile point constraints because parent constraints do not propagate down to the compile points. However, compile point constraints are considered while mapping the parent, so you do not need to duplicate compile point constraints at the top level. Compile point port constraints are not used at the parent level, because compile point ports do not exist at that level
10-35
MultiPoint Synthesis
If you want to use the syn_hier attribute with a compile point, the only valid value is flatten. The software ignores any other value of syn_hier for compile points. The syn_hier attribute behaves normally for all other module boundaries that are not defined as compile points. 3. Save the file. When prompted, click Yes to add the constraint file to the top-level design project. The software writes a file cp_name_number.sdc to the current directory.
Synthesize
This is a step in The Synplify Pro MultiPoint Synthesis Flow, on page 10-29 . The Synplify tool does not support MultiPoint synthesis. After you have set up the compile points and the constraints, you can synthesize the design. 1. Click Run and synthesize the top-level design. The design is synthesized in two phases:
First, compile points are synthesized from the bottom up, starting
with the compile point at the lowest level of hierarchy in the design. Each compile point is synthesized independently. For each compile point, the software creates a subdirectory named after the compile point, in which it stores intermediate files for the compile point: RTL netlist, mapped netlist, and model file. The model file contains the hierarchical interface timing and resource information that is used to synthesize the next level. When a design is resynthesized, compile points are resynthesized only if source code logic or constraints have been changed. If a compile point has not changed, the model file from the previous run is used. Once generated, the model file is not updated unless there is an interface design change or you explicitly specify it.
After all the compile points are synthesized, the software synthesizes
the design from the top down, using the model information for each compile point. The software writes out a single output netlist and one constraint file for the entire design. LO
10-36
MultiPoint Synthesis
Analyze Results
This is a step in The Synplify Pro MultiPoint Synthesis Flow, on page 10-29. Multipoint synthesis is not supported in the Synplify tool. The software writes timing and area results to one log file in the implementation directory. You can check this file and the RTL and Technology views to determine if your design has met the goals for area and performance. You can also view and isolate the critical paths, search for and highlight design objects and crossprobe between the schematics and source files. 1. Check that the design meets the target frequency for the design. Use the Log Watch window or check the log file. 2. Open the log file and check the following:
Check top-level and compile point boundary timing. You can also
check this visually using the RTL and Technology view schematics. If you find negative slack, check the critical path. If the critical path crosses the compile point boundary, you might need to improve the compile point constraints.
Review the area report in the log file and determine if the cell usage is
acceptable for your design.
10-37
MultiPoint Synthesis
Compile Point Timing Data and select Resynthesize All, you can resynthesize the entire design and regenerate the compile point model files, but synthesis will take longer than an incremental synthesis run.
Using Synplify Pro With the Altera LogicLock Flow Using Synplify Premier With the Altera LogicLock Flow
Set the target device to one of the Altera families that use LogicLock:
Apex, ApexII, Mercury, Excalibur, or Stratix.
Click the Compile Points tab, and set compile points. A compile point is
a module that is treated as a block for incremental synthesis In subsequent synthesis iterations, the software does not resynthesize the compile point unless the hierarchical interface changes. See the
10-39
Reference Manual for details about compile points. The following example shows three compile points set: ALU, comb_logic, and mult.
Click the SCOPE icon. In the Create a New SCOPE File dialog box, click the Select File Type tab,
then click Compile Point, and select the compile point. The following example shows v:work.alu selected.
In the next dialog box, select the top-level .sdc file that defines the
compile points.
Set the clock constraint for the compile point. This can be the same
as the top level. Save the file.
LO
10-40
4. Synthesize your design and check the compile point summary in the log file. The software synthesizes the design from the bottom up, starting with the compile point at the lowest level. For each compile point, the software generates a separate subdirectory with a complete set of output files. It also generates a model file that contains timing information and which is used to synthesize the next hierarchical level. 5. Place and route the design. You can hierarchically place and route the design, because each compile point has a separate set of output files. The Quartus software places the compile point modules you created in the LogicLock regions. 6. Analyze Results The software writes timing and area results to one log file in the implementation directory. You can check this file and the RTL and Technology views to determine if your design has met the goals for area and performance. You can also view and isolate the critical paths, search for and
10-41
highlight design objects and crossprobe between the schematics and source files.
Check that the design meets the target frequency for the design. Use the
Log Watch window or check the log file.
Open the log file and check the following: Check top-level and compile point boundary timing. You can also
check this visually using the RTL and Technology view schematics. If you find negative slack, check the critical path. If the critical path crosses the compile point boundary, you might need to improve the compile point constraints.
Review the area report in the log file and determine if the cell usage is
acceptable for your design.
Check all DRC information. Check the RTL and Technology view schematics for a graphic view of the
design logic. Note that even though instantiations of compile points do not have unique names in the output netlist, they have unique names in the Technology view. This is to facilitate timing analysis and the viewing of critical paths. 7. To synthesize the design incrementally, do the following:
Make the design changes needed in the compile points. Click Run to resynthesize your design incrementally.
For an incremental run, the software only resynthesizes compile points whose logic, implementation options, or timing constraints have changed. The following figure illustrates incremental synthesis by comparing LO compile point summaries. After the first run, a syntax change was made in the mult module, and a logic change in the comb_logic module. The figure shows that incremental synthesis resynthesizes comb_logic (logic
10-42 Fpga User Guide, December 2005
change), but does not resynthesize mult because the logic did not change even though there was a syntax change.
First Run Log Summary
Syntax changes only; not resynthesized Logic changes; compile point resynthesized
Set the target device to one of the Altera families that use
LogicLock: Apex, ApexII, Excalibur, Mercury, Cyclone, or Stratix.
Create a new design plan. Create constraint regions on the device. Then, assign necessary
logic to these regions. Run region estimation for the regions and check all DRC information.
10-43
Define the constraints for the design, as usual. Save the file.
The following example shows three compile points set: ALU, comb_logic, and mult.
LO
10-44
In subsequent iterations, the software does not resynthesize the compile point unless the compile point changes. 5. Create a separate compile point constraint file for each compile point you defined.
In the Create a New SCOPE File dialog box, click the Select File Type tab,
then click Compile Point, and select the compile point.
In the next dialog box, select the top-level .sdc file that defines the
compile points.
Set the clock constraint and I/O timing for the compile point. This
can be the same as the top level.
Click the Attributes tab and type in the syn_allowed_resource attribute for
the compile point (the object type is view). Remember that allowed resources set for a lower level count as part of the resources for the higher level. Save the file.
Fpga User Guide, December 2005 10-45
Note: Set the syn_allowed_resource attribute for module compile points only. Region compile points use the constraints from the design plan (.sfp) file. 6. Synthesize your design and check the compile point summary in the log file. The software synthesizes the design from the bottom up, starting with the compile point at the lowest level. It generates netlists and a model file for each compile point, and stores these files in subdirectories named after the compile point. It also generates a model file that contains timing information and which is used to synthesize the next hierarchical level. 7. Place and route the design. You can hierarchically place and route the design, because each designated LogicLock point has a separate.vqm file. The Quartus software places the compile point modules you created in the LogicLock regions. 8. To synthesize the design incrementally, do the following:
Make the design changes needed. Click Run to resynthesize your design incrementally.
For an incremental run, the software only resynthesizes compile points whose logic, implementation options, or timing constraints have changed. The following figure compares compile point summaries. After the first run, a syntax change was made in the mult module, and a logic change in the comb_logic module. Incremental synthesis resynthesizes comb_logic (logic change), but does not resynthesize mult because the logic did not change even though there was a syntax change.
LO
10-46
Region moved; resynthesized Syntax changes only; not resynthesized Logic changes; resynthesized
10-47
Set up a project as usual, select the Xilinx target device, and set the
implementation options. Compile the design. 2. Define compile points in the top-level .sdc file.
Click the Compile Points tab, and set compile points. The following
example shows three compile points set: ALU, comb_logic, and mult.
Click the Attributes tab. Set Object Type to instance, set Object to the
compile point, and set the xc_area_group attribute to define the region. The following figure shows the attribute set for the ALU compile point. Save the file.
LO
10-48
10-49
A compile point is a module that is treated as a block for incremental mapping. In subsequent synthesis iterations, the software does not resynthesize the compile point unless the original RTL netlist for the compile point changes. 3. Create a compile point constraint file for each compile point.
Click the SCOPE icon. In the Create a New SCOPE File dialog box, click the Select File Type tab,
then click Compile Point, and select the compile point. The following examples shows v:work.alu selected.
In the next dialog box, select the top-level .sdc file that defines the
compile points.
Set the clock constraint for the compile point. This can be the same
as the top level. Save the file.
LO
10-50
4. Synthesize your design and check the compile point summary in the log file. The software synthesizes the design from the bottom up, starting with the compile point at the lowest level. 5. Place and route the design. The place-and-route software places the compile point modules in the regions you defined with the xc_area_group attribute. 6. To synthesize the design incrementally, do the following:
Make the design changes needed in the compile points. Click Run to resynthesize your design incrementally.
The synthesis software runs incrementally, only resynthesizing compile points whose logic, implementation options, or timing constraints have changed. The following figure illustrates incremental synthesis by comparing compile point summaries. After the first run, a syntax change was made in the mult module, and a logic change in the comb_logic module. The figure shows that incremental synthesis resynthesizes comb_logic (logic change), but does not resynthesize mult because the logic did not change even though there was a syntax change. Incremental synthesis re-uses the mapped file generated from the previous run to incrementally synthesize the top level.
First Run Log Summary
Syntax changes only; not resynthesized Logic changes; compile point resynthesized
10-51
LO
10-52
Region moved; resynthesized Syntax changes only; not resynthesized Logic changes; resynthesized
10-53
Overview of Modular Flow Design Stages, next Initial Design Budgeting Active Implementation, on page 10-58 Final Assembly, on page 10-63 Design Files and Area Design Planning, on page 10-65
Final Assembly
LO
10-54
The steps in each phase are briefly described in the following sections, with emphasis on the tasks done with the synthesis tool.
Planning
Using the team design model, the team leader defines the HDL top-level design, the global design constraints, and determines the positions of each of the modules by doing some preliminary floorplanning. The team leader partitions the design into smaller self-contained modules or structures, and assigns the modules to different teams or designers. This planning stage can be merged with the next stage of Design Entry. 1. Partition the design into smaller self-contained modules or structures. 2. Use initial floorplanning to assign the modules to specific physical locations on the target device. 3. Allocate global resources like clock buffers. 4. Assign each module to a designer or a design team. This modular flow uses a simple example to illustrate the flow. The design consists of a top-level design with two lower-level modules, mux and flop. See Design Files and Area Design Planning, on page 10-65 for the files.
Top-Level Design
Flop Mux
10-55
A top-level design file. The HDL source code for the top-level design
contains the top-level module with all the global logic such as clock resources, inter-module logic connections, and connections between I/O ports and modules. For the top-level file used as an example here, see Top-Level Design File, on page 10-65.
A file for each module. This file is a black box wrapper for the module
and lists the inputs and outputs. It also contains attributes to declare the module a black box (syn_black_box) and set the physical location of the module, based on initial floorplanning (xc_modular_region). For information about generating the area numbers for xc_modular_region, see Determining the Area Range for xc_modular_region, on page 10-69. For the module files used in this example, see Module Mux File, on page 10-67 and Module Flop File, on page 10-68.
A top-level constraint file. You can use the SCOPE interface to set
global clock constraints. If there is a conflict between the global clock constraint and a clock constraint set on a module, the global clock constraint is used.
LO
10-56
Synthesize the design. Make sure you set Technology to Xilinx Virtex ,
Virtex-II, Virtex-II Pro, or Virtex-4 and check the Modular Flow checkbox on the Device tab of the Implementation Options form.
When you check Modular Flow, the software generates the directory structure needed for the flow in the Xilinx place-and-route tool.
Currently empty, used for final assembly Contains top-level EDIF netlist and top-level constraint file (.ncf) Currently empty, used for completed modules Currently empty, used for module design
The software creates top-level .edif and .ncf files, which it places in the top-level directory. It issues warnings if it finds a module that is instantiated more than once at the top level.
10-57
2. Generate a top-level .ngo file that contains the top-level area constraints.
Start the Xilinx place-and-route tool. Go to the top_level directory and run ngdbuild in initial mode. Use
this syntax and type the command at the command line: ngdbuild -modular initial <toplevel>.edf To run our example, the command is ngdbuild -modular initial example_top.edf. This command generates a .ngd file and a .ngo file that contains the top-level area constraints for place and route. 3. Archive the directories, and give each designer or design team working on a module a copy of the .prj file, the top-level HDL file, the submodule HDL files (black box wrappers), and the top-level .sdc file with region constraints.
Active Implementation
The active implementation phase starts after the designer finishes the module-level design and passes on the project to each development team. This phase consists of module synthesis, top-level synthesis, development of the physical partitions, and module-level placement and routing. LO
10-58
Module Synthesis
The advantage to using the modular design flow is the elimination of dependencies and the need for all teams to be done before an individual team can synthesize a module design with the overall design. Individual teams can synthesize their assigned modules with the top-level design without depending on the progress of other design teams. It allows the module designer to iterate the module design with the top level more frequently, and evolve the overall design and separate modules more efficiently. Although this is module-level synthesis, you actually synthesize your module design with the top-level design, the top-level constraint file, wrapper files for other modules, and optional module-level constraint files. To use our example, if you are assigned to mux, you create HDL source code for it. You synthesize mux using the project created by the team leader, replacing the original mux wrapper file with the design you created. The project file includes the top-level design source code and constraint file, as well as the wrapper file for the flop module, which remains a black box from your perspective. 1. Start with the project set up by the team leader and set device options in the synthesis tool with Project->Implementation Options. The module file is now updated to contain the design.
On the Device tab, set the device to Xilinx Virtex or Xilinx Virtex-II. Check the Modular Flow checkbox.
10-59
On the Implementation Results tab, check that the name of the output
netlist matches the name of the module you are actively synthesizing as it occurs in the top-level EDIF file, so that the name of the netlist for this module and the name in the top-level EDIF file are the same. For example, the name for the output file for mux must be mux.edf to match the name of the component in the top-level EDIF file.
Set any other device options you want, and click OK.
The software issues warnings if it finds either of the following:
A module that is instantiated more than once at the top level. Internal tristates. Unlike the regular design flow, in the modular flow
the software cannot move internal tristates up to the top level because of the strict hierarchy limits required by this flow. 2. Compile the design with Run->Compile Only. You need to do this to initialize constraints for the SCOPE environment. 3. Set module-level constraints if needed. Use the following procedure:
Set the module-level constraints and save the file. The file name is
prefixed by module_. For example, the constraint file generated for the mux module is called module_mux.sdc.
mux, which contains mux.edf, the EDIF netlist for the top level, and
mux.ncf, the place-and-route constraint file for the module
Top-level Synthesis
Optionally, you can synthesize the top-level design as an intermediate check, although it is not necessary with the modular flow. This is because the toplevel module contains the physical locations of the devices and all modules use the same top-level area constraint file. At this point, you have finished the synthesis phase. The rest of the flow uses the Xilinx place-and-route tool.
10-61
2. Go to the module directory (in this case, the mux directory) and type the following at the command line to run the ngdbuild command in module mode: ngdbuild -p <part_num> -modular module -active <module>.edf <path_to_top_level_ngo_file> For our example, the command is ngdbuild -p xcv50-6bg256 -modular module -active mux ..\top_level\example_top.ngo This command runs the ngdbuild command in module mode. It uses the area constraints from the top-level .ngo file to build an .ngo file in the module directory. 3. Map the module with this command: map <top_level_file>.ngd For our example: map example_top.ngd This command uses the .ngo file in the module directory to generate .ngd and .ncd files in the module directory. 4. Place and route the module with the following command: par -w <top_level_file>.ncd <top_level_file_par>.ncd The second .ncd file is the placed and routed file that is generated by this command, so name it something distinct and meaningful to you. By not overwriting the original .ncd file, you can try different design options. The _par suffix is a convention that lets you keep track of when you generated the .ncd file. For our example, use this command: par -w example_top.ncd example_par.ncd 5. Open the place-and-route tool and check your placement results with this command: fpga_editor <top_level_file_par>.ncd For our example, the name of the .ncd file is example_par.
LO
10-62
6. Copy the lower-level module files into the PIM directory. From the module directory, type the following pimcreate -ncd -w <top_level_file_par>.ncd <path_to_pim_directory> <module_file> For the module file, just specify the name of the module file without any extensions. For example: pimcreate -ncd -w example_par.ncd ..\PIM mux This command creates a directory under PIM called mux, into which it copies the mux.ncd and mux.ngo files. The PIM directory is an intermediate holding area where module designers deposit module files as they are completed. The PIM files are used by the team leader for final assembly of the design.
Final Assembly
After all subordinate modules have been synthesized separately, use their combined netlists to place and route the entire design.The project leader merges the physical partition files from each development team and then does the final placement and routing to create a final netlist. 1. Complete all the modules, and copy them to the PIM directory. See Module Synthesis, on page 10-59 for details. At this point, you can do functional and timing simulation before placing and routing the top level with the Xilinx P&R tool. 2. Open a command prompt, and go to the top_level_final directory, and type the following: ngdbuild -p <part_num> -modular assemble -pimpath <path_to_pim_dir> -use_pim <module_name> <path_to_top_level_ngo_file> This command runs ngdbuild in assembly mode, specifying each of the modules in the pim directory. You must repeat -use_pim <module_name> as many times as needed to specify all the modules in the design. For example: ngdbuild -p xcv50-6bg256 -modular assemble -pimpath ..\PIM -use_pim mux -use_pim flop example_top.ngo The command generates a top-level .ngd file that is a fully expanded design file.
10-63
3. Map the design with the following command. The command maps each module using the files in the pim directory. map <top_level_file>.ngd For our example: map top.ngd 4. Place and route the design with the following command. The command uses the files in the PIM directory. par -w <top_level_file>.ncd <top_level_file_par>.ncd For example: par -w example_top>.ncd example_par.ncd 5. Open the place-and-route tool and verify the locations of the modules with this command: fpga_editor <top_level_file_par>.ncd To use our example, you type the following: fpga_editor <top_level_file_par>.ncd
LO
10-64
10-65
VHDL
library ieee; use ieee.std_logic_1164.all; entity example_top is port ( inmux : in std_logic_vector(3 downto 0); sel : in std_logic_vector(1 downto 0); reset : in std_logic; clk : in std_logic; output : out std_logic); end example_top; architecture beh of example_top is component mux is port ( inmux : in std_logic_vector(3 downto 0); sel : in std_logic_vector(1 downto 0); outmux : out std_logic); end component; component flop is port ( inflop : in std_logic; clk : in std_logic; reset : in std_logic; outflop : out std_logic); end component; signal bridge : std_logic; begin U0 : mux port map (inmux,sel,bridge); U1 : flop port map (bridge,clk, reset, output); end beh;
LO
10-66
Verilog
module modular_design_top (inmux, sel, reset, clk, out); input [3:0] inmux; input [1:0] sel; input reset; input clk; output out; wire bridge; mux U0 (.inmux(inmux), .sel(sel), .outmux(bridge)); flop U1 (.inflop(bridge), .outflop(out), .reset(reset), .clk(clk)); endmodule
VHDL
library ieee; use ieee.std_logic_1164.all; entity mux is port ( inmux : in std_logic_vector(3 downto 0); sel : in std_logic_vector(1 downto 0); outmux : out std_logic); end mux; architecture beh of mux is attribute syn_black_box : boolean; attribute syn_black_box of beh : architecture is true; attribute xc_modular_region : string; attribute xc_modular_region of beh : architecture is "CLB_R1C1:CLB_R5C5"; begin end beh;
10-67
Verilog
module mux (inmux, sel, outmux) /* synthesis syn_black_box xc_modular_region="CLB_R1C1:CLB_R5C5" */; input input output endmodule [3:0] inmux; [1:0] sel; outmux;
VHDL
library ieee; use ieee.std_logic_1164.all; entity flop is port ( inflop : in std_logic; clk : in std_logic; reset : in std_logic; outflop : out std_logic); end flop; architecture beh of flop is attribute syn_black_box : boolean; attribute syn_black_box of beh : architecture is true; attribute xc_modular_region : string; attribute xc_modular_region of beh : architecture is "CLB_R7C7:CLB_R8C8"; begin end beh;
LO
10-68
Verilog
module flop (inflop, outflop, reset, clk) /* synthesis syn_black_box xc_modular_region="CLB_R7C7:CLB_R8C8" */; input inflop; input reset; input clk; output outflop; endmodule
Often, the team leader has a rough idea of the area of the module. Use
this rough area estimate to determine the area range on the FPGA.
10-69
Make sure the object names and the case in the .scp file match the
names and case in the source file.
Use the portprop command to specify pad placement and pad type. Specify fixed placement for I/O pads with the instprop command.
For the syntax of these commands, see the Reference Manual. 3. Include the .scp command file in your project by doing one of the following:
Add the include directive to your project file, and specify the .scp file
with the pad placement information.
Add the include directive to a Tcl script file, and specify the .scp file
with the pad placement information. Read the Tcl script into your project. For more information about the include directive, see the Reference LO Manual. 4. Resynthesize your design.
10-70
When you modify and resynthesize the design, the software keeps the pin locations specified in the included .scp file.
10-71
LO
10-72
4. Open the Identify Instrumentor either by selecting the Launch Identify icon ( ) in the toolbar or by selecting Run->Identify Instrumentor. If you do not have an implementation created when you select Run->Launch Identify Instrumentor or select the Launch Identify icon ( ), the following message dialog box appears. Select OK.
10-73
Note: If the icon and menu command are inaccessible, you are either on an unsupported platform or you are using a technology that does not support this feature.
If you have the Identify software installed but the synthesis application
cannot find it, select Locate Identify Installation (identify_instrumentor): and the ... button. This opens the Select Identify Installation Directory dialog box. Locate and select your current Identify installation directory.
LO
10-74
If you do not have the Identify software installed, select Install Identify and
click OK. Install the Identify software before proceeding as described above. 5. The Identify Instrumentor software interface opens, with an Identify project automatically set up for the design to be debugged.
10-75
A synthesis project file An instr_sources subdirectory for the instrumented HDL files Tcl scripts for loading the instrumented design
LO
10-76
7. Return to the synthesis interface and view the instrumented design that contains the debugging logic.
In the synthesis interface, open the project file for the instrumented
design, which is in theinstr_sources subdirectory listed in the Implementations Results view for your original synthesis project.
Synthesize the design. Open the RTL view to see the inserted debugging logic.
8. Place and route the instrumented design after synthesis. 9. Use the Identify Debugger tool to debug the instrumented design. You do not have access to the Identify Debugger with the evaluation copy. To use the Identify Debugger, you must have a full-up version of Identify.
10-77
LO
10-78
C H A P T E R 11
Synplify Premier Physical Synthesis Flows on page 11-2 Graph-based Physical Synthesis on page 11-4 Design Plan-based Physical Synthesis Flow on page 11-8 Graph-based Physical Synthesis with a Design Plan Flow on page 11-7 Running Physical Synthesis on page 11-9
11-1
LO
11-2
Graph-based Physical Synthesis with a Design Plan (Design Planner option of the Synplify Premier tool only) Design Plan-based Physical Synthesis (Design Planner option of the Synplify Premier tool only)
11-3
LO
11-4
Physical Synthesis
You do not need to add a place-and-route job to your project. Check the xflow_gp.log file for place-and-route results. Make sure the design is complete (including all IPs with no black boxes)
and properly constrained.
You do not have to specify a design plan file (.sfp) for your project
Creating a .sfp file requires using the separately-licensed Design Planner option of Synplify Premier. For more information, see the following topics:
For the Synplify Premier with Design Planning, see Design Plan-based
Physical Synthesis Flow on page 11-8.
Device is Xilinx Virtex-4, Virtex-II Pro, or Spartan-3 architecture. Designs can contain block RAMs, block multipliers, or external userdefined modules provided in an EDIF netlist.
Placement is defined for LOC and RLOC constraints. Xilinx place-and-route software is available for initial placement of the
design.
Black boxes, compile points, and MultiPoint synthesis area groups are
LO not present in the design.
11-6
Graph-based Physical Synthesis with a Design Plan Flow Chapter 11: Synplify Premier Design Flow
Design Plan (.sfp) Run Synplify Premier (Physical Synthesis enabled) Initial Placement
Physical Synthesis
11-7
Design Plan (.sfp) Run Synplify Premier (Physical Synthesis enabled) Design Plan-based Physical Synthesis
Vendor Place & Route with Backannotation Physical Analyst Analyze Results
LO
11-8
Synthesis log file and the place-and-route results file. Physical Analyst to view and analyze placement information. Island Timing Analyst to view and analyze timing information.
Use these tools to help facilitate creating these physical constraints. Currently, these tools are only available for Altera and Xilinx devices that support place-and-route with backannotation. 4. Create a design plan with the Design Planner, to which you can interactively assign the critical paths to rows or regions on the device. 5. Run Synplify Premier with the design plan to optimize the design. 6. Rerun the place-and-route tool and analyze results.
Create the Project File on page 11-10 Set Implementation Options on page 11-11 Run Place-and-Route on page 11-18 Synthesize the Design on page 11-21 Analyze Results on page 11-22 Running Multiple Implementations on page 11-24
11-9
2. Create a project.
HDL source files (.v/.vhd) Constraint files (.sdc) For the Design Planner option, add design plan files (.sfp). (See
Chapter 7, Design Planning and Optimizations if you do not have a design plan file.) See Chapter 2, Project Setup for information on how to add source files. LO
11-10
11-11
LO
11-12
2. Click on the Options tab and set optimization switches for physical synthesis. Make sure to enable the Physical Synthesis option.
You can also enable the Physical Synthesis switch from the Project view.
However, if you try to enable this option without a Synplify Premier license, the following message appears:
11-13
Set an overall target frequency for the design. See Specifying Global
Frequency and Constraint Files on page 3-6 for information.
Make sure the constraint file that you want to use is selected. If you
do not see the desired constraint files in the pane, you need to either create one, or add an existing .sdc file to your project.
See:
LO
11-14
4. Click on the Implementation Results tab and specify your output options. See Specifying Result Options on page 3-9 for details.
11-15
6. From the Verilog/VHDL tab, specify the desired HDL options. See Setting Verilog and VHDL Options on page 3-11.
7. If you are running the Design-based or Graph-based with a design plan physical synthesis flow, click on the Design Planning tab and make sure the design plan file (.sfp) is selected. For Altera and certain Xilinx technologies, you must create a design plan (.sfp) to run physical synthesis. However, you do not need to select a design plan file to run Graph-based physical synthesis.
LO
11-16
If you try to enable a design plan file (.sfp) without a Design Planner license, a popup message appears stating that the current license does not support design planning.
Include any necessary netlist restructure file (.nrf) for which bit
slicing or zippering might have been performed.
11-17
Run Place-and-Route
The following instructions describe how to set-up the place-and-route option to run after physical synthesis has completed. Note that the Graph-based Physical Synthesis and the Graph-based with a design plan flows automatically runs the Xilinx place-and-route tool for initial placement during synthesis and requires no setup. By default the software uses the place-and-route xilinx_gp.opt options file. To create a final place-and-route job to run after synthesis, do the following: 1. From the Project view window, press the New P&R... button and specify the following:
Cyclone, Cyclone-II, Stratix, Stratix-II, and Stratix-GX and Xilinx Spartan-3, Virtex-II, Virtex-II Pro, and Virtex-4 technologies.
Click on the Existing Options File button and navigate to the location of
the options file.
11-19
Once you create and add the place-and-route job for the implementation, this job should be enabled on the Place and Route tab of the Options for Implementation dialog box.
LO
11-20
For information about running place-and-route, see Running Place-andRoute After Synthesis on page 10-21. 2. Save the project file.
During this phase, mapping and physical synthesis are integrated. All optimizations are done with placement-aware synthesis. When physical synthesis completes, Done! appears in the status window of the Project view.
11-21
Analyze Results
You can display the physical synthesis results graphically using the HDL Analyst, Physical Analyst, and Island Timing Analyst tools.
Log File
Click the View Log button in the Project view and analyze results. This displays the log file in either text (.srr) or HTML (.htm) format. The log file contains default timing and area reports. See Log File Command on page 3-32 in the Reference Manual and Analyze Results on page 11-22 for information on analyzing the results.
HDL Analyst
The RTL and Technology views are schematic views used to graphically analyze your design. To open an RTL view for a compiled design, do the following:
Double-click the .srs file in the Implementation Results view. To open a flattened RTL view, select HDL Analyst->RTL->Flattened View.
To open a Technology view for a mapped (synthesized) design, do the following:
Select HDL Analyst ->Technology->Hierarchical View. Click the Technology View icon (NAND gate icon (
).
Double-click the .srm file in the Implementation Results view. To open a flattened Technology view, select HDL Analyst-> Technology>Flattened View.
LO
11-22
For more information about using the HDL Analyst views, see the following:
Basic Operations in the Schematic Views on page 4-16 Exploring Design Hierarchy on page 4-30 Finding Objects on page 4-37 Analyzing With the HDL Analyst Tool on page 4-56 Analyzing Timing on page 4-73 Physical Analyst
The Physical Analyst tool provides a visual display of the floorplan, placement, and global routing of the design after design planning and place-androute have been run. To display the Physical Analyst view, you can:
Click on the Physical Analyst icon ( ) from the Physical Analyst toolbar. Select HDL Analyst->Physical Analyst in the Project view. Select the .srm file, then right-click and select Open Using Physical Analyst
from the popup menu. The Physical Analyst view is capable of showing instances and nets. For more information, see Chapter 5, Physical Analyst.
).
11-23
LO
11-24
Index
Symbols
*.acf file 3-65 *.lp file 3-65 *.ncf file 3-65 .edf file 8-29 .ndf file 8-29 .prf file 3-65 .sdc file 3-20 .v files. See Verilog .vhd files. See VHDL .vqm file Clearbox 8-18 FLEX design tips 8-12 forward-annotation 3-65 I/O packing 8-18 instantiating LPMs as black boxes 6-88 LPM megafunction example (Verilog) 6-88 LPM megafunction example (VHDL) 6-90 multi-port RAMs 6-69 netlist 8-6 pin loc files converting to SDC 3-43 PLLs. See altplls RAMs 6-67 ROMs 8-12 simulating LPMs 8-20 STRATIX additional tips for Synplify Premier Design Planner 9-2 Stratix RAM 6-61 Verilog LPM library 6-97 Altera devices physical synthesis 11-3 Altera MegaWizard generating LPM files 6-88 altera_implement_in_eab attribute 8-14 altera_implement_in_esb attribute 8-14 altpll component declaration files 8-15 using 8-15 altplls constraints 8-15 altshift_tap, set implmentation style 6-80 ALTSYNCRAM for LPMs 6-88 ALTSYNCRAM, Altera Stratix 6-61 analyzing netlists 5-42 annotated properties for analyst options for implementation dialog box 3-6
Index-1
A
Actel ACTgen macros 8-9 I/O pad type 3-40 macro libraries 8-8 output netlist 8-6 pin numbers for bus ports 8-3 ACTgen macros 8-9 Add marker command 5-29 adjust pin view 7-7 alspin bus port pin numbers 8-3 pin locations 8-2 Alt key column editing 2-6 mapping 4-52 Altera Apex design tips 8-12 Clearbox. See Clearbox converting PIN files 3-43 design tips 8-11 EABs 8-14 ESBs 8-14
Fpga User Guide, December 2005
APEX netlist 8-6 packing I/Os 8-18 archive project (GUI, How to) 2-26 area, optimizing 6-3 assigning critical paths to a region 4-98 asterisk wildcard Find command 4-42 Atmel output netlist 8-6 attributes adding 3-66 from RTL and Technology views 3-74 in constraint files 3-64 in SCOPE 3-68 Verilog 3-68 VHDL 3-66 altera_implement_in_eab 8-14 altera_implement_in_esb 8-14 collections 3-50 effects of retiming 6-49 for FSMs 6-15, 6-23 pipelining 6-42 VHDL package 3-67 audience for the document 1-11 auto constraints using 3-45 Auto route cross probe insts command 5-34
B
B.E.S.T 4-19 back annotation after place-and-route 10-25 backslash escaping dot wildcard in Find command 4-42 in Find command 5-26 batch mode 10-2 Behavior Extraction Synthesis Technology. See B.E.S.T bit slicing 7-26 guidelines 7-32 legal primitives 7-32 black boxes 6-30 adding constraints 6-34
Index-2
adding constraints in SCOPE 6-37 adding constraints in Verilog 6-36 adding constraints in VHDL 6-35 EDIF naming consistency 6-39 for IP cores 8-29 gated clock attributes 6-108 instantiating in Verilog 6-30 instantiating in VHDL 6-32 internal startup blocks 6-39 pin attributes 6-38 prepared component method (Altera) 6-96 specifying timing information for Xilinx cores 8-29 timing constraints 6-34 block FIFOs (Synplify Premier Design Planner) displaying 9-10 block Mults (Design Planner) displaying 9-11 block RAM 9-24 dual-port, mapping with registered address 6-71 glue logic in 6-72 mapping dual port coding style 6-77 mapping ROM (Xilinx) 6-79 mapping to single-output dual-port 6-77 mapping to single-port 6-75 single-port mapping with registered address 6-70 using registered addresses 6-70 using registered output 6-73 block RAM (Design Planner) displaying in the Physical View 9-11 block RAM regions assigning 9-27 creating 9-25 bookmarks in source files 2-6 using in log files 4-4 BRAMs (Synplify Premier) 9-24 breaking up large primitives (Synplify Premier) 7-26 browsers 4-30 buffering crontrolling 6-8
Index BUFG for fanouts 6-9 BUFGDLL 8-36 bus drag and drop 3-22 clock groups effect on false path constraints 3-39 for global frequency clocks 3-29 Xilinx DCMs and DLLs 3-31 clock pins 7-17 clock trees 4-73 clocks asymmetrical 3-30 defining 3-28 for DCMs and DLLs 3-31 for PLLs 3-31 frequency 3-30 gated 3-32 gated. See gated clocks. implicit false path 3-39 limited resources 3-32 overriding false paths 3-39 collections adding attributes to 3-50 adding objects 3-51 concatenating 3-51 constraints 3-50 copying 3-58 creating from common objects 3-51 creating from other collections 3-49 creating in SCOPE 3-48 creating in Tcl 3-51 crossprobing objects 3-49 definition 3-47 diffing 3-51 highlighting in HDL Analyst views 3-57 iterating through objects 3-58 listing objects 3-58 listing objects and properties 3-57 listing objects in a file 3-58 listing objects in columnar format 3-57 listing objects with c_list 3-57 Tcls script window and SCOPE comparison 3-47 using Tcl expand command 3-55 using Tcl find command 3-53 viewing 3-56 colors in text files 2-10 column editing 2-6 commands Auto route cross probe insts (Physical Analyst) 5-34 Expand Path Forward 5-54 Go to Location 5-27
Index-3
C
c_diff command examples 3-52 c_foreach command using 3-58 c_intersect comamnd examples 3-52 c_list command different from c_print 3-57 example 3-59 using 3-57, 3-58 c_print command different from c_list 3-57 using 3-58 c_symdiff command examples 3-53 c_union command examples 3-52 callback functions, customizing flow 10-10 carry chain DRC (Synplify Premier) 9-17 carry chains inferring 8-25 case sensitivity Find command (Tcl) 3-54 Clearbox file-handling for Quartus 8-18 implementing Stratix megafunctions with 8-16 using 8-16 Verilog port and parameter definitions 8-17 clock buffers 8-36 clock constraints edge-to-edge delay 3-27 false paths 3-39 clock constraints, setting 3-27 clock DLLs 8-36 clock domains setting up 3-32
Fpga User Guide, December 2005
Go to Next 5-30 Go to Previous 5-30 Highlight Visible Net Instances (Physical Analyst) 5-46 Markers 5-29 Select Net Instances 5-46 Selection Transcription 5-16 Send Crossprobes when selecting (Physical Analyst) 5-34 Signal Flow 5-11 slice_primitive 7-26 zipper_inst_hier 7-37 comment characters in text files 2-10 comments in source files 2-6 compile points creating constraint file 10-34 defining in constraint files 10-31 preserving with syn_hier 10-36 setting constraints 10-35 compiler directives (Verilog) specifying 3-12 Conformal 10-16 connectivity-based timing report 4-83 constants extracting from VHDL source code 3-14 constraint files 3-60 See also SCOPE applying to a collection 3-50 black box 6-34 colors 2-10 comments 2-10 creating in a text editor 3-62 creating with SCOPE 3-19 define_clock 3-62 define_reg_input_delay 3-63 effects of retiming 6-49 enter or edit 3-22 Find command 3-31 fonts 2-10 forward-annotating 3-64 module-level, Xilinx 10-60 opening 3-20 options 3-7 setting for compile points 10-35 specifying through points 3-35 syn_reference_clock attribute 3-62 tabs 2-10 types of 3-21 vendor-specific 3-64
Index-4
when to use 3-60 constraints altplls 8-15 translating from Xilinx UCF 3-42 Xilinx UCF 3-42 context for object in filtered view 4-59 control panel displaying instances 5-7 displaying nets 5-7 displaying objects 5-6 displaying row sites 5-7 displaying signal pins 5-7 Objects pane 5-6 Physical Analyst view 5-5 selecting objects 5-6 control panel (Physical Analyst) 5-5 panes 5-6 copy project (GUI, How to) 2-34 core cells displaying 5-31 CoreGen 8-29 cores, instantiating in Xilinx designs 8-29 critical paths delay 4-75 Expand Path Forward command 5-54 flat view 4-74 hierarchical view 4-74 islands 4-83 slack time 4-75 tracing forward 5-54 tracing in Physical Analyst 5-54 using -route 6-4 viewing 4-74 critical paths (Physical Analyst) 5-51 crossprobing 4-48 allowing to place-and-route file 4-27 and retiming 6-48 collection objects 3-49 filtering text objects for 4-53 from FSM viewer 4-54 from log file 4-5 from message viewer 4-10 from text files 4-51 Hierarchy Browser 4-49 importance of encoding style 4-55 paths 4-52 Physical Analyst view 5-34
Fpga User Guide, December 2005
Index RTL view 4-50 Technology view 4-50 Text Editor view 4-50 text file example 4-52 to FSM Viewer 4-54 Verilog file 4-50 VHDL file 4-50 View Cross Probing commands 5-34 within RTL and Technology views 4-49 crossprobing (Physical Analsyt) RTL view 5-35 Technology view 5-38 crossprobing (Physical Analyst) auto route crossprobing 5-41 RTL view 5-37 Technology view 5-35 text files 5-35, 5-36 crossprobing commands (Synplify Premier) Physical Analyst view 5-34 current level expanding logic from net 4-63 expanding logic from pin 4-63 current level and below search 4-39 current level search 4-39 customization callback functions 10-10 Cypress netlist 8-6 design flow customizing with callback functions 10-10 physical synthesis 11-8 design flows FPGA generic 1-8 Synplify 1-16 Synplify Premier 1-20 Synplify Pro 1-16 synthesis 1-16 design guidelines 6-2 design hierarchy viewing 4-56 design plan 7-2 guidelines 7-1 options 3-8 Design Plan Editor view moving regions 7-21 preserving region resources 7-23 resizing regions 7-22 Design Planner 7-2 design plans displaying IP core areas 7-19 design size amount displayed on a sheet 4-27 design view display history moving between design views 4-26 device options See alsoimplementation options device view Physical Analyst 5-8 dialog boxes Enhanced Instance Display 5-31 Find Object 5-23 Physical Analyst Properties 5-18 Resolve Selection 5-15 digital clock managers (Synplify Premier) see DCMs 9-11 directives adding 3-66 Verilog 3-68 VHDL 3-66 black box 6-35, 6-36 for FSMs 6-15 specifying for the compiler (Verilog) 3-12 syn_state_machine 6-20 syn_tco 6-36
Index-5
D
DCMs defining clocks 3-31 DCMs (Synplify Premier) displaying 9-11 default constraints 3-24 default enum encoding 3-14 define_attribute 3-73 define_clock constraint 3-62 define_false_paths constraint 3-63 define_input_delay constraint 3-63 define_multicycle_path constraint 3-63 define_output_delay constraint 3-63 define_reg_input_delay constraint 3-63 define_reg_output_delay constraint 3-63 design entry 1-9
Fpga User Guide, December 2005
adding black box constraints 6-35 syn_tpd 6-36 adding black box constraints 6-35 syn_tsu 6-36 adding black box constraints 6-35 displaying instances (Physical Analyst) 5-10 Dissolve Instances command using 4-70 dissolving 4-70 DLLs defining clocks 3-31 dot wildcard Find command 4-42 drag and drop 3-22 drivers preserving duplicates with syn_keep 6-11 selecting 4-66 dual-port RAMs 6-69 block RAMs with single registered output, Xilinx 6-77 Stratix 6-62
E
EABs, inferring 8-14 edf2srs.exe translator 3-42 EDIF structural, for Xilinx IP cores 8-20, 8-29 synthesizing 8-39 EDIF files reoptimizing with 8-39 Edit menu commands for editing source files 2-5 Editing window 2-5 emacs text editor 2-8 encoding styles and crossprobing 4-55 default VHDL 3-14 FSM Compiler 6-19 enhanced display mode 5-31 Enhanced Instance Display dialog box 5-31 environment variables SYN_TCL_HOOKS 10-10
Index-6
equivalence checking VIF file 10-13 equivalency checking handling failure 10-18 error messages gated clock report 6-106 errors definition 2-5 filtering 4-9 sorting 4-9 source files 2-4 Verilog 2-4 VHDL 2-4 ESBs, inferring 8-14 Expand command using 4-63 expand command Tcl. See Tcl expand command Expand command (Physical Analyst) 5-43 Expand commands connections 4-66, 5-48 pin and net logic 4-62 Expand commands (Physical Analyst) pin and net logic 5-43 Expand Inwards command using 4-63 Expand Path Forward command 5-54 Expand Paths command different from Isolate Paths 4-66 expand pin view 7-7 Expand to Register/Port command using 4-63 Expand to Register/Port command (Physical Analyst) 5-43 expanding connections 4-66 connections (Physical Analyst) 5-48 pin and net logic 4-62 expanding (Physical Analyst) pin and net logic 5-43
F
false paths defining between clocks 3-39 I/O paths 3-39
Fpga User Guide, December 2005
Index impact of clock group assignments 3-39 overriding 3-39 ports 3-38 registers 3-38 setting constraints 3-38 fanouts buffering vs replication 6-8 hard limits 6-8 soft global limit 6-7 soft module-level limit 6-7 using syn_maxfan 6-7 features Synplify 1-2 Synplify Pro 1-2 files *.acf 3-65 *.lp 3-65 *.ncf 3-65 .prf 3-65 .sdc 3-20 .v 2-2 .vhd 2-2 altpll component declarations 8-15 filtered messages 4-13 fsm.info 6-20 log 4-2 message filter (prf) 4-12 output 8-6 rom.info 4-33 specifying tcl 7-37 statemachine.info 6-28 synhooks.tcl 10-10 Tcl 10-4 See also Tcl commands Tcl batch script 10-3 Xilinx UCF 3-42 Filter Schematic command using 4-60 Filter Schematic icon using 4-61 filtered search (Physical Analyst) 5-26 filtering 4-60 advantages over flattening 4-60 using to restrict search 4-39 filtering (Physical Analyst) 5-42 Find command 4-39 browsing with 4-38
Fpga User Guide, December 2005
constraint file 3-31 hierarchical search 4-40 long names 4-38 message viewer 4-9 Physical Analyst view 5-23 reading long names 4-41 search scope, effect of 4-42 search scope, setting 4-40 searching the mapped database 4-40 searching the output netlist 4-45 setting limit for results 4-41 using Filter Search option 5-26 using in RTL and Technology views 4-39 using wildcards 4-42, 5-26 wildcard examples 4-44 find command Tcl. See Tcl find command Find command (Tcl) case sensitivity 3-54 database differences 3-47, 3-49 pattern matching 3-54 Tcl window vs SCOPE 3-47 Find Object dialog box 5-23 finding information information organization 1-13 finding objects Physical Analyst view 5-23 Fix Gated Clocks option. See gated clocks Flatten Current Schematic command transparent instances 4-68 using 4-68 Flatten Schematic command using 4-68 flattening 4-67 See also dissolving compared to filtering 4-60 hidden instances 4-69 transparent instances 4-68 using syn_hier 6-10 FLEX netlist 8-6 fonts setting in text files 2-10 forward annotation frequency constraints in Xilinx 8-28 initial values 6-86 vendor-specific constraint files 3-64
Index-7
forward-annotation constraints 8-26 FPGA design flow, generic 1-8 frequency clocks 3-30 internal clocks 3-30 other signals 3-30 setting global 3-6 from constraints specifying 3-35 FSM Compiler 6-17 advantages 6-17 enabling 6-18 FSM encoding user-defined 6-16 using syn_enum_encoding 6-16 FSM Explorer 6-22 running 6-23 when to use 6-22 FSM view crossprobing from source file 4-51 FSM Viewer 6-25 crossprobing 4-54 fsm.info file 6-20 FSMs See also FSM Compiler, FSM Explorer attributes and directives 6-15 defining in Verilog 6-13 defining in VHDL 6-14 definition 6-13 optimizing with FSM Compiler 6-17 properties 6-28 state encodings 6-27 transition diagram 6-25 viewing 6-25
generated clocks 6-111 generated-clock conversion 6-111 generics extracting from VHDL source code 3-14 global optimization options 3-5 glue logic Altera Stratix RAM 6-61 Go to Location command 5-27 creating markers 5-28 Go to Next command 5-30 Go to Previous command 5-30 GSR resources 8-24
H
HDL Analyst See also RTL view, Technology view critical paths 4-74 crossprobing 4-48 filtering schematics 4-60 Push/Pop mode 4-33, 4-35 traversing hierarchy with mouse strokes 4-31 traversing hierarchy with Push/Pop mode 4-33 using 4-56 HDL Analyst tool deselecting objects 4-24 selecting/deselecting objects 4-23 HDL Analyst views highlighting collections 3-57 help information organization 1-13 hidden instances consequences of saving 4-58 flattening 4-69 restricting search by hiding 4-39 specifying 4-57 status in other views 4-57 hierarchical design expanding logic from nets 4-63 expanding logic from pins 4-63 hierarchical instances dissolving 4-70 hiding. See hidden instances, Hide Instances command multiple sheets for internal logic 4-59 pin name display 4-61
Fpga User Guide, December 2005
G
gated clocks attributes for black boxes 6-108 conversion example 6-103 conversion report 6-105 conversion requirements 6-103 error messages in report 6-106 examples 6-100 procedure for fixing 6-101 restrictions 6-110 Synplicity approach 6-99
Index-8
Index viewing internal logic 4-58 hierarchical objects pushing into with mouse stroke 4-32 traversing with Push/Pop mode 4-33 hierarchical search 4-39 hierarchy flattening 4-68 netlist restructuring 3-16 traversing 4-30 hierarchy browser clock trees 4-73 controlling display 4-27 crossprobing from 4-49 defined 4-30 finding objects 4-37 traversing hierarchy 4-30 Highlight Visible Net Instances command 5-46 copying 2-23 deleting 2-23 multiple. See multiple implementations. renaming 2-23 include paths updating older project files 2-21 Initial Values forward annotation 6-86 input constraints, setting 3-33 input files. See source files instances preserving with syn_noprune 6-11 properties 4-20, 5-19 properties of pins 4-20 instances (Physical Analyst) 5-7 interactive Island Timing Analyst 4-86 IP core areas 7-19 IP cores 8-29 Island Timing Analyst 4-83 generating island timing report 4-86 interactive 4-86 island timing report Island Timing Analyst 4-86 islands timing report 4-83 Isolate Paths command different from Expand Paths 4-66, 4-67 ispLEVER forward-annotating constraints for 8-26
I
I/O banks (Synplify Premier) displaying 9-11 I/O insertion 8-25 I/O pads specifying I/O standards 3-40 I/O paths false path constraint 3-39 I/O standard 3-40 I/Os auto-constraining 3-46 constraining 3-33 packing in Apex designs 8-18 packing in Xilinx designs 8-33 pin-locked 7-24 preserving 8-26 specifying pad type (Xilinx) 8-38 Verilog black boxes 6-30 VHDL black boxes 6-32 implementation options 3-2 design plan file 3-8 device 3-2 global frequency 3-6 global optimization 3-5 netlist optimizations 3-16 part selection 3-2 specifying results 3-9 implementations
Fpga User Guide, December 2005
K
key assignments customizing 10-11 keyword completion, Text Editor 2-6
L
Lattice constraint file 3-65 forward annotation 3-64 macro libraries 8-23 Lattice netlist 8-6 location constraints RLOCs 8-35
Index-9
log file gated clock conversion report 6-105 gated clock error messages 6-106 physical synthesis 10-26 log files checking FSM descriptions 6-24 checking information 4-2 colors 2-10 fonts 2-10 pipelining description 6-43 retiming report 6-48 setting default display 4-2 state machine descriptons 6-19 tabs 2-10 viewing 4-2 Log Watch window 4-6 moving 4-6, 4-8 multiple implementations 2-23 resizing 4-6, 4-8 logic expanding between objects 4-66 expanding from net 4-63, 5-46 expanding from pin 4-63, 5-43 logic preservation syn_hier 6-12 syn_keep for nets 6-11 syn_keep for registers 6-11 syn_noprune 6-11 syn_preserve 6-11 LPM_RAM_DQ VHDL example 6-96 LPMs Altera megafunction example (Verilog) 6-88 Altera megafunction example (VHDL) 6-90 black box method simulation flow 8-20 comparison of Altera instantiation methods 6-87 generics method, Cypress 6-94 in .vqm 6-88 instantiating as black boxes 6-87 instantiating as black boxes (Altera) 6-88 instantiating with a Verilog library (Altera methodology) 6-88 instantiating with a Verilog library (Synplicity methodology) 6-97 instantiating with VHDL prepared components 6-94 using in Altera simulation flows 8-20
Index-10
Verilog black box (Cypress) 6-92 Verilog library simulation flow 8-21 VHDL prepared component simulation flow 8-21 VHDL prepared components instantiation example 6-95 LPMs, Altera 6-87
M
macro libraries Lattice 8-23 markers adding 5-29 advancing to next 5-31 creating 5-28 deleting 5-30 in Physical Analyst view 5-29 measuring distance 5-30 moving 5-30 using 5-29 markers (Physical Analyst) adding 5-29 Markers command 5-29 Add marker 5-29 Go to Next 5-30 Go to Previous 5-30 Remove All 5-30 Remove Selected 5-30 Max netlist 8-6 megafunctions altplls 8-15 using Clearbox 8-16 Megawizard altplls 8-15 memory usage maximizing with HDL Analyst 4-72 Message viewer filtering messages 4-10 saving filter expressions 4-12 searching 4-9 using the F3 key to search forward 4-9 using the Shift-F3 key to search backward 4-9 message viewer using 4-8 Message viewer keyboard shortcuts 4-9
Index messages filtering 4-10 saving filter information from command line 4-13 saving filter information from GUI 4-12 writing messages to file 4-13 mixed language files 2-16 restrictions 2-16 modular flow 10-54 design entry (leader) 10-56 design entry (module) 10-58 directory structure after module synthesis 10-60 directory structure after top-level synthesis 10-57 final assembly phase 10-63 initial design budgeting 10-55 module synthesis 10-59 place and route (module) 10-61 planning 10-55 top level synthesis 10-61 mouse strokes in Physical Analyst 5-20 navigating between views 5-21 pushing/popping objects 4-31 mouse strokes (Physical Analyst) 5-20 moving regions Design Plan Editor view 7-21 mulitiple implementations running (project) 2-23 multicycle constraints forward-annotating 8-26 multicycle paths, setting constraints 3-28, 3-34 multiple implementations 2-22 running (from workspace) 2-25 using 11-24 multipliers pipelining restriction 6-40 multipliers, pipelining 6-40 multipoint synthesis and bottom-up flow 10-28 multipoint synthesis flow 10-29 compiling the design for initialization 10-30, 10-31 defining compile points 10-31 setting constraints 10-33 setting implementation options 10-30
Fpga User Guide, December 2005
multi-port RAMs See also dual-port RAMs Altera Stratix 6-69 multisheet schematics 4-24 for nested internal logic 4-59 searching just one sheet 4-39 transparent instances 4-25
N
name spaces output netlist 4-45 technology view 4-40 navigating among design views 4-26 netlist restructure files specifying 3-17 netlists restructuring options 3-16 netlists (Physical Analyst) analyzing 5-42 netlists for different vendors 8-6 nets expanding logic from 4-63, 5-46 preserving for probing with syn_probe 6-11 preserving with syn_keep 6-11 properties 4-20, 5-19 selecting drivers 4-66 signal flow 5-11 unfiltering 5-26 nets (Physical Analyst) resetting the display 5-13 routing 5-12 selecting instances 5-46 New property 4-22 ngdbuild command final assembly 10-63 module level 10-62 notes filtering 4-9 sorting 4-9 notes, definition 2-5 nram primitive. See dual-port RAMs, multi-port RAMs
O
object properties
Index-11
in Physical Analyst 5-19 object visibility (Physical Analyst) 5-6 objects finding 5-23 finding on current sheet 4-39 flagging by property 4-21 locating in Physical Analyst view 5-27 selecting in Physical Analyst view 5-14 selecting overlapping in Physical Analyst view 5-15 selecting/deselecting 4-23 Objects pane (Physical Analyst) 5-6 optimization for area 6-3 for timing 6-4 generated clock 6-111 logic preservation. See logic preservation. preserving hierarchy 6-12 preserving objects 6-10 tips for 6-2 optimization flows physical synthesis 11-2 options file (place-and-route) 10-23 OR 3-37 output constraints, setting 3-33 output files 8-6 specifying 3-9 output netlists finding objects 4-45 overlapping objects selecting in Physical Analyst view 5-15
P
p_nram primitive. See dual-port RAMs, multi-port RAMs, nram primitive package library, adding 2-13 pad types industry standard 3-40 par command final assembly 10-64 module level 10-62 parameters extracting from Verilog source code 3-12 part selection options 3-2
Index-12
partitioning bit slicing 7-26 path constraints false paths 3-38 pathnames using wildcards for long names (Find) 4-41 paths analyzing 4-77, 4-79 tracing between objects 4-66 tracing from net 4-63, 5-46 tracing from pin 4-63, 5-43 paths (Physical Analyst) tracing between objects 5-48 paths, crossprobing 4-52 pattern matching Find command (Tcl) 3-54 PDF cutting from 2-6 Physical Analyst analyzing netlists 5-42 control panel 5-5 crossprobing RTL view 5-37 crossprobing Technology view 5-38 crossprobing text files 5-36 device view 5-8 displaying instances 5-10 input files 5-2 object properties 5-19 opening view 5-4 properties 5-18 routing nets 5-7 Physical Analyst keyboard shortcuts 5-21 Physical Analyst view adding markers 5-29 creating marker 5-28 critical paths 5-51 crossprobing 5-34 deleting markers 5-30 displaying net signal flow 5-11 displaying signal pins 5-10 Expand commands 5-43 filtering 5-42 finding objects (Physical Analyst) 5-23 Go to Location command 5-27 instance properties 5-19 measuring distance 5-30 mouse strokes 5-20
Fpga User Guide, December 2005
Index moving markers 5-30 net properties 5-19 selecting objects 5-14 tool tips 5-20 transcribing objects 5-16 using markers 5-29 using Selection Transcription 5-16 zoom selected objects 5-22 physical constraints Altera guidelines 9-2 Xilinx guidelines 9-8 physical coordinates marking 5-29 physical optimization description 1-4 physical synthesis Altera devices 11-3 analyzing results 10-26 design flow 11-8 optimization flows 11-2 running place-and-route 10-21, 11-18 with back annotation 10-25 Xilinx device support 11-3 pin assignment 7-6 assigning clock pins 7-17 assigning pins 7-11 crossprobing 7-16 options 7-7 temporary assigns 7-14 pin assignment tool 7-7 pin loc constraint files converting 3-43 pin names, displaying 4-61 pins expanding logic from 4-63, 5-43 properties 4-20 pipelining adding attribute 6-42 definition 6-40 multipliers 6-40 prerequisites 6-40 whole design 6-41 place-and-route creating implementation 10-21 customizing option file 10-23 running with physical synthesis 11-18 with back annotation 10-25 with physical synthesis 10-21
Fpga User Guide, December 2005
place-and-route implementations 10-21 placement definition 1-10 PLLs defining clocks 3-31 ports false path constraint 3-38 properties 4-20 POS interface using 3-35 preferences crossprobing to place-and-route file 4-27 displaying Hierarchy Browser 4-27 displaying labels 4-27 RTL and Technology views 4-26 SCOPE 3-41 sheet size (UI) 4-27 preserving region resources Design Plan Editor view 7-23 prf file 4-12 primitives breaking up large 7-26 pin name display 4-61 pushing into with mouse stroke 4-32 viewing internal hierarchy 4-56 probes adding in source code 6-51 definition 6-50 retiming 6-50 process-level hierarchy 7-25 Product of Sums interface. See POS interface project command archiving projects (GUI, How to) 2-26 copying projects (GUI, How to) 2-34 unarchiving projects (GUI, How to) 2-31 project files adding files 2-11 adding files to 2-15 batch mode 10-2 creating 2-11 definition 2-11 deleting files from 2-15 opening 2-14 replacing files in 2-15 updating include paths 2-21 VHDL file order 2-14
Index-13
VHDL library 2-13 projects archiving (GUI, How to) 2-26 copying (GUI, How to) 2-34 restoring archives (GUI, How to) 2-31 properties displaying with tooltip 4-20 finding objects with Tcl Find 3-54 Physical Analyst 5-18 reporting for collections 3-57 viewing for individual objects 4-20 Properties command instances 5-19 nets 5-19 prototyping overview 1-4 Push/Pop mode HDL Analyst 4-31 keyboard shortcut 4-33 using 4-31, 4-33
Q
Quartus file handling for Clearbox 8-18 Quartus II background compile 8-22 foreground compile 8-22 using synthesis results to run 8-22 question mark wildcard, Find command 4-42 QuickLogic pad placement 10-70 QuickLogic netlist 8-7
R
RAM inference multi-port RAMs, Altera 6-69 Stratix dual-port 6-62 RAMs Altera Stratix 6-61 dual-port, Stratix 6-62 initializing values (Xilinx) 6-78 multi-port. See dual-port RAMs, multi-port RAMs RAMs, inferring 6-54 advantages 6-54 Altera EABs and ESBs 8-14
Index-14
Altera Flex details 6-67 Xilinx block RAMs 6-70 region assigning critical paths 4-98 regions manual logic replication 7-23 moving regions 7-21 preserving logic and memory resources 7-23 resizing regions 7-22 retiming 6-50 register balancing. See retiming register constraints, setting 3-27 register packing See also syn_useioff attribute 8-33 Altera 8-18 Xilinx 8-33 registers false path constraint 3-38 relative location. See block RAM relative placement. See RLOCs replicating logic manually regions 7-23 replication controlling 6-8 reports gated clock conversion 6-105 resizing regions Design Plan Editor view 7-22 Resolve Selection dialog box 5-15 resource sharing 8-25 optimization technique 6-3 overriding option with syn_sharing 6-6 results example 6-6 using 6-5 restore project (GUI, How to) 2-31 retiming effect on attributes and constraints 6-49 example 6-46 overview 6-44 probes 6-50 regions 6-50 report 6-48 simulation behavior 6-50 return codes 10-2 RLOCs 8-35
Fpga User Guide, December 2005
Index RLOCs, specifying 8-35 RLOCs, Xilinx 8-35 ROM block RAM mapping (Xilinx) 6-79 rom.info file 4-33 ROMs inferencing in Altera designs 8-12 pipelining 6-40 viewing data table 4-33 routing definition 1-10 routing nets (Physical Analyst) 5-7 RTL view adding attributes 3-74 crossprobing description 4-48 crossprobing from 4-49 crossprobing from Text Editor 4-51 defined 4-17 description 4-16, 11-22 filtering 4-60 finding objects with Find 4-39 finding objects with Hierarchy Browser 4-37 flattening hierarchy 4-68 highlighting collections 3-57 opening 4-18 selecting/deselecting objects 4-23 sequential shift components 6-81 setting preferences 4-26 state machine implementation 6-19 traversing hierarchy 4-30 RTL view. See also HDL Analyst RTL views analyzing clock trees 4-73 crossprobing collection objects 3-49 collections compared to Tcl script window 3-47 creating compile point constraint file 10-34 defining compile points 10-31 drag and drop 3-22 I/O pad type 3-40 pipelining attribute 6-41 setting compile point constraints 10-35 setting constraints 3-19 setting display preferences 3-41 specifying RLOCs 8-35 state machine attributes 6-15 using the wizard 3-20 using the wizard to generate defaults 3-24 SCOPE editing operations 3-23 SCOPE keyboard shortcuts 3-23 scope of the document 1-11 search browsing objects with the Find command 4-38 browsing with the Hierarchy Browser 4-37 finding objects on current sheet 4-39 setting limit for results 4-41 setting scope 4-40 using the Find command in HDL Analyst views 4-39 See also search Select Net Instances command (Physical Analyst) 5-46 selecting objects (Physical Analyst) 5-14 Selection Transcription command 5-16 selection, in RTL and Technology views 4-23 Send Crossprobes when selecting command 5-34 sequential shift components Altshift_tap 6-80 inferring 6-80 mapping 6-80 SRL16 primitives 6-80 Verilog 6-84 VHDL 6-84 set command collections 3-58 set_option command 3-4
S
schematic objects selecting/deselecting 4-23 schematic page size 4-27 schematics multisheet. See multisheet schematics selecting/deselecting objects 4-23 SCOPE adding attributes 3-68 adding probe insertion attribute 6-52 case sensitivity for Verilog designs 3-54
Fpga User Guide, December 2005
Index-15
sheet connectors navigating with 4-25 sheet size setting number of objects 4-27 shift register lookup table. See sequential shift components shift registers. See sequential shift components Shift-F3 key Message Viewer 4-9 shortcut keys (Physical Analyst) 5-21 Show Cell Interior option 4-56 Show Context command different from Expand 4-59 using 4-59 signal flow displaying in Physical Analyst view 5-11 signal flow (Physical Analyst) 5-11 Signal Flow command 5-11 signal pins displaying in Physical Analyst view 5-10 signal pins (Physical Analyst) 5-10 displaying 5-7 simulation, effect of retiming 6-50 single-port RAMs block RAM with registered output, Xilinx 6-75 sites (Physical Analyst) 5-7 slack handling 4-81 setting margins 4-74 slice_primitive command 7-26 Slow property 4-22 source code adding pipelining attribute 6-42 crossprobing from Tcl window 4-54 defining FSMs 6-13 fixing errors 2-7 opening automatically to crossprobe 4-50 optimizing 6-2 specifying RLOCs 8-35 when to use for constraints 3-60 source files
Index-16
See also Verilog, VHDL. adding comments 2-6 adding files 2-11 checking 2-4 colors 2-10 column editing 2-6 comments 2-10 copying examples from PDF 2-6 creating 2-2 crossprobing 4-51 editing operations 2-5 fonts 2-10 mixed language 2-16 specifying default encoding style 3-14 specifying top level file for mixed language projects 2-17 specifying top level in Project view 2-14 specifying top-level file in the Implementation Options dialog box 3-14 state machine attributes 6-15 tabs 2-10 using bookmarks 2-6 specifying levels 4-70 SRLs See sequential shift components state machines See also FSM Compiler, FSM Explorer, FSM viewer, FSMs. attributes 6-15 descriptions in log file 6-19 implementation 6-19 statemachine.info file 6-28 Stratix Clearbox. See Clearbox ($nopage> 8-16 dual-port rams 6-62 stratix_lcell 8-16 stratix_mac_mult 8-16 stratix_mac_out 8-16 stratix_ram_block 8-16 syn_allow_retiming attribute using for retiming 6-45 syn_black_box instantiating LPMs (Altera) 6-88 syn_black_box attribute instantiating LPMs (Cypress) 6-92 syn_edif_bit_format attribute 8-29 syn_edif_scalar_format attribute 8-29 syn_encoding attribute 6-15
Fpga User Guide, December 2005
Index syn_enum_encoding directive FSM encoding 6-16 syn_force_pad attribute using 8-26 syn_forward_io_constraints attribute 3-64 syn_hier attribute controlling flattening 6-10 preserving hierarchy 6-12 using with compile points 10-36 syn_isclock black box clock pins 6-38 syn_keep shift register inference 6-81 syn_keep attribute preserving nets 6-11 preserving shared registers 6-11 syn_keep directive effect on buffering 6-9 syn_maxfan attribute setting fanout limits 6-7 syn_noarrayports attribute use with alspin 8-3 syn_noprune directive preserving instances 6-11 shift register inference 6-81 syn_pipeline attribute 6-42 syn_preserve effect on buffering 6-9 syn_preserve directive preserving FSMs from optimization 6-15 preserving logic 6-11 preserving power-on for retiming 6-46 syn_probe attribute 6-51 inserting probes 6-51 preserving nets 6-11 syn_ramstyle attribute glue logic for Altera Stratix RAMs 6-61 multi-port RAM inference 6-58 preventing glue logic (no_rw_check) 6-72 syn_reference_clock constraint 3-62 syn_replicate attribute using buffering 6-9 syn_romstyle attribute defining ROM style 8-12
Fpga User Guide, December 2005
syn_sharing directive overriding default 6-6 syn_srlstyle attribute altshift_tap 6-80 mapping sequential shift components to registers 6-80 setting shift register style 6-80 syn_state_machine directive using with value=0 6-20 SYN_TCL_HOOKS environment variable 10-10 syn_tco attribute adding in SCOPE 6-37 syn_tco directive 6-36 adding black box constraints 6-35 syn_tpd attribute adding in SCOPE 6-37 syn_tpd directive 6-36 adding black box constraints 6-35 syn_tsu attribute adding in SCOPE 6-37 syn_tsu directive 6-36 adding black box constraints 6-35 syn_use_carry_chain attribute using 8-25 syn_useioff attribute packing registers (Altera) 8-18 packing registers (Xilinx) 8-33 preventing flops from moving during retiming 6-46 shift register inference 6-81 synhooks.tcl file 10-10 Synplify feature comparison with Synplify Pro and Synplify Premier 1-4 Synplify Premier prototyping 1-4 Synplify Premier synthesis tool feature comparison with Synplify Pro and Synplify 1-4 Synplify Pro feature comparison with Synplify and Synplify Premier 1-4 Synplify Pro software design flow 1-16 features 1-2 overview 1-2
Index-17
starting 1-12 Synplify software design flow 1-16 features 1-2 overview 1-2 starting 1-12 synplify UNIX command 1-12 synplify_premier UNIX command 1-12 synplify_premier_dp UNIX command 1-12 synplify_pro UNIX command 1-12 synplify_proto UNIX command 1-12 syntax checking source files 2-4 checking Verilog 2-4 syntax check 2-4 synthesis checking source files 2-4 checking Verilog 2-4 synthesis check 2-4 Synthesis On/Off Implemented as Translate On/Off 3-15 synthesis_on/off 3-15
T
tabs setting in text files 2-10 tcl callbacks customizing key assignments 10-11 Tcl commands batch script 10-3 entering in SCOPE 3-28 running 10-4 Tcl expand command crossprobing objects 3-49 usage tips 3-55 using in SCOPE 3-48 Tcl files 10-4 colors 2-10 comments 2-10 creating 10-5 fonts 2-10 for bottom-up synthesis 10-9 guidelines 3-61 naming conventions 3-61 recording from commands 10-5
Index-18
synhooks.tcl 10-10 tabs 2-10 using variables 10-7 wildcards 3-61 Tcl find command annotating properties 3-54 crossprobing objects 3-49 examples of filtering 3-55 usage tips 3-53 using in SCOPE 3-48 Tcl Script window crossprobing 4-54, 10-4 message viewer 4-8 Tcl script window collections compared to SCOPE 3-47 Tcl scripts See Tcl files. technology mapping, description 1-10 Technology view See also HDL Analyst adding attributes 3-74 critical paths 4-74 crossprobing 4-48, 4-49 crossprobing from source file 4-51 filtering 4-60 finding objects 4-41 finding objects with Find 4-39 finding objects with Hierarchy Browser 4-37 flattening hierarchy 4-68 general description 4-16, 11-22 highlighting collections 3-57 opening 4-18 selecting/deselecting objects 4-23 setting preferences 4-26 state machine implementation in 6-19 traversing hierarchy 4-30 Technology views crossprobing collection objects 3-49 temporary assigns 7-14 drag and drop 7-14 empty 7-14 return assignment 7-14 Text editor using 2-5 text editor built-in 2-5 external 2-8 Text Editor view
Fpga User Guide, December 2005
Index crossprobing 2-8, 4-50 Text Editor window colors 2-9 fonts 2-9 text files crossprobing 4-51 through constraints 3-35 AND lists 3-37 OR lists 3-36 time stamp, checking on files 2-16 Timing Analyst using 4-76 timing constraints 3-62 timing failures, handling 4-81 timing information critical paths 4-75 timing optimization 6-4 timing report connectivity-based 4-83 generating 4-83 viewing 4-87 generated by Timing Analyst 4-77 Island Timing Analyst 4-83 specifying format options 3-10 timing view 4-77 example 4-77 tips memory usage 4-72 to constraints specifying 3-35 tool tips (Physical Analyst) 5-20 displaying in Tcl window 5-16 top level entity specifying in VHDL 3-14 top level module specifying in VHDL 3-14 transcribing objects 5-16 transparent hierarchical instances lower-level logic on multiple sheets 4-25 transparent instances flattening 4-68 unarchive project (GUI, How to) 2-31 UNISIM library 8-29 UNIX commands synplify 1-12 synplify_premier 1-12 synplify_premier_dp 1-12 synplify_pro 1-12 synplify_proto 1-12
V
vendor-specific netlists 8-6 verification using VIF file 10-13 Verification Interface Format (VIF) file. See VIF file. Verilog ifdef and define statements 3-12 Actel ACTgen macros 8-9 adding attributes and directives 3-68 adding probes 6-51 Altera LPM library 6-97 Altera LPM megafunction example 6-88 Altera PLLs 8-15 always block hierarchy 3-16 black boxes 6-30 black boxes, instantiating 6-30 case sensitivity for Tcl Find command 3-54 checking 2-4 choosing a compiler 3-11 Clearbox port and parameter definitions 8-17 clock DLLs 8-37 creating source files 2-2 crossprobing from HDL Analyst view 4-50 defining FSMs 6-13 editing operations 2-5 extracting parameters 3-12 include paths, updating 2-21 instantiating LPMs as black boxes (Altera) 6-88 LPM black box instantiation example 6-92 mixed language files 2-16 RAM structures for inference 6-55 RLOCs 8-35 sequential shift components 6-84 specifying compiler directives 3-12
U
UCF constraints 3-42
Fpga User Guide, December 2005
Index-19
structural, for Altera megafunctions 8-16 Verilog 2001 setting global option from the Project view 3-11 setting option per file 3-11 Verilog macro libraries Actel 8-8 Lattice 8-23 VHDL Actel ACTgen macros 8-9 adding attributes and directives 3-66 adding probes 6-51 Altera LPM megafunction example 6-90 Altera PLLs 8-15 black boxes 6-32 black boxes, instantiating 6-32 case sensitivity for Tcl Find comand 3-54 checking 2-4 clock DLLs 8-37 constants 3-14 creating source files 2-2 crossprobing from HDL Analyst view 4-50 defining FSMs 6-14 editing operations 2-5 extracting generics 3-14 instantiating LPMs as black boxes (Altera) 6-88 LPM instantiation example 6-95 macro libraries, Actel 8-8 mixed language files 2-16 prepared components method of instantiation 6-96 process hierarchy 3-17 RAM structures for inference 6-55 RLOCs 8-35 sequential shift components 6-84 structural, for Altera megafunctions 8-16 VHDL files adding library 2-13 adding third-party package library 2-13 order in project file 2-14 ordering automatically 2-14 VHDL macro libraries Lattice 8-24 vi text editor 2-8 VIF file
Index-20
using 10-13 vif2conformal.tcl script 10-16 Virtex block RAM. See also block RAM. clock buffers 8-36 I/O buffers 8-38 netlist 8-7 PCI core 8-29 virtual clock, setting 3-27
W
warning messages definition 2-5 warnings feedback muxes 6-4 filtering 4-9 handling 4-14 sorting 4-9 wildcards effect of search scope 4-42 Find command (Tcl) 3-54 Find command examples 4-44 in Find command 5-26 message filter 4-11 SCOPE wizard 3-71 wildcards (Find) how they work 4-42 workspaces creating 2-24 using 2-25 write modes, Virtex-II 6-73
X
xc_clockbuftype attribute specifying 8-36 xc_fast attribute for critical paths 8-28 xc_fast attribute (Xilinx) 3-73 xc_loc attribute (Xilinx) 3-73 xc_map attribute relative location 8-35 xc_modular_region attribute determining area range 10-69 xc_padtype attribute specifying I/Os 8-38
Fpga User Guide, December 2005
Index xc_rloc attribute specifying relative location 8-36 xc_uset attribute grouping instances for relative placement 8-36 using to group instances 8-36 xflow script 10-23 Xilinx block RAMs 6-70 clock buffers 8-36 converting PAD files 3-43 CoreGen 8-29 defining DCMs and DLLs 3-31 design guidelines 8-28 forward-annotation 3-65 I/O buffers 8-38 I/O pad type 3-40 IP cores 8-29 netlist 8-7 packing registers 8-33 pin loc files converting to SDC 3-43 place-and-route option file 10-23 reoptimizing EDIF 8-39 RLOCs 8-35 tips for optimizing 8-28 UCF file 3-42 Virtex-II write modes 6-73 xc_fast_attribute 3-73 xc_loc attribute 3-73 Xilinx device support physical synthesis 11-3
Z
zipper_inst_hier commands zipper_inst_hier 7-37 zippering guidelines 7-41 partitioning 7-33 zoom selected objects (Physical Analyst) 5-22
Index-21
Index-22