+ All Categories
Home > Documents > HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual

Date post: 05-Dec-2021
Category:
Upload: others
View: 9 times
Download: 0 times
Share this document with a friend
104
© 1996-2008 Mentor Graphics Corporation All rights reserved. This document contains information that is proprietary to Mentor Graphics Corporation. The original recipient of this document may duplicate this document in whole or in part for internal business purposes only, provided that this entire notice appears in all copies. In duplicating any part of this document, the recipient agrees to make every reasonable effort to prevent the unauthorized use and distribution of the proprietary information. HDL Designer Series TM Tcl Reference Manual Software Version 2008.1 September 18, 2008
Transcript
Page 1: HDL Designer Series Tcl Reference Manual

© 1996-2008 Mentor Graphics CorporationAll rights reserved.

This document contains information that is proprietary to Mentor Graphics Corporation. The original recipient of thisdocument may duplicate this document in whole or in part for internal business purposes only, provided that this entirenotice appears in all copies. In duplicating any part of this document, the recipient agrees to make every reasonableeffort to prevent the unauthorized use and distribution of the proprietary information.

HDL Designer SeriesTM Tcl ReferenceManual

Software Version 2008.1

September 18, 2008

Page 2: HDL Designer Series Tcl Reference Manual

This document is for information and instruction purposes. Mentor Graphics reserves the right to makechanges in specifications and other information contained in this publication without prior notice, and thereader should, in all cases, consult Mentor Graphics to determine whether any changes have beenmade.

The terms and conditions governing the sale and licensing of Mentor Graphics products are set forth inwritten agreements between Mentor Graphics and its customers. No representation or other affirmationof fact contained in this publication shall be deemed to be a warranty or give rise to any liability of MentorGraphics whatsoever.

MENTOR GRAPHICS MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIALINCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY ANDFITNESS FOR A PARTICULAR PURPOSE.

MENTOR GRAPHICS SHALL NOT BE LIABLE FOR ANY INCIDENTAL, INDIRECT, SPECIAL, ORCONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING BUT NOT LIMITED TO LOST PROFITS)ARISING OUT OF OR RELATED TO THIS PUBLICATION OR THE INFORMATION CONTAINED IN IT,EVEN IF MENTOR GRAPHICS CORPORATION HAS BEEN ADVISED OF THE POSSIBILITY OFSUCH DAMAGES.

RESTRICTED RIGHTS LEGEND 03/97

U.S. Government Restricted Rights. The SOFTWARE and documentation have been developed entirelyat private expense and are commercial computer software provided with restricted rights. Use,duplication or disclosure by the U.S. Government or a U.S. Government subcontractor is subject to therestrictions set forth in the license agreement provided with the software pursuant to DFARS 227.7202-3(a) or as set forth in subparagraph (c)(1) and (2) of the Commercial Computer Software - RestrictedRights clause at FAR 52.227-19, as applicable.

Contractor/manufacturer is:Mentor Graphics Corporation

8005 S.W. Boeckman Road, Wilsonville, Oregon 97070-7777.Telephone: 503.685.7000

Toll-Free Telephone: 800.592.2210Website: www.mentor.com

SupportNet: supportnet.mentor.com/Send Feedback on Documentation: supportnet.mentor.com/user/feedback_form.cfm

TRADEMARKS: The trademarks, logos and service marks ("Marks") used herein are the property ofMentor Graphics Corporation or other third parties. No one is permitted to use these Marks without theprior written consent of Mentor Graphics or the respective third-party owner. The use herein of a third-party Mark is not an attempt to indicate Mentor Graphics as a source of a product, but is intended toindicate a product from, or associated with, a particular third party. A current list of Mentor Graphics’trademarks may be viewed at: www.mentor.com/terms_conditions/trademarks.cfm.

Page 3: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.1 3September 18, 2008

Table of Contents

Chapter 1HDS Library Contents API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9API Command Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Accessing the Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Document Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Command Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Example Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Generated HDL File Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Chapter 2HDS Tcl API Command Reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Pre-Defined Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23General Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23addLibraryMapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24configureProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25invokeGUI (). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26setDefaultView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27setRulesetLocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28HDL2Graphics Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29runH2G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30runHdlImport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31runHtmlExport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32setupH2G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33setupHdlImport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36setupHtmlExport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Batch Mode Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39runTask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40setCompileAlways (enable) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41setupTask (args) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Generation Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43runConfigGenerate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44runGenerate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45setupGenerate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Library Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48library names() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49library open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50Version Management Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51runVMChangeLock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52runVMCheckIn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53runVMCheckOut. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54runVMGet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

Page 4: HDL Designer Series Tcl Reference Manual

Table of Contents

4September 18, 2008

HDL Designer Series Tcl Reference Manual, V2008.1

runVMHistory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56runVMLabel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57runVMSynchronize (args) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58runVMUndoCheckOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59setupVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60setupVMChangeLock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61setupVMCheckIn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62setupVMCheckOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63setupVMGet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64setupVMHierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65setupVMLabel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66setupVMSynchronize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

Dynamically Created Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68Command Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68HDS objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70Command list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70architecture object commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71blockFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72caseFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73configuration object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74declaration object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76elseFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77embeddedFrame object commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78entity option object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79file object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81forFrame object commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83frameConfiguration object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84frame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85ifFrame object commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86instance object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87library object commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88machineFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90packageHeader object commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91packageBody object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

Index

End-User License Agreement

Page 5: HDL Designer Series Tcl Reference Manual

Table of Contents

HDL Designer Series Tcl Reference Manual, V2008.1 5September 18, 2008

Page 6: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.1 6September 18, 2008

List of Tables

Table 1-1. Generated HDL Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Table 2-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Table 2-2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Table 2-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Table 2-4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Table 2-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Table 2-6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Table 2-7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Table 2-8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Table 2-9. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Table 2-10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Table 2-11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Table 2-12. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Table 2-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Table 2-14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Table 2-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Table 2-16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Table 2-17. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49Table 2-18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50Table 2-19. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Table 2-20. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Table 2-21. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54Table 2-22. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Table 2-23. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Table 2-24. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Table 2-25. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58Table 2-26. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59Table 2-27. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Table 2-28. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61Table 2-29. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62Table 2-30. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63Table 2-31. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64Table 2-32. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65Table 2-33. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66Table 2-34. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Table 2-35. architecture object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71Table 2-36. blockFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72Table 2-37. caseFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73Table 2-38. configuration object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74Table 2-39. declaration object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

Page 7: HDL Designer Series Tcl Reference Manual

List of Tables

HDL Designer Series Tcl Reference Manual, V2008.1 7September 18, 2008

Table 2-40. elseFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77Table 2-41. embeddedFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78Table 2-42. entity option object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79Table 2-43. file object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81Table 2-44. forFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83Table 2-45. frameConfiguration object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Table 2-46. frame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85Table 2-47. ifFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86Table 2-48. instance object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87Table 2-49. library object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Table 2-50. machineFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90Table 2-51. packageHeader object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91Table 2-52. packageBody object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

Page 8: HDL Designer Series Tcl Reference Manual

8September 18, 2008

HDL Designer Series Tcl Reference Manual, V2008.1

Page 9: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.1 9September 18, 2008

Chapter 1HDS Library Contents API

IntroductionThis document is designed to help you use the HDS library contents API more effectively. TheHDS library contents API enables Tcl scripts to:

1. Access the structure of a design

2. Navigate the libraries, files and declarations of the design

3. Examine the hierarchies produced by component instantiation.

For more information on the Tcl language refer to:

http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html

API Command ModesThe API commands can be used in one of two modes:

• Interactive: via the console page of the HDS log window. This mode provides aconvenient way of learning about the API and debugging scripts, since the commandsprovide considerable feedback on how they should be used.This is described in moredetail in the following sections.

• Batch: via the -tcl command line switch in HDS.

Accessing the ConsoleText entered here will be executed as Tcl commands and can use the API commands describedin the following sections.

To access the log window:

1. Invoke HDS to display the Design Manager window.

2. Select Window > HDS Log Window.

Page 10: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.110

HDS Library Contents APICommand Basics

September 18, 2008

Figure 1-1. 2. Log Window

Document ConventionsIn the following examples, text in bold represents commands typed into the console, text initalics represents output from HDS in response to a command.

Command BasicsHDS API commands are either dynamically created or predefined. To start using the APIcommands you should gain access to your design library using the library opencommand:library open is an example of a predefined command. HDS responds to thecommand by creating a handle that refers to the library object to be accessed. HDS createdhandles are designated by hds followed by a unique number.

In this example hds0 is a handle referring to the library UART.

The following is an example of a dynamically created command composed of the abovereturned UART library handle and the files option.The command returns a set of handlesreferring to the UART library files. Refer to “library object commands” on page 88.

The Tcl language supports the concept of variables. Variables are set and unset with thestandard Tcl set and unset commands. To ease the use of the created handles, they are stored

library open uart hds0

hds0 files hds1 hds2 hds3 hds4 hds5 hds6hds7 hds8 hds9 hds10 hds11 hds12hds13 hds14

Page 11: HDL Designer Series Tcl Reference Manual

HDS Library Contents APIExample Scripts

HDL Designer Series Tcl Reference Manual, V2008.1 11September 18, 2008

in variables. In the following example the set command stores the UART handle hds0 invariable lib

Notice the use of nested commands where the result of the second command [library open

uart] is used as a part of the first command.

You can now use the lib variable which carries a handle to the UART library instead of thehandle itself in the command.

All objects have a ‘configure’ command option, this provides access to the attributes of theobject. If you use the configure command with no arguments, it shows the names and values ofall the attributes.

To get a list of all object command options you can type:

$lib helpError: bad option "help" should be configure or file

Example ScriptsThis section provides and explains some sample scripts that show how an HDS design can beaccessed using the Tcl API commands.

Generated HDL File PathsSome source files of a design may be HDS graphics files. Using the Tcl API commands you cannavigate to and print out the HDL text files generated from the graphics:

Steps

By copying the Tcl commands in the following table and pasting it into the HDS log window,HDS responds with a set of handles referring to the designated HDS objects and finally printsout the path to the uart_tb generated HDL file.

set lib [library open uart] hds0

$lib files hds1 hds2 hds3 hds4 hds5 hds6hds7 hds8 hds9 hds10 hds11 hds12hds13 hds14

Page 12: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.112

HDS Library Contents APIExample Scripts

September 18, 2008

Now let us see how this piece of code works.

set lib [library open UART]

A variable lib is automatically declared using the Set tcl command. The value of the variable libis substituted with the value of the command within []

In other words the result of the library open command is given to the variable lib. Refer to“library object commands” on page 88. When a '[' appears in a command, Tcl treats everythingbetween it and the matching ']' as a nested Tcl command. Tcl evaluates the nested APIcommand and substitutes its result into the enclosing command in place of the bracketed text.So the above command is translated as follows:

set lib hds0

where hds0 is an HDS handle referring to the library UART

set tb [$lib declaration uart_tb struct]

Again the value of the automatically declared variable tb is substituted with the result of thesecond command.

When a $ appears in a command, Tcl treats the letters and digits following it as a variable name,and substitutes the value of the variable in place of the name.

So $lib carries the value hds0 mentioned in the first step which is a handle referring to theUART library. The $lib together with the declaration option and the uart_tb struct argumentconstitute a new command.This command returns hds1 which is a handle referring to an HDSdeclaration. Refer to “library object commands” on page 88.

set generatedHdlFile [[$tb file] generated]

In this step you can see that there are multiple nested Tcl API commands. The value hds1of thecommand [$tb file] is used to create a second dynamic command i.e. hds1 generated. Thevalue of the second command substitutes the value of the variable generatedHDLFile.

Table 1-1. Generated HDL Commands

Tcl Command HDS Response

set lib [library open uart] hds0

set tb [$lib declaration uart_tb struct] hds1

set generatedHdlFile [[$tb file] generated] hds43

puts [$lib configurehardHdlDir]/[$generatedHdlFile configurerelativePathname]

C:/Lastbuild/32/LatestBuild/examples/uart/hdl/uart_tb_struct.vhd

Page 13: HDL Designer Series Tcl Reference Manual

HDS Library Contents APIExample Scripts

HDL Designer Series Tcl Reference Manual, V2008.1 13September 18, 2008

puts [$lib configure hardHdlDir]/[$generatedHdlFile configure relativePathname]

Finally you can print out the path of the UART_tb generated file using the puts Tcl command.Refer to “library object commands” on page 88 and “file object commands” on page 81.

/home/designs/UART/hdl/uart_tb_struct.vhd

Reporting VHDL Packages Directly Referenced by a LibraryInstead of using discrete Tcl commands, Tcl procedures will be used. Procedures in Tcl servemuch the same purpose as functions in C. They may take arguments, and may return values.The basic syntax for defining a procedure is:

proc name argList body

Once a procedure is created, it is considered to be a command, just like any other built-in Tclcommand. As such, it may be called using its name, followed by a value for each of itsarguments. The return value from a procedure is equivalent to the result of a built-in Tclcommand. Thus, command substitution can be used to substitute the return value of a procedureinto another expression.

In this example the procedure showPkgs is considered a command which takes a library objectas an argument and finally prints out the VHDL packages directly referenced by that library.

The API refers to entities and architectures, since these correspond to the separation of interfaceand implementation found both in VHDL designs and in HDS graphics files. A Verilog modulecorresponds to both an entity and architecture, so each module in Verilog text files becomesboth an entity and an architecture in the API. This allows scripts using the API to treat VHDLtext, Verilog text and HDS graphics in a consistent fashion.

All objects have a class attribute. The class attribute may have one of the following values(architecture, architectureFrame, blockFrame, caseFrame, configuration, directory, elseFrame,embeddedFrame, entity, file, forFrame, frameConfiguration, ifFrame, instance, library,machineFrame, packageBody or packageHeader).

Objects of class entity, architecture, packageHeader and packageBody support a 'packages'command that returns a list of packages used by the declaration. Refer to“Dynamically CreatedCommands” on page 68.

Steps

proc showPkgs {lib} { foreach file [$lib files] { foreach decl [$file declarations] { foreach pkg [$decl packages] { if {![info exists alreadyDone($pkg)]} { puts "[$pkg configure fullName]" set alreadyDone($pkg) 1 }

Page 14: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.114

HDS Library Contents APIExample Scripts

September 18, 2008

} } }}showPkgs [library open uart]

ieee.std_logic_1164ieee.std_logic_arithstd.TEXTIO

NoteYou can ask a Verilog declaration for its packages, the result is always an empty list. Thisuniformity can be helpful when examining mixed language designs.

Reporting Verilog Include FilesFile objects support an 'includes' command that provides access to the files `included by a file.Unlike most API functions, the include files are given in text form. This is because include filesare not constrained to reside within HDS libraries, they can be present anywhere in thefilesystem.

The following example reports all files included by the files of a library:

proc showIncls {lib} { foreach file [$lib files] { foreach inc [$file includes] { if {![info exists alreadyDone($inc)]} { puts $inc set alreadyDone($inc) 1 } } }}

Refer to “library object commands” on page 88 and “file object commands” on page 81.

Issue: our example designs have no include statements.

NoteYou can ask a VHDL file for its includes, the result is always an empty list. Thisuniformity can be helpful when examining mixed language designs.

Simple Design Hierarchy TraversalThe following example shows a script that walks the hierarchy of a design and reports itsstructure:

proc indent {} { return [string repeat { } $::indent] }

Page 15: HDL Designer Series Tcl Reference Manual

HDS Library Contents APIExample Scripts

HDL Designer Series Tcl Reference Manual, V2008.1 15September 18, 2008

The procedure indent is used as a command in the procedure walkArch. It adds indentations tothe produced results. Indent has 0 arguments and uses the string repeat command to return aspace repeated a number of times equal to the value of the variable $:: indent

proc walkArch {arch} { puts "[indent]ARCH [$arch configure fullName]" incr ::indent foreach inst [$arch instances] { puts "[indent]INST [$inst configure name]" walkArch [$inst child] } incr ::indent -1 puts "[ indent]-- end [$arch configure fullName]"}set lib [library open uart]set indent 0walkArch [$lib declaration uart_tb struct]

Refer to “library object commands” on page 88, “instance object commands” on page 87 and“architecture object commands” on page 71.

The procedure walkArch takes a library declaration as an argument and returns all the libraryarchitectures and their instances.

ARCH UART.uart_tb(struct) INST U_0 ARCH UART.tester(flow) -- end UART.tester(flow) INST U_1 ARCH UART.uart_top(struct) INST U_1 ARCH UART.cpu_interface(intconx) INST U_0 ARCH UART.control_operation(fsm) -- end UART.control_operation(fsm) -- end UART.cpu_interface(intconx) INST U_2 ARCH UART.clock_divider(flow) -- end UART.clock_divider(flow) INST U_3 ARCH UART.address_decode(tbl) -- end UART.address_decode(tbl) INST U_4 ARCH UART.serial_interface(struct) INST ser_out_muxError: Instance ser_out_mux is unbound

In this case, the command reports an error, since moduleware instances do not have acorresponding architecture.

Page 16: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.116

HDS Library Contents APIExample Scripts

September 18, 2008

Robust Design Hierarchy TraversalIf you want your script to trap unbound component instances and continue walking thehierarchy, you need to use the 'catch' command. The catch command evaluates a script and trapsexceptional returns

proc indent {} { return [string repeat { } $::indent] }proc walkArch {arch} { puts "[indent]ARCH [$arch configure fullName]" incr ::indent foreach inst [$arch instances] { if {![catch {$inst child} child]} { puts "[indent]INST [$inst configure name]" walkArch $child } } incr ::indent -1 puts "[ indent]-- end [$arch configure fullName]"}set lib [library open uart]set indent 0walkArch [$lib declaration uart_tb struct]

Refer to “library object commands” on page 88, “instance object commands” on page 87 and“architecture object commands” on page 71.

ARCH UART.uart_tb(struct) INST U_0 ARCH UART.tester(flow) -- end UART.tester(flow) INST U_1 ARCH UART.uart_top(struct) INST U_1 ARCH UART.cpu_interface(intconx) INST U_0 ARCH UART.control_operation(fsm) -- end UART.control_operation(fsm) -- end UART.cpu_interface(intconx) INST U_2 ARCH UART.clock_divider(flow) -- end UART.clock_divider(flow) INST U_3 ARCH UART.address_decode(tbl) -- end UART.address_decode(tbl) INST U_4 ARCH UART.serial_interface(struct) INST U_0 ARCH UART.xmit_rcv_control(fsm) -- end UART.xmit_rcv_control(fsm) INST U_1 ARCH UART.status_registers(spec) -- end UART.status_registers(spec) -- end UART.serial_interface(struct) -- end UART.uart_top(struct)-- end UART.uart_tb(struct)

Page 17: HDL Designer Series Tcl Reference Manual

HDS Library Contents APIExample Scripts

HDL Designer Series Tcl Reference Manual, V2008.1 17September 18, 2008

Design Hierarchy and FramesThe API uses the term 'frame' to refer to a number of constructs that add hierarchy within anarchitecture:

• FOR frames, IF frames, and BLOCK frames in a VHDL block diagram

• FOR frames, IF frames and ELSE frames in a Verilog block diagram

• FOR GENERATE, IF GENERATE and BLOCK statements in a VHDL text file

• FOR GENERATE statements in a Verilog text file

• Concurrent and hierarchical states in a state machine or algorithmic state machine(ASM)

• Concurrent flowcharts and hierarchical actions in a flow chart

With a slightly more complex script, you can gain access to these additional details:

proc indent {} { return [string repeat { } $::indent] }proc walkFrame {frame} { puts "[indent][$frame configure]" incr ::indent foreach sub [$frame subFrames] { walkFrame $sub } foreach inst [$frame instances] { if {![catch {$inst child} child]} { puts "[indent]INST [$inst configure name]" walkArch $child } } incr ::indent -1}proc walkArch {arch} { puts "[indent]ARCH [$arch configure fullName]" incr ::indent walkFrame [$arch frame] incr ::indent -1 puts "[ indent]-- end [$arch configure fullName]"}set lib [library open uart]set indent 0walkArch [$lib declaration uart_tb struct]

Refer to “library object commands” on page 88, “instance object commands” on page 87 and“architecture object commands” on page 71 and “frame object commands” on page 85.

ARCH UART.uart_tb(struct) class architectureFrame name struct INST U_0 ARCH UART.tester(flow) class architectureFrame name flow

Page 18: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.118

HDS Library Contents APIExample Scripts

September 18, 2008

class machineFrame name tester_top class machineFrame name {tester_top test_rcv} class machineFrame name {tester_top test_status} class machineFrame name {tester_top test_xmit} -- end UART.tester(flow) INST U_1 ARCH UART.uart_top(struct) class architectureFrame name struct INST U_1 ARCH UART.cpu_interface(intconx) class architectureFrame name intconx class embeddedFrame name data_out_mux INST U_0 ARCH UART.control_operation(fsm) class architectureFrame name fsm class machineFrame name cntrl_op class machineFrame name {cntrl_op RX} class machineFrame name {cntrl_op TX} -- end UART.control_operation(fsm) -- end UART.cpu_interface(intconx) INST U_2 ARCH UART.clock_divider(flow) class architectureFrame name flow class machineFrame name clk_div -- end UART.clock_divider(flow) INST U_3 ARCH UART.address_decode(tbl) class architectureFrame name tbl -- end UART.address_decode(tbl) INST U_4 ARCH UART.serial_interface(struct) class architectureFrame name struct class embeddedFrame name convert class machineFrame name conv INST U_0 ARCH UART.xmit_rcv_control(fsm) class architectureFrame name fsm class machineFrame name rcv class machineFrame name xmit -- end UART.xmit_rcv_control(fsm) INST U_1 ARCH UART.status_registers(spec) class architectureFrame name spec -- end UART.status_registers(spec) -- end UART.serial_interface(struct) -- end UART.uart_top(struct)-- end UART.uart_tb(struct)

Design Hierarchy and VHDL ConfigurationsThe previous examples walked the design hierarchy assuming that each component instancewas bound to a single architecture. In a design using VHDL configuration declarations, anarchitecture can have multiple configurations, each with different bindings for the componentinstances. Walking the hierarchy of such a design requires keeping track of the configuration.

Page 19: HDL Designer Series Tcl Reference Manual

HDS Library Contents APIExample Scripts

HDL Designer Series Tcl Reference Manual, V2008.1 19September 18, 2008

The API includes configuration objects, which correspond to VHDL configuration declarationsand frameConfiguration objects which correspond to a single level within the hierarchicalstructure of a configuration declaration. Designs containing FOR GENERATE, IF GENERATEand BLOCK statements will need corresponding entries in the configuration declarations, sowhen walking a design using configuration declarations, frames should be taken into account.

The following example shows how to walk a hierarchy using configuration declarations. It usesconfiguredSubFrames in place of subFrames and configuredChild in place of child.

proc indent {} { return [string repeat { } $::indent] }proc walkFrame {frame frameCfg} { puts "[indent][$frame configure]" incr ::indent foreach {childFrame childFrameCfg} [$frame configuredSubFrames$frameCfg] { walkFrame $childFrame $childFrameCfg } foreach inst [$frame instances] { if {![catch {$inst configuredChild $frameCfg} childInfo]} { foreach {childCfg childArch childFrameCfg} $childInfo {break} puts "[indent]INST [$inst configure name]" walkArch $childArch $childFrameCfg } } incr ::indent -1}proc walkArch {arch frameCfg} { puts "[indent]ARCH [$arch configure fullName]" incr ::indent walkFrame [$arch frame] $frameCfg incr ::indent -1 puts "[ indent]-- end [$arch configure fullName]"}set lib [library open someLib]set indent 0set cfg [$lib declaration someCfg]walkArch [$cfg architecture] [$cfg frameConfiguration]

Refer to “library object commands” on page 88, “instance object commands” on page 87 and“architecture object commands” on page 71 and “frame object commands” on page 85.

Issue: our sample designs do not use configurations.

Pruning the HierarchyThe previous examples will expand each component instance, regardless of how many times ithas previously been encountered within the hierarchy. In some cases, it is appropriate to prunethe traversal so that a declaration is seen only once. This can be accomplished by adding a checkat the start of walkArch:

proc walkArch {arch} { if {[info exists ::alreadyDone($arch)]} { return

Page 20: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.120

HDS Library Contents APIExample Scripts

September 18, 2008

}

puts "[indent]ARCH [$arch configure fullName]" incr ::indent walkFrame [$arch frame] incr ::indent -1 puts "[ indent]-- end [$arch configure fullName]"}

Finding the Compilation OrderMost VHDL compilation tools and some Verilog compilation tools need to be given the sourcefiles in an order which ensures that declarations are encountered before they are used. The APIcan be used to determine an appropriate order. The script shown below does this, though withsome restrictions:

• For graphical VHDL designs, it assumes that the generation setting is for combinedentity and architecture files.

• It does not handle VHDL configuration declarations, these require a more sophisticatedform of pruning, since a single architecture can have a different structure for eachconfiguration

• It does not handle HDL text files containing declarations that are not part of the designhierarchy

proc walkDependencies {decl} { global alreadyDone

# Only look at each declaration once. if {[info exists alreadyDone($decl)]} { return } set alreadyDone($decl) 1

# Only report each file once. set declFile [$decl file] if {[info exists alreadyDone($declFile)]} { set reportFile 0 } else { set reportFile 1 set alreadyDone($declFile) 1 }

foreach pkg [$decl packages] { walkDependencies $pkg }

if {[$decl configure class] eq "architecture"} { walkDependencies [$decl entity]

foreach inst [$decl instances] { if {![catch {$inst child} child]} { walkDependencies $child }

Page 21: HDL Designer Series Tcl Reference Manual

HDS Library Contents APIExample Scripts

HDL Designer Series Tcl Reference Manual, V2008.1 21September 18, 2008

} }

set file [$decl file] set fileType [$file configure type] if {![regexp {Text$} $fileType]} { if {[lsearch {symbol blockInterface} $fileType] != -1} { # This assumes ent+arch are generated to a single file. set reportFile 0 } else { set file [$file generated] } }

if {$reportFile} { set lib [$file library] # Exclude standard and downstreamOnly libraries. if {[$lib configure type] eq "regular"} { puts "[$lib configure hardHdlDir]/[$file configurerelativePathname]" } }

if {[$decl configure class] eq "packageHeader"} { walkDependencies [$decl body] }}

catch {unset alreadyDone}set lib [library open uart]walkDependencies [$lib declaration uart_tb struct]

Refer to “library object commands” on page 88, “declaration object commands” on page 76,and “file object commands” on page 81.

/hds/install/UART/hdl/tester_flow.vhd/hds/install/UART/hdl/control_operation_fsm.vhd/hds/install/UART/hdl/cpu_interface_intconx.vhd/hds/install/UART/hdl/clock_divider_flow.vhd/hds/install/UART/hdl/address_decode_tbl.vhd/hds/install/UART/hdl/xmit_rcv_control_fsm.vhd/hds/install/UART/hdl/status_registers_spec.vhd/hds/install/UART/hdl/status_registers_spec.vhd/hds/install/UART/hdl/serial_interface_struct.vhd/hds/install/UART/hdl/uart_top_struct.vhd/hds/install/UART/hdl/uart_tb_struct.vhd

Page 22: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.122

HDS Library Contents APIExample Scripts

September 18, 2008

Page 23: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.1 23September 18, 2008

Chapter 2HDS Tcl API Command Reference

Mentor Graphics has added a number of command extensions to the Tcl language to handle andsupport the HDL Designer operations. These commands are “built-in” and are executed thesame as the standard Tcl commands.

This chapter provides a set of commands that can be used to work with and reference HDSobjects. HDS Tcl commands are either pre-defined or dynamically created.

Pre-Defined Commands

General Commands• addLibraryMapping (library args)

• configureProperties (designObject args)

• invokeGUI ()

• setDefaultView (library file primary secondary)

• setRulesetLocation (location)

Page 24: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.124

HDS Tcl API Command ReferenceaddLibraryMapping

September 18, 2008

addLibraryMappingAdd a library mapping and save the current .hdp file.

Syntax

addLibraryMapping (library args)

Arguments

library Library name.

args Option names and values.

hdl <path> The path for the library hdl mapping.

protected Make the library protected.

regular Make the library regular.

downstream <sectionName pathsectionName path ...>

Add one or more downstream library mappings.

Page 25: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferenceconfigureProperties

HDL Designer Series Tcl Reference Manual, V2008.1 25September 18, 2008

configurePropertiesSet and get properties on a design object.

Syntax

configureProperties (designObject args)

Arguments

Returns

Pass only a design object to return it's property names/values as a list {{name1} val1 {name2}val2}:

set properties [::configureProperties $designObject]

Pass a design object and a property name to get the value of the property on this object:set propertyValue [::configureProperties $designObject$propertyName]

Pass a design object and a list of property name/value pairs to set the value of properties on thisobject:

::configureProperties $designObject {$propertyName $propertyValue}

designObject Design object: {library|library/file|library.unit?primaryName? ?secondaryName? ?filePath?}.

args Optional sequence of property keys and values: key?value? ?key value? ....

Page 26: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.126

HDS Tcl API Command ReferenceinvokeGUI ()

September 18, 2008

invokeGUI ()Invoke the graphical user interface.

Page 27: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencesetDefaultView

HDL Designer Series Tcl Reference Manual, V2008.1 27September 18, 2008

setDefaultViewSet Default View.

Syntax

setDefaultView (library file primary secondary)

Arguments

library Library name.

file File path, relative to the library HDS mapping.

primary Primary HDL declaration (VHDL entity or verilogmodule).

secondary Secondary HDL declaration (VHDL architecture, usemodule name for verilog).

Page 28: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.128

HDS Tcl API Command ReferencesetRulesetLocation

September 18, 2008

setRulesetLocationSet the location for DesignChecker Rulesets.

Syntax

setRulesetLocation (location)

Arguments

location Directory path beneath which the Rulesets arelocated.

Page 29: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencesetRulesetLocation

HDL Designer Series Tcl Reference Manual, V2008.1 29September 18, 2008

HDL2Graphics Commands• runH2G (hierarchyType library file primary secondary)

• runHdlImport (library args)

• runHtmlExport (library unit view file)

• setupH2G (args)

• setupHdlImport (args)

• setupHtmlExport (args)

Page 30: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.130

HDS Tcl API Command ReferencerunH2G

September 18, 2008

runH2GConvert specified text declarations to graphics. Uses options set by setupH2G.

Syntax

runH2G (hierarchyType library file primary secondary)

Arguments

hierarchy Type SINGLE | HIERARCHY.

library Library name.

file File path, relative to the library HDL mapping.

primary Primary HDL declaration (VHDL entity or verilogmodule).

secondary Secondary HDL declaration (VHDL architecture).

Page 31: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencerunHdlImport

HDL Designer Series Tcl Reference Manual, V2008.1 31September 18, 2008

runHdlImportImport HDL files. Uses options set by setupHdlImport.

Syntax

runHdlImport (library args)

Arguments

library Default target library.

args Files to import (Use filelist option to import all files in afile list)

Page 32: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.132

HDS Tcl API Command ReferencerunHtmlExport

September 18, 2008

runHtmlExportRun the HTML export on the given design object. Uses options set by setupHtmlExport.

Syntax

runHtmlExport (library unit view file)

Arguments

library Library name.

unit Design unit name.

view View name for graphics or secondary declaration namefor HDL (VHDL architecture). View name can be leftempty when exporting primary unit files (e.g. graphicalsymbol).

file File path, relative to the library HDS/HDL mapping.

Page 33: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencesetupH2G

HDL Designer Series Tcl Reference Manual, V2008.1 33September 18, 2008

setupH2GSetup the options for runH2G.

Syntax

setupH2G (args)

Arguments

args Option names and values.

View Styles Options:

createAltSmFlowChart ON|OFF(ON)

If a State Diagram view cannot be created, create aFlowChart view instead.

createBlockDiagram ON|OFF(ON)

Create a structural Block Diagram view.

createFlowChart ON|OFF (OFF) Create a Flow Chart view.

createIBD ON|OFF (OFF) Create an IBD view.

createLeafBlockDiagramON|OFF (OFF)

Create a leaf level Block Diagram view.

createStateDiagram ON|OFF(OFF)

Create a State Diagram view.

createSymbolAlways ON|OFF(OFF)

Create a symbol even if no view styles areselected.

General Options:

overwrite ON|OFF (OFF) If a graphical view already exists, overwrite it.

copyOnOverwrite ON|OFF(OFF)

Copy a view before overwriting it.

searchLibraries <libraries> Search for black box components in these libraries.

setDefaultView ON|OFF (ON) Set graphical views as default.

setLibrary <unit> <library> Specify a library for a black box component.

verbose ON|OFF (OFF) Display additional information during conversion.

setCreateForGenerate ON|OFF(ON)

Create graphical views rather than visualizations.

Block Diagram Options:

assignmentShapeRECTANGLE|BUFFER(RECTANGLE)

Specify the shape of concurrent assignments, ifextracted.

Page 34: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.134

HDS Tcl API Command ReferencesetupH2G

September 18, 2008

connectEmbedded ON|OFF(OFF)

Create signals between embedded blocks.

createEmbeddedStateDiagramON|OFF (OFF)

Create embedded state machines if possible.

defaultInstanceView ON|OFF(OFF)

Apply to instances in preference to a specifiedview.

diagramTextVisibilityNONE|ALL|PREFS (NONE)

Specify the visibility of text associated with thediagram.

extractAssignments ON|OFF(OFF)

Create separate embedded blocks for concurrentassignments.

instanceLimit <positive integer>(1000)

Maximum number of instances allowed in a BlockDiagram.

netTextVisibilityNONE|PORT_ONLY|ALL|PREFS (PORT_ONLY)

Specify the visibility of text associated with nets.

portTextVisibilityNONE|NAME_ONLY|NAME_AND_TYPE|PREFS (PREFS)

Specify the visibility of text associated withPortIO.

Placement Options:

instanceAutoSizeWIDTH|HEIGHT|WIDTH_AND_HEIGHT|NONE(WIDTH_AND_HEIGHT)

Size component instances to fit the visible text.

placementLimit <positiveinteger> (50)

Maximum number of auto-placed instances.

preservePlacement ON|OFF(OFF)

Preserve placement of existing diagrams.

Routing Options:

alignPorts ON|OFF (ON) Align port I/O with connections.

bundleLimit <positive integer>(5)

Maximum number of signals allowed in a bundle.

bundleSignalsDIRECT|INDIRECT|NONE(NONE)

Bundle signals between nodes.

busReconstruct ON|OFF (OFF) Reconstruct buses for signal slices.

connectionLimit <positiveinteger>

Maximum number of connections allowed for anet.

Page 35: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencesetupH2G

HDL Designer Series Tcl Reference Manual, V2008.1 35September 18, 2008

globalConnectors ON|OFF (ON) Create global connectors for global signals.

movePorts ON|OFF (ON) Allow connector end points to move duringrouting.

routeSignals ON|OFF (ON) Connect and route signals on the diagram.

useDefaults Set all options to default values. Default values areshown in brackets, above.

Page 36: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.136

HDS Tcl API Command ReferencesetupHdlImport

September 18, 2008

setupHdlImportSetup the options for runHdlImport.

Syntax

setupHdlImport (args)

Arguments

args Option names and values.

defaultLanguageVHDL|VERILOG|UNKNOWN(UNKNOWN)

Specify the language of source files withunrecognized extensions. Use UNKNOWN toimport non-HDL files.

importDirectoryStructureON|OFF (ON)

Import directory structure of source files.

importReferencedText ON|OFF(OFF)

Reference files from their original location insteadof copying.

setTargetDirectory <library><directory>

Specify a target directory within a target library. Ifnot specified, the root of the library HDL mappingis used.

setTargetLibrary <library><files>

Specify a library as the target for one or moresource files.

overwrite ON|OFF (ON) Overwrite existing files.

useDefaults Set all options to default values. Default values areshown in brackets, above.

Page 37: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencesetupHtmlExport

HDL Designer Series Tcl Reference Manual, V2008.1 37September 18, 2008

setupHtmlExportSetup the options for runHTMLExport.

Syntax

setupHtmlExport (args)

Arguments

args Option names and values.

HTML Settings:

-reset_defaults Reset all options back to their defaults.

-export_directory <path> Target directory for export.

-hierarchy_levels ALL|<number>(ALL)

Levels of hierarchy to descend.

-export_visualizations ON|OFF(ON)

Switch to creation of visualization.

-include_doc_typesALL|<doc_types> (ALL)

Add a list of document types to include in theexport (see the Documentation and VisualizationOptions dialog box for document type names).

-include_only_doc_types Make these document types the only ones includedfor export. More types can be added withsubsequent include_doc_types calls (see theDocumentation and Visualization Options dialogbox for document type names).

-export_all_ict ON|OFF Switch to export all ICT views.

-export_generated ON|OFF (ON) Switch to export generated files.

-export_sidedata_filesALL|REGISTERED (ALL)

Set the types of sidedata files to export.

-export_sidedata_typeUSER|DESIGN|ALL|NONE (ALL)

Set the types of sidedata to export.

-title_page AUTO|<path> (AUTO) Set the path to the title page to use.

-index_page AUTO|<page>(AUTO)

Set the index page name.

Graphics Settings:

-graphics_format JPEG|PNG|SVG(SVG)

Set the format to use when exporting graphics.

-jpeg_quality <1- 100> (100) Quality to use for JPEG graphics.

Page 38: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.138

HDS Tcl API Command ReferencesetupHtmlExport

September 18, 2008

-graphics_size <1- 100> (100) Percentage size for graphics.

Page 39: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencesetupHtmlExport

HDL Designer Series Tcl Reference Manual, V2008.1 39September 18, 2008

Batch Mode Taskso runTask(args)

o setCompileAlways (enable)

o setupTask (args)

Use these commands to setup and run tasks in batch mode.

When specifying a task, be aware that it is a tcl list, with each element of the list being a level ofhierarchy

As each element is separated with whitespace, be sure to escape whitespace that is part of a taskname

For example, if you have a flow arranged like this:

Flow 1

|--- Tool A

|--- Tool B

|--- Flow 2

|--- Tool C

|--- Tool D

This refers to "Flow 1" : {Flow\ 1}

This refers to "Tool A" : {Flow\ 1 Tool\ A}

This refers to "Tool D" : {Flow\ 1 Flow\ 2 Tool\ D}

Page 40: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.140

HDS Tcl API Command ReferencerunTask

September 18, 2008

runTaskRun a task.

Syntax

runTask (args)

Arguments

args Option names and values.

<taskName> Specify the task run. Must be specified.

[library [unit [view [pathName] ] ] ] Specifies the view to run the task on. If noneare specified uses design root.

user If HDS finds a user and a team task with thesame name, pick the user task. This is thedefault.

team If HDS finds a user and a team task with thesame name, pick the team task.

Page 41: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencesetCompileAlways (enable)

HDL Designer Series Tcl Reference Manual, V2008.1 41September 18, 2008

setCompileAlways (enable)Enable or disable incremental compilation for all incremental compilers.

Syntax

setCompileAlways (enable)

Arguments

enable ON|OFF: Set the global compile always switch (defaultsto off)

Page 42: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.142

HDS Tcl API Command ReferencesetupTask (args)

September 18, 2008

setupTask (args)Setup options for a task.

Syntax

setupTask (args)

Arguments

<taskName> Specify the task to apply these setup options to. Must bespecified.

setting <name> <value> Changes the value of the setting given by <name> on thespecified task.

single Changes the hierarchy depth to be used when running thetask to single level.

hierarchical Changes the hierarchy depth to be used when running thetask to hierarchy through blocks.

throughCpt Changes the hierarchy depth to be used when running thetask to hierarchy through components.

user If HDS finds a user and a team task with the same name,pick the user task. This is the default.

team If HDS finds a user and a team task with the same name,pick the team task.

Page 43: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencesetupTask (args)

HDL Designer Series Tcl Reference Manual, V2008.1 43September 18, 2008

Generation Commands• runConfigGenerate

• runGenerate

• setupGenerate

Page 44: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.144

HDS Tcl API Command ReferencerunConfigGenerate

September 18, 2008

runConfigGenerateGenerate VHDL configuration files for the specified graphical objects. Uses options set by

setupGenerate.

Syntax

runConfigGenerate (library entity arch)

Arguments

library (= {}) Library name.

entity (= {}) Design unit name for graphics.

arch (= {}) View name (file name without extension) for graphics file.

Page 45: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencerunGenerate

HDL Designer Series Tcl Reference Manual, V2008.1 45September 18, 2008

runGenerateGenerate HDL for the specified graphical objects. Uses options set by setupGenerate.

Syntax

runGenerate (library entity arch)

Arguments

library (= {}) Library name. (If you want to generate a whole library,then specify this value only).

entity (= {}) Design unit name for graphics.

arch (= {}) View name (file name with extension) for graphics file.

Page 46: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.146

HDS Tcl API Command ReferencesetupGenerate

September 18, 2008

setupGenerateSetup options for runGenerate and runConfigGenerate.

Syntax

setupGenerate (args)

Arguments

useDefaults Using this value will allow you to overrideyour preference values to the following.

generateAlways ON|OFF Always generate even if no changes have beenmade. Default (OFF).

semanticChecking ON|OFF Default (ON).

semanticWarnings ON|OFF Default (OFF).

tabWidth (POSITIVE INTEGER) Default (3).

autoTypeConversion NONE |CONV_FUNC_ONLY | FULL>

Default (FULL).

combineEntityArch ON|OFF Default (OFF).

embedConfigStatements ON|OFF Default (ON).

embedViewNameInConfig ON|OFF Default (ON).

embedViewNameInConfig ON|OFF Default (OFF).

hierarchicalConfigSpecificationON|OFF

Default (OFF).

thruCptsConfigSpecification ON|OFF Default (OFF).

synopsysPragmasForEmbeddedConfigON|OFF

Default (ON).

single This is the default.

hierarchical Goes down through blocks.

throughCpt Goes down through blocks and components.

genericsInConfig ON|OFF Default (OFF).

workAsLibInConfig ON|OFF Default (OFF).

leafInConfig ON|OFF Default (OFF).

viewInStandaloneConfig ON|OFF Default (OFF).

Page 47: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencesetupGenerate

HDL Designer Series Tcl Reference Manual, V2008.1 47September 18, 2008

customCodeGen ON|OFF Default (OFF). If you require a flatconfiguration file, when usingrunConfigGenerate specify -hierarchicalConfigSpecification and -thruCptsConfigSpecification with OFF.

useDefaultCustomCodeScript ON|OFF Default (ON). Specify whether you want touse the default custom code script.

includeVhdlGenProps ON|OFF Include generation properties after header ingenerated VHDL.

includeVerilogGenProps ON|OFF Include generation properties after header ingenerated Verilog.

Page 48: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.148

HDS Tcl API Command ReferencesetupGenerate

September 18, 2008

Library Commands• library names()

• library open

Page 49: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command Referencelibrary names()

HDL Designer Series Tcl Reference Manual, V2008.1 49September 18, 2008

library names()Obtains the names of all libraries in the project.

Syntax

library names()

Arguments

Returns

List of library names.

entity (= {}) Design unit name for graphics.

arch (= {}) View name (file name without extension) for graphics file.

Page 50: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.150

HDS Tcl API Command Referencelibrary open

September 18, 2008

library openOpens a library so its content can be examined.

Syntax

library open (libraryName)

Arguments

Returns

The library object, see “library object commands” on page 88.

libraryName The library to open.

Page 51: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command Referencelibrary open

HDL Designer Series Tcl Reference Manual, V2008.1 51September 18, 2008

Version Management Commands• runVMChangeLock (args)

• runVMCheckIn (args)

• runVMCheckOut (args)

• runVMGet (args)

• runVMHistory (args)

• runVMLabel (args)

• runVMSynchronize (args)

• runVMUndoCheckOut (args)

• setupVM (option arg)

• setupVMChangeLock (option arg)

• setupVMCheckIn (option arg)

• setupVMCheckOut (option arg)

• setupVMGet (option arg)

• setupVMHierarchy (option arg)

• setupVMLabel (option arg)

• setupVMSynchronize (option arg)

Page 52: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.152

HDS Tcl API Command ReferencerunVMChangeLock

September 18, 2008

runVMChangeLockChange lock on a specified library, design unit, view. Uses options set by

setupVMChangeLock.

Syntax

runVMChangeLock (args)

Arguments

library The library name. This is required.

view View name (optional, absent if design unit not specified).

Page 53: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencerunVMCheckIn

HDL Designer Series Tcl Reference Manual, V2008.1 53September 18, 2008

runVMCheckInCheck in a specified library, design unit, view. Uses options set by setupVMCheckIn.

Syntax

runVMCheckIn (args)

Arguments

library The library name. This is required.

designUnit Design unit name (optional).

view View name (optional, absent if design unit not specified).

Page 54: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.154

HDS Tcl API Command ReferencerunVMCheckOut

September 18, 2008

runVMCheckOutCheck out a specified library, design unit, view. Uses options set by setupVMCheckOut.

Syntax

runVMCheckOut (args)

Arguments

library The library name. This is required.

designUnit Design unit name (optional).

view View name (optional, absent if design unit not specified).

Page 55: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencerunVMGet

HDL Designer Series Tcl Reference Manual, V2008.1 55September 18, 2008

runVMGetGet a specified library, design unit, view. Uses options set by setupVMGet.

Syntax

runVMGet (args)

Arguments

library The library name. This is required.

designUnit Design unit name (optional).

view View name (optional, absent if design unit not specified).

Page 56: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.156

HDS Tcl API Command ReferencerunVMHistory

September 18, 2008

runVMHistoryGet the history of a specified library, design unit, view.

Syntax

runVMHistory (args)

Arguments

library The library name. This is required.

designUnit Design unit name (optional).

view View name (optional, absent if design unit not specified).

Page 57: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencerunVMLabel

HDL Designer Series Tcl Reference Manual, V2008.1 57September 18, 2008

runVMLabelLabel a specified library, design unit, view. Uses options set by setupVMLabel.

Syntax

runVMLabel (args)

Arguments

library The library name. This is required.

designUnit Design unit name (optional).

view View name (optional, absent if design unit not specified).

Page 58: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.158

HDS Tcl API Command ReferencerunVMSynchronize (args)

September 18, 2008

runVMSynchronize (args)Synchronize a specified library, design unit, view. Uses options set by setupVMSynchronize.

Syntax

runVMSynchronize (args)

Arguments

library The library name. This is required.

designUnit Design unit name (optional).

view View name (optional, absent if design unit not specified).

Page 59: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencerunVMUndoCheckOut

HDL Designer Series Tcl Reference Manual, V2008.1 59September 18, 2008

runVMUndoCheckOutUndo the check out of a specified library, design unit, view.

Syntax

runVMUndoCheckOut (args)

Arguments

library The library name. This is required.

designUnit Design unit name (optional).

view View name (optional, absent if design unit not specified).

Page 60: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.160

HDS Tcl API Command ReferencesetupVM

September 18, 2008

setupVMSetup the options for Version Management.

Syntax

setupVM (option arg)

Arguments

option Option name.

arg Option value.

tool <string> Specify the library on which you want to invokethese options (this is only necessary if you want toset the repository mappings).

repository <string> Specify the repository mapping.

hds_repository <string> Specify the hds repository mapping.

hdl_repository <string> The hdl repository mapping.

include_default_view ON|OFF You can choose to version manage the defaultview file.

include_side_data ON|OFF Side data for a version managed object is included.

verbose ON|OFF Additional info is displayed in the log window.

create_empty_side_dataON|OFF

Automatically create side data directories if theydo not exist.

multiple_repository_modeON|OFF

Repository is defined on a mapping by mappingbasis.

include_generated_hdl ON|OFF Generated HDL for a version managed object isincluded.

Page 61: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencesetupVMChangeLock

HDL Designer Series Tcl Reference Manual, V2008.1 61September 18, 2008

setupVMChangeLockSetup the change lock options for Version Management.

Syntax

setupVMChangeLock (option arg)

Arguments

option Option name.

arg Option value.

version <string> The version required.

change_lock ON|OFF When you lock an object, the version in yourprivate workspace is made editable. If you unlockan object, the version in your workspace is maderead-only.

Page 62: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.162

HDS Tcl API Command ReferencesetupVMCheckIn

September 18, 2008

setupVMCheckInSetup the check-in options for Version Management.

Syntax

setupVMCheckIn (option arg)

Arguments

option Option name.

arg Option value.

version <string> The version required.

label <string> You can specify a symbolic label which isassociated with a particular set of objects.

description <string> Specify a description for the check in.

overwrite_label ON|OFF Transfer the label to the new version number.

retain_lock ON|OFF You can choose to retain a lock on the checked inobjects.

Page 63: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencesetupVMCheckOut

HDL Designer Series Tcl Reference Manual, V2008.1 63September 18, 2008

setupVMCheckOutSetup the check-out options for Version Management.

Syntax

setupVMCheckOut (option arg)

Arguments

option Option name.

arg Option value.

version <string> The version required.

lock ON|OFF The objects are normally checked out with a lockto prevent concurrent editing by other users butyou can choose to unset this option.

comment <string> If you are using ClearCase, you can enter acomment in the description field.

Page 64: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.164

HDS Tcl API Command ReferencesetupVMGet

September 18, 2008

setupVMGetSetup the Get options for Version Management.

Syntax

setupVMGet (option arg)

Arguments

option Option name.

arg Option value.

version <string> The version required.

overwrite ON|OFF Transfer the label to the new version number.

Page 65: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencesetupVMHierarchy

HDL Designer Series Tcl Reference Manual, V2008.1 65September 18, 2008

setupVMHierarchySetup the hierarchy options for Version Management.

Syntax

setupVMHierarchy (option arg)

Arguments

option Option name.

arg Option value.

hierarchy ON|OFF Include the hierarchy below the selected object.

through_components ON|OFF If hierarchy selected, then include components.

through_libraries ON|OFF You can choose to limit the scope to the currentlibrary or operate on objects through all libraries.

include_protected_librariesON|OFF

Include objects in protected libraries.

packages ON|OFF Automatically include referenced VHDL packagesor Verilog include files.

Page 66: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.166

HDS Tcl API Command ReferencesetupVMLabel

September 18, 2008

setupVMLabelSetup the label options for Version Management.

Syntax

setupVMLabel (option arg)

Arguments

option Option name.

arg Option value.

version <string> The version required.

label <string> Specify the required label.

add ON|OFF Add or remove the label.

overwrite ON|OFF Transfer the label to the new version number.

Page 67: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencesetupVMSynchronize

HDL Designer Series Tcl Reference Manual, V2008.1 67September 18, 2008

setupVMSynchronizeSetup the Synchronize options for Version Management.

Syntax

setupVMSynchronize (option arg)

Arguments

option Option name.

arg Option value.

version <string> The version required.

add_files ON|OFF If this option is not set, only objects that alreadyexist are synchronized.

Page 68: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.168

HDS Tcl API Command ReferenceDynamically Created Commands

September 18, 2008

Dynamically Created Commands

Command StructureA dynamically created Tcl command consists of an HDS object or a variable holding the valueof a handle to that object. The object is followed by an option possibly followed by one or morearguments and is written according to the following format:

HDS object /Option/?Arguments

Page 69: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferenceHDS objects

HDL Designer Series Tcl Reference Manual, V2008.1 69September 18, 2008

HDS objectsHDS Objects listing

architecture - block - blockFrame - caseFrame - configuration - declaration - elseFrame -embeddedFrame - file - forFrame - frameConfiguration - frame - ifFrame - instance - library -machineFrame - package Body

Example

$lib configure class

The command in the above example is a library command in other words the HDS objectreferenced in this command is a library object. The variable $lib holds the value of a handlereferring to the UART library.

Variables are created using the standard Tcl set command. HDS refers to objects through a setof handles.The pre-defined library open command returns a handle to the UART library thatsubstitutes the value of the lib variable.

set lib [library open uart]

A variable can hold the value of one or more handles referring to HDS objects i.e

set fl [$lib files]

While the variable $lib holds the value of the handle hds0 which refers to the library UART,variable $fl holds the values of a set of handles referring to the UART library files.

Notice that variable names are always preceded by a $.

Page 70: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.170

HDS Tcl API Command ReferenceOption

September 18, 2008

OptionOptions Listing

configure - entity - file - frame instances - packages - configuredSubFrames - subFrames -architecture - configuredChild - close - declaration - files - hdlDirectory - packages

Example

$lib configure class

All objects have a ‘configure’ command option, this provides access to the attributes of theobject. If you use the configure command with no arguments, it shows the names and values ofall the attributes

Arguments

Each command may have one or more argument

Command listarchitecture - block - blockFrame - caseFrame - configuration - declaration - elseFrame -embeddedFrame - file - forframe - frameConfiguration - frame - ifframe - instance - library -machineFrame - package Body

Page 71: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command Referencearchitecture object commands

HDL Designer Series Tcl Reference Manual, V2008.1 71September 18, 2008

architecture object commandsAssociated with an implementation of an entity. Corresponds to a VHDL architecture, a Verilogmodule and an HDS structural or leaf graphics file.

• $architecture configure (args)

• $architecture entity ()

• $architecture file ()

• $architecture frame ()

• $architecture instances ()

• $architecture packages ()

Table 2-1. architecture object commands

Command Description

$architecture configure (args) With no arguments lists the names and values of alloptions.The following arguments are available:class : identifies the object as an architecturename : name of the declaration itselffullName : fully qualified name including those ofparent objectsstartLine : the line number where the declaration beginsin the source filerefName : Name that can be to refer to the object whenrunning tasks or accessing properties

$architecture entity () Gets the entity associated with the architecture. Refer to“entity option object commands” on page 79.Returns: The entity object.

$architecture file () Obtains the file containing the object.Returns: A single object, refer to“file object commands”on page 81.

$architecture frame () Obtains the root frame of the architecture. Refer to“frame object commands” on page 85.Returns: The root frame.

$architecture instances () Gets all the instances in all frames of the architecture.Refer to “instance object commands” on page 87.

$architecture packages () Obtains the packages referenced.Returns: A list of packages, refer to “packageHeaderobject commands” on page 91, or an empty list if thedeclaration is not VHDL.

Page 72: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.172

HDS Tcl API Command ReferenceblockFrame object commands

September 18, 2008

blockFrame object commandsA VHDL block statement

• $blockFrame configure (args)

• $blockFrame configuredSubFrames (frameConfiguration)

• $blockFrame instances ()

• $blockFrame subFrames ()

Table 2-2. blockFrame object commands

Command Description

$blockFrame configure (args) With no arguments lists the names and values ofall options.With one argument lists the value of the specifiedoption.

Arguments

class : identifies the object as a blockFramename :

$blockFrameconfiguredSubFrames(frameConfiguration)

Obtains the sub-frames.

Arguments

frameConfiguration : defines a level in a VHDLconfiguration declaration from which the bindingsare selected

Returns

A list of sub-frame information, each consecutivepair represents a frame and a frameConfigurationin that order.

$blockFrame instances () Obtains the component instances; Instancescontained within a sub-frame are not included.Refer to “instance object commands” on page 87.

Returns

A list of instances.

$blockFrame subFrames () Obtains the sub-frames.

Returns

A list of sub-frames.

Page 73: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencecaseFrame object commands

HDL Designer Series Tcl Reference Manual, V2008.1 73September 18, 2008

caseFrame object commandsA Verilog case statement

• $caseFrame configure (args)

• $caseFrame configuredSubFrames (frameConfiguration)

• $caseFrame instances ()

• $caseFrame subFrames ()

Table 2-3. caseFrame object commands

Command Description

$caseFrame configure (args) With no arguments lists the names and values ofall options.With one argument lists the value of the specifiedoption.

Arguments

class : identifies the object as a caseFramename :

$caseFrame configuredSubFrames(frameConfiguration)

Obtains the sub-frames.

Arguments

frameConfiguration :defines a level in a VHDLconfiguration declaration from which the bindingsare selected

Returns

A list of sub-frame information, each consecutivepair represents a frame and a frameConfigurationin that order.

$caseFrame instances () Obtains the component instances, directlycontained within the frame. Instances containedwithin a sub-frame are not included. Refer to“instance object commands” on page 87.

Returns

A list of instances.

$caseFrame subFrames () Obtains the sub-frames.

Returns

A list of sub-frames.

Page 74: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.174

HDS Tcl API Command Referenceconfiguration object commands

September 18, 2008

configuration object commandsA VHDL configuration declaration

• $configuration architecture ()

• $configuration configure (args)

• $configuration file ()

• $configuration frameConfiguration ()

• $configuration packages ()

Table 2-4. configuration object commands

Command Description

$configuration architecture () Gets the architecture associated with theconfiguration. Refer to“architecture objectcommands” on page 71.

Returns

The architecture object.

$configuration configure (args) With no arguments lists the names and valuesof all options.With one argument lists the value of thespecified option.

Arguments

class : identifies the object as a configurationname : name of the declaration itselffullName : fully qualified name including thoseof parent objectsstartLine : the line number where thedeclaration begins in the source filerefName : Name that can be to refer to theobject when running tasks or accessingproperties

$configuration file () Obtain the file containing the object.

Returns

A single object. Refer to “file objectcommands” on page 81.

Page 75: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command Referenceconfiguration object commands

HDL Designer Series Tcl Reference Manual, V2008.1 75September 18, 2008

$configuration frameConfiguration () Gets the frame configuration associated withthe configuration, refer to “frameConfigurationobject commands” on page 84.

Returns

The architecture object.

$configuration packages () Obtains the packages referenced.

Returns

A list of packages, refer to “packageHeaderobject commands” on page 91, or an empty listif the declaration is not VHDL.

Table 2-4. configuration object commands (cont.)

Command Description

Page 76: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.176

HDS Tcl API Command Referencedeclaration object commands

September 18, 2008

declaration object commands• $declaration configure (args)

• $declaration file ()

• $declaration packages ()

Table 2-5. declaration object commands

Command Description

$declaration configure (args) With no arguments lists the names and values ofall options.With one argument lists the value of the specifiedoption.

Arguments

name : name of the declaration itselffullName : fully qualified name including those ofparent objectsstartLine : the line number where the declarationbegins in the source filerefName : Name that can be to refer to the objectwhen running tasks or accessing propertiesclass : identifies the object as a declaration

$declaration file () Obtains the file containing the object.

Returns

A single object, refer to “file object commands” onpage 81.

$declaration packages () Obtains the packages referenced.

Returns

A list of packages, see “packageHeader objectcommands” on page 91, or an empty list if thedeclaration is not VHDL.

Page 77: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferenceelseFrame object commands

HDL Designer Series Tcl Reference Manual, V2008.1 77September 18, 2008

elseFrame object commandsA Verilog `else statement

• $elseFrame configure (args)

• $elseFrame configuredSubFrames (frameConfiguration)

• $elseFrame instances ()

• $elseFrame subFrames ()

Table 2-6. elseFrame object commands

Command Description

$elseFrame configure (args) With no arguments lists the names and values ofall options.With one argument lists the value of the specifiedoption.

Arguments

class : identifies the object as an elseFramename :

$elseFrame configuredSubFrames(frameConfiguration)

Obtains the sub-frames.

Argument

frameConfiguration :defines a level in a VHDLconfiguration declaration from which the bindingsare selected

Returns

A list of sub-frame information, each consecutivepair represents a frame and a frameConfigurationin that order.

$elseFrame instances () Obtains the component instances, refer to“instanceobject commands” on page 87, directly containedwithin the frame. Instances contained within a sub-frame are not included.

Returns

A list of instances.

$elseFrame subFrames () Obtains the sub-frames.

Returns

A list of sub-frames.

Page 78: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.178

HDS Tcl API Command ReferenceembeddedFrame object commands

September 18, 2008

embeddedFrame object commandsRepresents an embedded text within a graphics file

• $embeddedFrame configure (args)

• $embeddedFrame configuredSubFrames (frameConfiguration)

• $embeddedFrame instances ()

• $embeddedFrame subFrames ()

Table 2-7. embeddedFrame object commands

Command Description

$embeddedFrame configure (args) With no arguments lists the names and valuesof all options.With one argument lists the value of thespecified option.

Arguments

class : identifies the object as anembeddedFramename :

$embeddedFrame configuredSubFrames(frameConfiguration)

Obtains the sub-frames.

Argument

frameConfiguration :defines a level in aVHDL configuration declaration from whichthe bindings are selected

Returns

A list of sub-frame information, eachconsecutive pair represents a frame and aframeConfiguration in that order.

$embeddedFrame instances () Obtains the component instances, refer to“instance object commands” on page 87,directly contained within the frame. Instancescontained within a sub-frame are notincluded.

Returns

A list of instances.

$embeddedFrame subFrames () Obtains the sub-frames.

Returns

A list of sub-frames.

Page 79: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command Referenceentity option object commands

HDL Designer Series Tcl Reference Manual, V2008.1 79September 18, 2008

entity option object commandsAssociated with the interface to a design unit. Corresponds to a VHDL entity, a Verilog moduleand an HDS symbol or block interface file

• $entity architecture (name)

• $entity configure (args)

• $entity file ()

• $entity packages ()

Table 2-8. entity option object commands

Command Description

$entity architecture (name) Obtains the architecture for an entity.

Argument

name (= {})The name of the architecture to find, if omitted uses thedefault view settings to choose between alternativearchitectures.

Returns

The matching architecture, refer to “architecture objectcommands” on page 71.

$entity configure (args) With no arguments lists the names and values of alloptions.With one argument lists the value of the specifiedoption.

Arguments

class : identifies the object as an entityname : name of the declaration itselffullName : fully qualified name including those ofparent objectsstartLine : the line number where the declarationbegins in the source filerefName : Name that can be to refer to the object whenrunning tasks or accessing properties

$entity file () Obtains the file containing the object.

Returns:

A single object, refer to “file object commands” onpage 81.

Page 80: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.180

HDS Tcl API Command Referenceentity option object commands

September 18, 2008

$entity packages () Obtains the packages referenced.

Returns

A list of packages, see “packageHeader objectcommands” on page 91, or an empty list if thedeclaration is not VHDL.

Table 2-8. entity option object commands (cont.)

Command Description

Page 81: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command Referencefile object commands

HDL Designer Series Tcl Reference Manual, V2008.1 81September 18, 2008

file object commands• $file configure (args)

• $file declarations ()

• $file generated ()

• $file includes ()

• $file library ()

Table 2-9. file object commands

Command Description

$file configure (args) With no arguments lists the names and values of alloptions.With one argument lists the value of the specifiedoption.

Arguments

relativePathname : pathname relative to the librarymappinglanguage : HDL languageversion : version checked out from the versionmanagement systemtimestamp : time the file was last modifiedtype : identifies the type of the fileexclusionType :designDir : The full hard pathname of the design sidedata directoryuserDir : The full hard pathname of the design sidedata directoryrefName : Name that can be to refer to the object whenrunning tasks or accessing propertiesclass : identifies the object as a file

$file declarations () Obtains the declarations in the file.

Returns

A list of declaration objects.

$file generated () Gets the HDL file generated from the current file.

Returns

The file.

Page 82: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.182

HDS Tcl API Command Referencefile object commands

September 18, 2008

$file includes () Gets the include files.

Returns

A list of files or the empty list of the language is notVerilog.

$file library () Gets the library containing the file.

Returns

The library.

Table 2-9. file object commands (cont.)

Command Description

Page 83: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferenceforFrame object commands

HDL Designer Series Tcl Reference Manual, V2008.1 83September 18, 2008

forFrame object commandsA VHDL 'for generate' statement.

• $forFrame configure (args)

• $forFrame configuredSubFrames (frameConfiguration)

• $forFrame instances ()

• $forFrame subFrames ()

Table 2-10. forFrame object commands

Command Description

$forFrame configure (args) With no arguments lists the names and values ofall options.With one argument lists the value of the specifiedoption.

Arguments

leftBound :rightBound :class : identifies the object as a forFramename :

$forFrame configuredSubFrames(frameConfiguration)

Obtains the sub-frames.

Arguments

frameConfiguration: defines a level in a VHDLconfiguration declaration from which the bindingsare selected

Returns

A list of sub-frame information, each consecutivepair represents a frame and a frameConfigurationin that order.

$forFrame instances () Obtains the component instances, refer to“instance object commands” on page 87, directlycontained within the frame. Instances containedwithin a sub-frame are not included.

Returns

A list of instances.

$forFrame subFrames () Obtains the sub-frames.

Returns

A list of sub-frames.

Page 84: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.184

HDS Tcl API Command ReferenceframeConfiguration object commands

September 18, 2008

frameConfiguration object commandsRepresents a single level within the hierarchical structure of a VHDL configuration declaration,see configurationRefApi.tcl. These objects have do little in themselves but are passed asarguments to control the path through the design hierarchy. Refer to configuredChild in“instance object commands” on page 87 and configuredSubFrames in“architecture objectcommands” on page 71.

$frameConfiguration configure (args)

Table 2-11. frameConfiguration object commands

Command Description

$frameConfiguration configure(args)

With no arguments lists the names and values of alloptions.With one argument lists the value of the specifiedoption.

Arguments:

name :class : identifies the object as a frameConfiguration

Page 85: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command Referenceframe object commands

HDL Designer Series Tcl Reference Manual, V2008.1 85September 18, 2008

frame object commands• $frame configure (args)

• $frame configuredSubFrames (frameConfiguration)

• $frame instances ()

• $frame subFrames ()

Table 2-12. frame object commands

Command Description

$frame configure (args) With no arguments lists the names and values ofall options.With one argument lists the value of the specifiedoption.

Arguments

name :class : identifies the object as a frame

$frame configuredSubFrames(frameConfiguration)

Obtains the sub-frames.

Argument

frameConfiguration: defines a level in a VHDLconfiguration declaration from which the bindingsare selected

Returns

A list of sub-frame information, each consecutivepair represents a frame and a frameConfigurationin that order.

$frame instances () Obtains the component instances, see “instanceobject commands” on page 87, directly containedwithin the frame. Instances contained within a sub-frame are not included.

Returns

A list of instances.

$frame subFrames () Obtains the sub-frames.

Returns

A list of sub-frames.

Page 86: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.186

HDS Tcl API Command ReferenceifFrame object commands

September 18, 2008

ifFrame object commandsA VHDL 'if generate' statement or a Verilog 'ifdef

• $ifFrame configure (args)

• $ifFrame configuredSubFrames (frameConfiguration)

• $ifFrame instances ()

• $ifFrame subFrames ()

Table 2-13. ifFrame object commands

Command Description

$ifFrame configure (args) With no arguments lists the names and values ofall options.With one argument lists the value of the specifiedoption.

Arguments

class : identifies the object as an ifFramename :

$ifFrame configuredSubFrames(frameConfiguration)

Obtains the sub-frames.

Argument

frameConfiguration: defines a level in a VHDLconfiguration declaration from which the bindingsare selected

Returns

A list of sub-frame information, each consecutivepair represents a frame and a frameConfigurationin that order.

$ifFrame instances () Obtains the component instances, see“instanceobject commands” on page 87, directly containedwithin the frame. Instances contained within a sub-frame are not included.

Returns

A list of instances.

$ifFrame subFrames () Obtains the sub-frames.

Returns

A list of sub-frames.

Page 87: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command Referenceinstance object commands

HDL Designer Series Tcl Reference Manual, V2008.1 87September 18, 2008

instance object commandsA component instance in a block diagram, IBD or structural HDL text file.

• $instance child ()

• $instance configure (args)

• $instance configuredChild (frameConfiguration)

Table 2-14. instance object commands

Command Description

$instance child () Obtains the architecture under the componentinstance.

Returns

The architecture object.

$instance configure (args) With no arguments lists the names and values ofall options.With one argument lists the value of the specifiedoption.

Arguments

name :class : identifies the object as an instance

$instance configuredChild(frameConfiguration)

Like 'child' but supporting VHDL configurationdeclarations.

Arguments

frameConfiguration see “frameConfigurationobject commands” on page 84.

Returns

A 3 element list containing:The configuration declaration object, if specifiedin the component binding; see “configurationobject commands” on page 74.The architecture object, see“architecture objectcommands” on page 71.The frame configuration for the root of the childarchitecture.

Page 88: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.188

HDS Tcl API Command Referencelibrary object commands

September 18, 2008

library object commandsA library object is obtained from the 'library open' command. It provides access to the files anddeclarations within the library.

• $library close ()

• $library configure (args)

• $library declaration (primaryName secondaryName)

• $library file (relativePathname)

• $library files ()

• $library hdlDirectory ()

Table 2-15. library object commands

Command Description

$library close () Removes the library from memory.It is an error to close a library while an editorwindow or Design Explorer tab is showing designitems in the library.

Returns

None.

$library configure (args) With no arguments lists the names and values ofall options.With one argument lists the value of the specifiedoption.

Arguments

name : name of the librarytype : regular, standard or downstreamOnlyhdlDir : directory as literally givenhdsDir : directory as literally givenhardHdlDir : directory with variables expandedhardHdsDir : directory with variables expandedrefName : Name that can be to refer to the objectwhen running tasks or accessing propertiesclass : identifies the object as a library

Page 89: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command Referencelibrary object commands

HDL Designer Series Tcl Reference Manual, V2008.1 89September 18, 2008

$library declaration (primaryNamesecondaryName)

Finds an entity, architecture, package orconfiguration declaration by name. Raises an errorif a matching architecture is not available.

Argument

primaryName:name to look forsecondaryName (= {}) :only specified whenlooking for an architecture can be the empty stringif the default architecture should be used

Returns

The matching declaration.

$library file (relativePathname) Finds a file, raises an error if not available.

Argument

relativePathname:pathname of the file relative tothe root directory of the library.

Returns

The file object.

$library files () Obtains the files of the library, see “file objectcommands” on page 81.

Returns

List of files.

$library hdlDirectory () Obtains the root HDL directory of the library.

Returns

Directory object.

Table 2-15. library object commands (cont.)

Command Description

Page 90: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.190

HDS Tcl API Command ReferencemachineFrame object commands

September 18, 2008

machineFrame object commandsRepresents hierarchy or concurrency within a state machine, algorithmic state machine or flowchart file.

• $machineFrame configure (args)

• $machineFrame configuredSubFrames (frameConfiguration)

• $machineFrame instances ()

• $machineFrame subFrames ()

Table 2-16. machineFrame object commands

Command Description

$machineFrame configure (args) With no arguments lists the names and valuesof all options.With one argument lists the value of thespecified option.

Arguments

class : identifies the object as a machineFramename :

$machineFrame configuredSubFrames(frameConfiguration)

Obtains the sub-frames.

Arguments

frameConfiguration: defines a level in aVHDL configuration declaration from whichthe bindings are selected

Returns

A list of sub-frame information, eachconsecutive pair represents a frame and aframeConfiguration in that order.

$machineFrame instances () Obtains the component instances, see“instanceobject commands” on page 87, directlycontained within the frame. Instances containedwithin a sub-frame are not included.

Returns

A list of instances.

$machineFrame subFrames () Obtains the sub-frames.

Returns

A list of sub-frames.

Page 91: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferencepackageHeader object commands

HDL Designer Series Tcl Reference Manual, V2008.1 91September 18, 2008

packageHeader object commands• $packageHeader body ()

• $packageHeader configure (args)

• $packageHeader file ()

• $packageHeader packages ()

Table 2-17. packageHeader object commands

Command Description

$packageHeader body () Gets the package body implementing theinterface of a package header, see“packageBody object commands” on page 92.

Returns

The body object.

$packageHeader configure (args) With no arguments lists the names and valuesof all options.With one argument lists the value of thespecified option.

Arguments

class : identifies the object as a packageHeadername : name of the declaration itselffullName : fully qualified name including thoseof parent objectsstartLine : the line number where thedeclaration begins in the source filerefName : Name that can be to refer to theobject when running tasks or accessingproperties

$packageHeader file () Obtains the file containing the object.

Returns

A single object, see “file object commands” onpage 81.

$packageHeader packages () Obtains the packages referenced.

Returns

A list of packages, see “packageHeader objectcommands” on page 91, or an empty list if thedeclaration is not VHDL.

Page 92: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.192

HDS Tcl API Command ReferencepackageBody object commands

September 18, 2008

packageBody object commandsA VHDL package body

• $packageBody configure (args)

• $packageBody file ()

• $packageBody packages ()

Command ListaddLibraryMappingconfigurePropertiesinvokeGUI ()setDefaultView

Table 2-18. packageBody object commands

Command Description

$packageBody configure (args) With no arguments lists the names and valuesof all options.With one argument lists the value of thespecified option.

Arguments

class : identifies the object as a packageBodyname : name of the declaration itselffullName : fully qualified name including thoseof parent objectsstartLine : the line number where thedeclaration begins in the source filerefName : Name that can be to refer to theobject when running tasks or accessingproperties

$packageBody file () Obtains the file containing the object.

Returns

A single object, see “file object commands” onpage 81.

$packageBody packages () Obtains the packages referenced.

Returns

A list of packages, see “packageHeader objectcommands” on page 91, or an empty list if thedeclaration is not VHDL.

Page 93: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferenceCommand List

HDL Designer Series Tcl Reference Manual, V2008.1 93September 18, 2008

setRulesetLocationrunH2GrunHdlImportrunHtmlExportsetupH2GsetupHdlImportsetupHtmlExportrunTasksetCompileAlways (enable)setupTask (args)runConfigGeneraterunGeneratesetupGeneratelibrary names()library openrunVMChangeLockrunVMCheckInrunVMCheckOutrunVMGetrunVMHistoryrunVMLabelrunVMSynchronize (args)runVMUndoCheckOutsetupVMsetupVMChangeLocksetupVMCheckInsetupVMCheckOutsetupVMGetsetupVMHierarchysetupVMLabelsetupVMSynchronize$architecture entity ()$architecture file ()$architecture frame ()$architecture instances ()$architecture packages ()$blockFrame configure (args)$blockFrame configuredSubFrames (frameConfiguration)$blockFrame instances ()$blockFrame subFrames ()$caseFrame configure (args)$caseFrame configuredSubFrames (frameConfiguration)$caseFrame instances ()$caseFrame subFrames ()$configuration architecture ()

Page 94: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.194

HDS Tcl API Command ReferenceCommand List

September 18, 2008

$configuration configure (args)$configuration file ()$configuration frameConfiguration ()$configuration packages ()$declaration configure (args)$declaration file ()$declaration packages ()$elseFrame configure (args)$elseFrame configuredSubFrames (frameConfiguration)$elseFrame instances ()$elseFrame subFrames ()$embeddedFrame configure (args)$embeddedFrame configuredSubFrames (frameConfiguration)$embeddedFrame instances ()$embeddedFrame subFrames ()$embeddedFrame configure (args)$embeddedFrame configuredSubFrames (frameConfiguration)$embeddedFrame instances ()$embeddedFrame subFrames ()$file configure (args)$file declarations ()$file generated ()$file includes ()$file library ()$forFrame configure (args)$forFrame configuredSubFrames (frameConfiguration)$forFrame instances ()$forFrame subFrames ()$frameConfiguration configure (args)$frame configure (args)$frame configuredSubFrames (frameConfiguration)$frame instances ()$frame subFrames ()$ifFrame configure (args)$ifFrame configuredSubFrames (frameConfiguration)$ifFrame instances ()$ifFrame subFrames ()$instance child ()$instance configure (args)$instance configuredChild (frameConfiguration)$library close ()$library configure (args)$library declaration (primaryName secondaryName)$library file (relativePathname)$library files ()

Page 95: HDL Designer Series Tcl Reference Manual

HDS Tcl API Command ReferenceCommand List

HDL Designer Series Tcl Reference Manual, V2008.1 95September 18, 2008

$library hdlDirectory ()$machineFrame configure (args)$machineFrame configuredSubFrames (frameConfiguration)$machineFrame instances ()$machineFrame subFrames ()$packageHeader body ()$packageHeader configure (args)$packageHeader file ()$packageHeader packages ()$packageBody configure (args)$packageBody file ()$packageBody packages ()

Page 96: HDL Designer Series Tcl Reference Manual

HDL Designer Series Tcl Reference Manual, V2008.196

HDS Tcl API Command ReferenceCommand List

September 18, 2008

Page 97: HDL Designer Series Tcl Reference Manual

97

A B F GDC E H I J K L M N O P Q R S T U V XW Y Z

HDL Designer Series Tcl Reference Manual, V2008.1September 18, 2008

Index

— Symbols —$architecture configure (args), 71$architecture entity (), 71$architecture file (), 71$architecture frame (), 71$architecture instances (), 71$architecture packages (), 71$architecture/option/arguments, 71$blockFrame configure (args), 72$blockFrame configuredSubFrames

(frameConfiguration), 72$blockFrame instances (), 72$blockFrame subFrames (), 72$caseFrame configure (args), 73$caseFrame configuredSubFrames

(frameConfiguration), 73$caseFrame instances (), 73$caseFrame option (args), 73$caseFrame subFrames (), 73$configuration architecture (), 74$configuration configure (args), 74$configuration file (), 74$configuration frameConfiguration (), 75$configuration option (args), 74$configuration packages (), 75$declaration configure (args), 76$declaration file (), 76$declaration option (args), 76$declaration packages (), 76$elseFrame configure (args), 77$elseFrame configuredSubFrames

(frameConfiguration), 77$elseFrame instances (), 77$elseFrame subFrames (), 77$embeddedFrame configure (args), 78$embeddedFrame configuredSubFrames

(frameConfiguration), 78$embeddedFrame instances (), 78$embeddedFrame option (args), 78

$embeddedFrame subFrames (), 78$entity architecture (name), 79$entity configure (args), 79$entity file (), 79$entity option (arg), 79$entity packages (), 80$file configure (args), 81$file declarations (), 81$file generated (), 81$file includes (), 82$file library (), 82$forFrame configure (args), 83$forFrame configuredSubFrames

(frameConfiguration), 83$forFrame instances (), 83$forFrame option (args), 83$forFrame subFrames (), 83$frame configure (args), 85$frame configuredSubFrames

(frameConfiguration), 85$frame instances (), 85$frame option (args), 85$frame subFrames (), 85$frameConfiguration configure (args), 84$ifFrame configure (args), 86$ifFrame configuredSubFrames

(frameConfiguration), 86$ifFrame instances (), 86$ifFrame option (args), 86$ifFrame subFrames (), 86$instance child (), 87$instance configure (args), 87$instance configuredChild

(frameConfiguration), 87$instance option (), 87$library close (), 88$library configure (args), 88$library declaration (primaryName

secondaryName), 89$library file (relativePathname), 89

Index

Page 98: HDL Designer Series Tcl Reference Manual

98September 18, 2008

HDL Designer Series Tcl Reference Manual, V2008.1

A B F GDC E H I J K L M N O P Q R S T U V XW Y Z

$library files (), 89$library hdlDirectory (), 89$library option (), 88$machineFrame configure (args), 90$machineFrame configuredSubFrames

(frameConfiguration), 90$machineFrame instances (), 90$machineFrame option (args), 90$machineFrame subFrames (), 90$packageBody configure (args), 92$packageBody file (), 92$packageBody option (args), 92$packageBody packages (), 92$packageHeader body (), 91$packageHeader configure (args), 91$packageHeader file (), 91$packageHeader packages (), 91

— A —addLibraryMapping, 24API Command Modes, 9architecture object commands, 71

— B —blockFrame object commands, 72

— C —caseFrame object commands, 73Command Basics, 10Compilation Order, 20configuration object commands, 74configureProperties (designObject args), 25Console

Accessing, 9

— D —declaration object commands, 76Design Hierarchy and Frames, 17Design Hierarchy and VHDL Configurations,

18Design Hierarchy Traversal, Robust, 16Design Hierarchy Traversal, Simple, 14Document Conventions, 10

— E —elseFrame object commands, 77embeddedFrame object commands, 78

entity option object commands, 79Example Scripts, 11

— F —file object commands, 81forFrame object commands, 83frame object commands, 85frameConfiguration object commands, 84

— G —Generated HDL File Paths, 11

— H —HDS objects, 69Hierarchy

Pruning, 19

— I —ifFrame object commands, 86instance object commands, 87invokeGUI (), 26

— L —library names (), 49library object commands, 88library open (libraryName), 50

— M —machineFrame object commands, 90

— P —packageBody object commands, 92packageHeader object commands, 91

— R —runConfigGenerate (library entity arch), 44runGenerate (library entity arch), 45runH2G (hierarchyType library file primary

secondary), 30runHdlImport (library args), 31runTask (args), 40runVMChangeLock (args), 52runVMCheckIn (args), 53runVMCheckOut (args), 54runVMGet (args), 55runVMHistory (args), 56runVMLabel (args), 57runVMSynchronize (args), 58

Page 99: HDL Designer Series Tcl Reference Manual

99HDL Designer Series Tcl Reference Manual, V2008.1September 18, 2008

A B F GDC E H I J K L M N O P Q R S T U V XW Y Z

runVMUndoCheckOut (args), 59

— S —setCompileAlways (enable), 41setDefaultView (library file primary

secondary), 27setRulesetLocation (location), 28setupGenerate (args), 46setupH2G (args), 33setupHdlImport (args), 36setupTask (args), 42setupVM (option arg), 60setupVMChangeLock (option arg), 61setupVMCheckIn (option arg), 62setupVMCheckOut (option arg), 63setupVMGet (option arg), 64setupVMHierarchy (option arg), 65setupVMLabel (option arg), 66setupVMSynchronize (option arg), 67

— V —Verilog Include Files, 14VHDL Packages, 13

Page 100: HDL Designer Series Tcl Reference Manual

100September 18, 2008

HDL Designer Series Tcl Reference Manual, V2008.1

A B F GDC E H I J K L M N O P Q R S T U V XW Y Z

Page 101: HDL Designer Series Tcl Reference Manual

End-User License AgreementThe latest version of the End-User License Agreement is available on-line at:

www.mentor.com/terms_conditions/enduser.cfm

END-USER LICENSE AGREEMENT (“Agreement”)

This is a legal agreement concerning the use of Software between you, the end user, as an authorizedrepresentative of the company acquiring the license, and Mentor Graphics Corporation and Mentor Graphics(Ireland) Limited acting directly or through their subsidiaries (collectively “Mentor Graphics”). Except for licenseagreements related to the subject matter of this license agreement which are physically signed by you and anauthorized representative of Mentor Graphics, this Agreement and the applicable quotation contain the parties'entire understanding relating to the subject matter and supersede all prior or contemporaneous agreements. If youdo not agree to these terms and conditions, promptly return or, if received electronically, certify destruction ofSoftware and all accompanying items within five days after receipt of Software and receive a full refund of anylicense fee paid.

1. GRANT OF LICENSE. The software programs, including any updates, modifications, revisions, copies, documentationand design data (“Software”), are copyrighted, trade secret and confidential information of Mentor Graphics or itslicensors who maintain exclusive title to all Software and retain all rights not expressly granted by this Agreement.Mentor Graphics grants to you, subject to payment of appropriate license fees, a nontransferable, nonexclusive license touse Software solely: (a) in machine-readable, object-code form; (b) for your internal business purposes; (c) for the licenseterm; and (d) on the computer hardware and at the site authorized by Mentor Graphics. A site is restricted to a one-halfmile (800 meter) radius. Mentor Graphics’ standard policies and programs, which vary depending on Software, licensefees paid or services purchased, apply to the following: (a) relocation of Software; (b) use of Software, which may belimited, for example, to execution of a single session by a single user on the authorized hardware or for a restricted periodof time (such limitations may be technically implemented through the use of authorization codes or similar devices); and(c) support services provided, including eligibility to receive telephone support, updates, modifications, and revisions.

2. EMBEDDED SOFTWARE. If you purchased a license to use embedded software development (“ESD”) Software, ifapplicable, Mentor Graphics grants to you a nontransferable, nonexclusive license to reproduce and distribute executablefiles created using ESD compilers, including the ESD run-time libraries distributed with ESD C and C++ compilerSoftware that are linked into a composite program as an integral part of your compiled computer program, provided thatyou distribute these files only in conjunction with your compiled computer program. Mentor Graphics does NOT grantyou any right to duplicate, incorporate or embed copies of Mentor Graphics' real-time operating systems or otherembedded software products into your products or applications without first signing or otherwise agreeing to a separateagreement with Mentor Graphics for such purpose.

3. BETA CODE. Software may contain code for experimental testing and evaluation (“Beta Code”), which may not be usedwithout Mentor Graphics’ explicit authorization. Upon Mentor Graphics’ authorization, Mentor Graphics grants to you atemporary, nontransferable, nonexclusive license for experimental use to test and evaluate the Beta Code without chargefor a limited period of time specified by Mentor Graphics. This grant and your use of the Beta Code shall not be construedas marketing or offering to sell a license to the Beta Code, which Mentor Graphics may choose not to releasecommercially in any form. If Mentor Graphics authorizes you to use the Beta Code, you agree to evaluate and test theBeta Code under normal conditions as directed by Mentor Graphics. You will contact Mentor Graphics periodicallyduring your use of the Beta Code to discuss any malfunctions or suggested improvements. Upon completion of yourevaluation and testing, you will send to Mentor Graphics a written evaluation of the Beta Code, including its strengths,weaknesses and recommended improvements. You agree that any written evaluations and all inventions, productimprovements, modifications or developments that Mentor Graphics conceived or made during or subsequent to thisAgreement, including those based partly or wholly on your feedback, will be the exclusive property of Mentor Graphics.Mentor Graphics will have exclusive rights, title and interest in all such property. The provisions of this section 3 shallsurvive the termination or expiration of this Agreement.

IMPORTANT INFORMATION

USE OF THIS SOFTWARE IS SUBJECT TO LICENSE RESTRICTIONS. CAREFULLY READ THISLICENSE AGREEMENT BEFORE USING THE SOFTWARE. USE OF SOFTWARE INDICATES YOURCOMPLETE AND UNCONDITIONAL ACCEPTANCE OF THE TERMS AND CONDITIONS SET FORTH

IN THIS AGREEMENT. ANY ADDITIONAL OR DIFFERENT PURCHASE ORDER TERMS ANDCONDITIONS SHALL NOT APPLY.

Page 102: HDL Designer Series Tcl Reference Manual

4. RESTRICTIONS ON USE. You may copy Software only as reasonably necessary to support the authorized use. Eachcopy must include all notices and legends embedded in Software and affixed to its medium and container as received fromMentor Graphics. All copies shall remain the property of Mentor Graphics or its licensors. You shall maintain a record ofthe number and primary location of all copies of Software, including copies merged with other software, and shall makethose records available to Mentor Graphics upon request. You shall not make Software available in any form to anyperson other than employees and on-site contractors, excluding Mentor Graphics' competitors, whose job performancerequires access and who are under obligations of confidentiality. You shall take appropriate action to protect theconfidentiality of Software and ensure that any person permitted access to Software does not disclose it or use it except aspermitted by this Agreement. Except as otherwise permitted for purposes of interoperability as specified by applicableand mandatory local law, you shall not reverse-assemble, reverse-compile, reverse-engineer or in any way derive fromSoftware any source code. You may not sublicense, assign or otherwise transfer Software, this Agreement or the rightsunder it, whether by operation of law or otherwise (“attempted transfer”), without Mentor Graphics’ prior written consentand payment of Mentor Graphics’ then-current applicable transfer charges. Any attempted transfer without MentorGraphics' prior written consent shall be a material breach of this Agreement and may, at Mentor Graphics' option, result inthe immediate termination of the Agreement and licenses granted under this Agreement. The terms of this Agreement,including without limitation, the licensing and assignment provisions shall be binding upon your successors in interestand assigns. The provisions of this section 4 shall survive the termination or expiration of this Agreement.

5. LIMITED WARRANTY.

5.1. Mentor Graphics warrants that during the warranty period Software, when properly installed, will substantiallyconform to the functional specifications set forth in the applicable user manual. Mentor Graphics does not warrantthat Software will meet your requirements or that operation of Software will be uninterrupted or error free. Thewarranty period is 90 days starting on the 15th day after delivery or upon installation, whichever first occurs. Youmust notify Mentor Graphics in writing of any nonconformity within the warranty period. This warranty shall not bevalid if Software has been subject to misuse, unauthorized modification or improper installation. MENTORGRAPHICS' ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL BE, AT MENTOR GRAPHICS'OPTION, EITHER (A) REFUND OF THE PRICE PAID UPON RETURN OF SOFTWARE TO MENTORGRAPHICS OR (B) MODIFICATION OR REPLACEMENT OF SOFTWARE THAT DOES NOT MEET THISLIMITED WARRANTY, PROVIDED YOU HAVE OTHERWISE COMPLIED WITH THIS AGREEMENT.MENTOR GRAPHICS MAKES NO WARRANTIES WITH RESPECT TO: (A) SERVICES; (B) SOFTWAREWHICH IS LICENSED TO YOU FOR A LIMITED TERM OR LICENSED AT NO COST; OR(C) EXPERIMENTAL BETA CODE; ALL OF WHICH ARE PROVIDED “AS IS.”

5.2. THE WARRANTIES SET FORTH IN THIS SECTION 5 ARE EXCLUSIVE. NEITHER MENTOR GRAPHICSNOR ITS LICENSORS MAKE ANY OTHER WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, WITHRESPECT TO SOFTWARE OR OTHER MATERIAL PROVIDED UNDER THIS AGREEMENT. MENTORGRAPHICS AND ITS LICENSORS SPECIFICALLY DISCLAIM ALL IMPLIED WARRANTIES OFMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT OFINTELLECTUAL PROPERTY.

6. LIMITATION OF LIABILITY. EXCEPT WHERE THIS EXCLUSION OR RESTRICTION OF LIABILITYWOULD BE VOID OR INEFFECTIVE UNDER APPLICABLE LAW, IN NO EVENT SHALL MENTOR GRAPHICSOR ITS LICENSORS BE LIABLE FOR INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES(INCLUDING LOST PROFITS OR SAVINGS) WHETHER BASED ON CONTRACT, TORT OR ANY OTHERLEGAL THEORY, EVEN IF MENTOR GRAPHICS OR ITS LICENSORS HAVE BEEN ADVISED OF THEPOSSIBILITY OF SUCH DAMAGES. IN NO EVENT SHALL MENTOR GRAPHICS' OR ITS LICENSORS'LIABILITY UNDER THIS AGREEMENT EXCEED THE AMOUNT PAID BY YOU FOR THE SOFTWARE ORSERVICE GIVING RISE TO THE CLAIM. IN THE CASE WHERE NO AMOUNT WAS PAID, MENTORGRAPHICS AND ITS LICENSORS SHALL HAVE NO LIABILITY FOR ANY DAMAGES WHATSOEVER. THEPROVISIONS OF THIS SECTION 6 SHALL SURVIVE THE EXPIRATION OR TERMINATION OF THISAGREEMENT.

7. LIFE ENDANGERING ACTIVITIES. NEITHER MENTOR GRAPHICS NOR ITS LICENSORS SHALL BELIABLE FOR ANY DAMAGES RESULTING FROM OR IN CONNECTION WITH THE USE OF SOFTWARE INANY APPLICATION WHERE THE FAILURE OR INACCURACY OF THE SOFTWARE MIGHT RESULT INDEATH OR PERSONAL INJURY. THE PROVISIONS OF THIS SECTION 7 SHALL SURVIVE THEEXPIRATION OR TERMINATION OF THIS AGREEMENT.

8. INDEMNIFICATION. YOU AGREE TO INDEMNIFY AND HOLD HARMLESS MENTOR GRAPHICS AND ITSLICENSORS FROM ANY CLAIMS, LOSS, COST, DAMAGE, EXPENSE, OR LIABILITY, INCLUDINGATTORNEYS' FEES, ARISING OUT OF OR IN CONNECTION WITH YOUR USE OF SOFTWARE AS

Page 103: HDL Designer Series Tcl Reference Manual

DESCRIBED IN SECTION 7. THE PROVISIONS OF THIS SECTION 8 SHALL SURVIVE THE EXPIRATION ORTERMINATION OF THIS AGREEMENT.

9. INFRINGEMENT.

9.1. Mentor Graphics will defend or settle, at its option and expense, any action brought against you alleging thatSoftware infringes a patent or copyright or misappropriates a trade secret in the United States, Canada, Japan, ormember state of the European Patent Office. Mentor Graphics will pay any costs and damages finally awardedagainst you that are attributable to the infringement action. You understand and agree that as conditions to MentorGraphics' obligations under this section you must: (a) notify Mentor Graphics promptly in writing of the action;(b) provide Mentor Graphics all reasonable information and assistance to defend or settle the action; and (c) grantMentor Graphics sole authority and control of the defense or settlement of the action.

9.2. If an infringement claim is made, Mentor Graphics may, at its option and expense: (a) replace or modify Software sothat it becomes noninfringing; (b) procure for you the right to continue using Software; or (c) require the return ofSoftware and refund to you any license fee paid, less a reasonable allowance for use.

9.3. Mentor Graphics has no liability to you if infringement is based upon: (a) the combination of Software with anyproduct not furnished by Mentor Graphics; (b) the modification of Software other than by Mentor Graphics; (c) theuse of other than a current unaltered release of Software; (d) the use of Software as part of an infringing process; (e) aproduct that you make, use or sell; (f) any Beta Code contained in Software; (g) any Software provided by MentorGraphics’ licensors who do not provide such indemnification to Mentor Graphics’ customers; or (h) infringement byyou that is deemed willful. In the case of (h) you shall reimburse Mentor Graphics for its attorney fees and other costsrelated to the action upon a final judgment.

9.4. THIS SECTION IS SUBJECT TO SECTION 6 ABOVE AND STATES THE ENTIRE LIABILITY OF MENTORGRAPHICS AND ITS LICENSORS AND YOUR SOLE AND EXCLUSIVE REMEDY WITH RESPECT TOANY ALLEGED PATENT OR COPYRIGHT INFRINGEMENT OR TRADE SECRET MISAPPROPRIATIONBY ANY SOFTWARE LICENSED UNDER THIS AGREEMENT.

10. TERM. This Agreement remains effective until expiration or termination. This Agreement will immediately terminateupon notice if you exceed the scope of license granted or otherwise fail to comply with the provisions of Sections 1, 2, or4. For any other material breach under this Agreement, Mentor Graphics may terminate this Agreement upon 30 dayswritten notice if you are in material breach and fail to cure such breach within the 30 day notice period. If Software wasprovided for limited term use, this Agreement will automatically expire at the end of the authorized term. Upon anytermination or expiration, you agree to cease all use of Software and return it to Mentor Graphics or certify deletion anddestruction of Software, including all copies, to Mentor Graphics’ reasonable satisfaction.

11. EXPORT. Software is subject to regulation by local laws and United States government agencies, which prohibit exportor diversion of certain products, information about the products, and direct products of the products to certain countriesand certain persons. You agree that you will not export any Software or direct product of Software in any manner withoutfirst obtaining all necessary approval from appropriate local and United States government agencies.

12. RESTRICTED RIGHTS NOTICE. Software was developed entirely at private expense and is commercial computersoftware provided with RESTRICTED RIGHTS. Use, duplication or disclosure by the U.S. Government or a U.S.Government subcontractor is subject to the restrictions set forth in the license agreement under which Software wasobtained pursuant to DFARS 227.7202-3(a) or as set forth in subparagraphs (c)(1) and (2) of the Commercial ComputerSoftware - Restricted Rights clause at FAR 52.227-19, as applicable. Contractor/manufacturer is Mentor GraphicsCorporation, 8005 SW Boeckman Road, Wilsonville, Oregon 97070-7777 USA.

13. THIRD PARTY BENEFICIARY. For any Software under this Agreement licensed by Mentor Graphics from Microsoftor other licensors, Microsoft or the applicable licensor is a third party beneficiary of this Agreement with the right toenforce the obligations set forth herein.

14. AUDIT RIGHTS. You will monitor access to, location and use of Software. With reasonable prior notice and duringyour normal business hours, Mentor Graphics shall have the right to review your software monitoring system andreasonably relevant records to confirm your compliance with the terms of this Agreement, an addendum to thisAgreement or U.S. or other local export laws. Such review may include FLEXlm or FLEXnet report log files that youshall capture and provide at Mentor Graphics’ request. Mentor Graphics shall treat as confidential information all of yourinformation gained as a result of any request or review and shall only use or disclose such information as required by lawor to enforce its rights under this Agreement or addendum to this Agreement. The provisions of this section 14 shallsurvive the expiration or termination of this Agreement.

Page 104: HDL Designer Series Tcl Reference Manual

15. CONTROLLING LAW, JURISDICTION AND DISPUTE RESOLUTION. THIS AGREEMENT SHALL BEGOVERNED BY AND CONSTRUED UNDER THE LAWS OF THE STATE OF OREGON, USA, IF YOU ARELOCATED IN NORTH OR SOUTH AMERICA, AND THE LAWS OF IRELAND IF YOU ARE LOCATEDOUTSIDE OF NORTH OR SOUTH AMERICA. All disputes arising out of or in relation to this Agreement shall besubmitted to the exclusive jurisdiction of Portland, Oregon when the laws of Oregon apply, or Dublin, Ireland when thelaws of Ireland apply. Notwithstanding the foregoing, all disputes in Asia (except for Japan) arising out of or in relation tothis Agreement shall be resolved by arbitration in Singapore before a single arbitrator to be appointed by the Chairman ofthe Singapore International Arbitration Centre (“SIAC”) to be conducted in the English language, in accordance with theArbitration Rules of the SIAC in effect at the time of the dispute, which rules are deemed to be incorporated by referencein this section 15. This section shall not restrict Mentor Graphics’ right to bring an action against you in the jurisdictionwhere your place of business is located. The United Nations Convention on Contracts for the International Sale of Goodsdoes not apply to this Agreement.

16. SEVERABILITY. If any provision of this Agreement is held by a court of competent jurisdiction to be void, invalid,unenforceable or illegal, such provision shall be severed from this Agreement and the remaining provisions will remain infull force and effect.

17. PAYMENT TERMS AND MISCELLANEOUS. You will pay amounts invoiced, in the currency specified on theapplicable invoice, within 30 days from the date of such invoice. Any past due invoices will be subject to the impositionof interest charges in the amount of one and one-half percent per month or the applicable legal rate currently in effect,whichever is lower. Some Software may contain code distributed under a third party license agreement that may provideadditional rights to you. Please see the applicable Software documentation for details. This Agreement may only bemodified in writing by authorized representatives of the parties. Waiver of terms or excuse of breach must be in writingand shall not constitute subsequent consent, waiver or excuse.

Rev. 060210, Part No. 227900


Recommended