HDL Designer Series TCL Reference Manual: Release v2019.4

Download as pdf or txt
Download as pdf or txt
You are on page 1of 170

HDL Designer Series™ Tcl Reference

Manual

Release v2019.4

© 1996-2019 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.

Note - Viewing PDF files within a web browser causes some links not to function (see MG595892).
Use HTML for full navigation.
This document is for information and instruction purposes. Mentor Graphics reserves the right to make
changes in specifications and other information contained in this publication without prior notice, and the
reader should, in all cases, consult Mentor Graphics to determine whether any changes have been
made.

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

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

MENTOR GRAPHICS SHALL NOT BE LIABLE FOR ANY INCIDENTAL, INDIRECT, SPECIAL, OR
CONSEQUENTIAL 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 HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

U.S. GOVERNMENT LICENSE RIGHTS: The software and documentation were developed entirely at
private expense and are commercial computer software and commercial computer software
documentation within the meaning of the applicable acquisition regulations. Accordingly, pursuant to
FAR 48 CFR 12.212 and DFARS 48 CFR 227.7202, use, duplication and disclosure by or for the U.S.
Government or a U.S. Government subcontractor is subject solely to the terms and conditions set forth in
the license agreement provided with the software, except for provisions which are contrary to applicable
mandatory federal laws.

TRADEMARKS: The trademarks, logos and service marks ("Marks") used herein are the property of
Mentor Graphics Corporation or other parties. No one is permitted to use these Marks without the prior
written consent of Mentor Graphics or the owner of the Mark, as applicable. 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 to
indicate a product from, or associated with, a particular third party. A current list of Mentor Graphics’
trademarks may be viewed at: mentor.com/trademarks.

The registered trademark Linux® is used pursuant to a sublicense from LMI, the exclusive licensee of
Linus Torvalds, owner of the mark on a world-wide basis.

End-User License Agreement: You can print a copy of the End-User License Agreement from:
mentor.com/eula.

Mentor Graphics Corporation


8005 S.W. Boeckman Road, Wilsonville, Oregon 97070-7777
Telephone: 503.685.7000
Toll-Free Telephone: 800.592.2210
Website: mentor.com
Support Center: support.mentor.com

Send Feedback on Documentation: support.mentor.com/doc_feedback_form


Table of Contents

Chapter 1
HDS Library Contents API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
API Command Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Accessing the Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Document Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Command Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Example Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Generated HDL File Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Reporting VHDL Packages Directly Referenced by a Library . . . . . . . . . . . . . . . . . . . . . 15
Reporting Verilog Include Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Simple Design Hierarchy Traversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Robust Design Hierarchy Traversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Design Hierarchy and Frames. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Design Hierarchy and VHDL Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Pruning the Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Finding the Compilation Order. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Chapter 2
HDS Tcl API Command Reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Pre-Defined Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
General Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
closeProject. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
configureInMemoryProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
configureProperties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
getDesignUnitFiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
getLibrarySearchPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
getVerilogIncludeSearchPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
invokeGUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
openProject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
removeInMemoryProperties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
removeProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
reportIncludeFiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
setDefaultView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
setDontTouchFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
setLibrarySearchPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
setVerilogIncludeSearchPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
unsetBlackBoxFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
SystemVerilog-VHDL Assistant API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
DesignChecker Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
addDCExclusion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
enablePragmaExclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
getBlackBoxFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

HDL Designer Series™ Tcl Reference Manual, v2019.4 3


Table of Contents

getLibraryDCConstraintsFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
getPolicyLocation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
getRulesetLocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
setBlackBoxFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
setLibraryDCConstraintsFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
setPolicyLocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
setRulesetLocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
unsetDontTouchFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Block Diagram Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
addCmpInst. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
addGenParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
addModuleWareCmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
addNet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
addPortIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
changeInstPMFUserText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
closeBDBatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
connectCmpPortToNet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
connectNetToInstPMF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
createBD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
createEmbeddedBlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
enablePortMapFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
layoutDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
openBDBatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
setCptGenParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
setMWCmpParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
HDL2Graphics Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
runH2G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
runHdlImport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
runHtmlExport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
setupH2G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
setupHdlImport. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
setupHtmlExport. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Batch Mode Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
runTask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
setCompileAlways . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
setupTask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Generation Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
runConfigGenerate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
runGenerate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
setupGenerate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Library Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
addLibraryMapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
getLibrariesRootDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
getLibraryMacroDefinitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
getLibraryVerilogIncludeSearchPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
library names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
library open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
refreshLibraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

4 HDL Designer Series™ Tcl Reference Manual, v2019.4


Table of Contents

setLibrariesRootDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
setLibraryMacroDefinitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
setLibraryVerilogIncludeSearchPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Version Management Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
runVMChangeLock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
runVMCheckIn. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
runVMCheckOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
runVMGet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
runVMHistory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
runVMLabel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
runVMSynchronize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
runVMUndoCheckOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
setupVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
setupVMChangeLock. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
setupVMCheckIn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
setupVMCheckOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
setupVMGet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
setupVMHierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
setupVMLabel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
setupVMSynchronize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Dynamically Created Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Command Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
HDS objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Command List. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
architecture object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
blockFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
caseFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
configuration object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
declaration object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
elseFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
embeddedFrame object commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
entity option object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
file object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
forFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
frameConfiguration object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
frame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
ifFrame object commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
elsifFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
whenFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
instance object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
library object commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
machineFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
packageHeader object commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
packageBody object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Command List. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

HDL Designer Series™ Tcl Reference Manual, v2019.4 5


Table of Contents

Index
End-User License Agreement
with EDA Software Supplemental Terms

6 HDL Designer Series™ Tcl Reference Manual, v2019.4


List of Figures

Figure 1-1. Log Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

HDL Designer Series™ Tcl Reference Manual, v2019.4 7


List of Figures

8 HDL Designer Series™ Tcl Reference Manual, v2019.4


List of Tables

Table 1-1. Generated HDL Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14


Table 2-1. architecture object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Table 2-2. blockFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Table 2-3. caseFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Table 2-4. configuration object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Table 2-5. declaration object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Table 2-6. elseFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Table 2-7. embeddedFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Table 2-8. entity option object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Table 2-9. file object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Table 2-10. forFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Table 2-11. frameConfiguration object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Table 2-12. frame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Table 2-13. ifFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Table 2-14. elsifFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Table 2-15. whenFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Table 2-16. instance object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Table 2-17. library object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Table 2-18. machineFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Table 2-19. packageHeader object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Table 2-20. packageBody object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

HDL Designer Series™ Tcl Reference Manual, v2019.4 9


List of Tables

10 HDL Designer Series™ Tcl Reference Manual, v2019.4


Chapter 1
HDS Library Contents API

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

• Access the structure of a design


• Navigate the libraries, files and declarations of the design
• 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 Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11


Accessing the Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Document Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Command Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Example Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Generated HDL File Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Reporting VHDL Packages Directly Referenced by a Library . . . . . . . . . . . . . . . . . . . . . 15
Reporting Verilog Include Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Simple Design Hierarchy Traversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Robust Design Hierarchy Traversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Design Hierarchy and Frames. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Design Hierarchy and VHDL Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Pruning the Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Finding the Compilation Order. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

API Command Modes


The API commands can be used in one of two modes.
• Interactive: via the console page of the HDS log window. This mode provides a
convenient way of learning about the API and debugging scripts, since the commands
provide considerable feedback on how they should be used.This is described in more
detail in the following sections.
• Batch: via the -tcl command line switch in HDS.

HDL Designer Series™ Tcl Reference Manual, v2019.4 11

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Library Contents API
Accessing the Console

Accessing the Console


Text entered here will be executed as Tcl commands and can use the API commands described
in the following sections.
Procedure
1. To access the log window:
2. Invoke HDS to display the Design Manager window.
3. Select Window > HDS Log Window.
Figure 1-1. Log Window

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

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

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


library open uart hds0

12 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Library Contents API
Command Basics

The following is an example of a dynamically created command composed of the above


returned UART library handle and the files option.The command returns a set of handles
referring to the UART library files. Refer to “library object commands” on page 156.
hds0 files hds1 hds2 hds3 hds4 hds5 hds6 hds7
hds8 hds9 hds10 hds11 hds12 hds13
hds14

The Tcl language supports the concept of variables. Variables are set and unset with the
standard Tcl set and unset commands. To ease the use of the created handles, they are stored in
variables. In the following example the set command stores the UART handle hds0 in variable
lib
set lib [library open uart] hds0

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 the
handle itself in the command.
$lib files hds1 hds2 hds3 hds4 hds5 hds6 hds7
hds8 hds9 hds10 hds11 hds12 hds13
hds14

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

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

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

HDL Designer Series™ Tcl Reference Manual, v2019.4 13

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Library Contents API
Example Scripts

Example Scripts
This section provides and explains some sample scripts that show how an HDS design can be
accessed using the Tcl API commands.
Generated HDL File Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Reporting VHDL Packages Directly Referenced by a Library . . . . . . . . . . . . . . . . . . . . 15
Reporting Verilog Include Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Simple Design Hierarchy Traversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Robust Design Hierarchy Traversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Design Hierarchy and Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Design Hierarchy and VHDL Configurations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Pruning the Hierarchy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Finding the Compilation Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Generated HDL File Paths


Some source files of a design may be HDS graphics files. Using the Tcl API commands you can
navigate 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 prints
out the path to the uart_tb generated HDL file.
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 configure hardHdlDir]/ C:/Lastbuild/32/LatestBuild/examples/
[$generatedHdlFile configure uart/hdl/uart_tb_struct.vhd
relativePathname]

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 lib
is substituted with the value of the command within []

14 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Library Contents API
Reporting VHDL Packages Directly Referenced by a Library

In other words the result of the library open command is given to the variable lib. Refer to
“library object commands” on page 156. When a '[' appears in a command, Tcl treats everything
between it and the matching ']' as a nested Tcl command. Tcl evaluates the nested API
command 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 the
second 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 the
UART library. The $lib together with the declaration option and the uart_tb struct argument
constitute a new command.This command returns hds1 which is a handle referring to an HDS
declaration. Refer to “library object commands” on page 156.

set generatedHdlFile [[$tb file] generated]

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

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 156 and “file object commands” on page 148.

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

Reporting VHDL Packages Directly Referenced by a


Library
Instead of using discrete Tcl commands, Tcl procedures will be used. Procedures in Tcl serve
much 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

HDL Designer Series™ Tcl Reference Manual, v2019.4 15

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Library Contents API
Reporting VHDL Packages Directly Referenced by a Library

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

In this example the procedure showPkgs is considered a command which takes a library object
as 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 interface
and implementation found both in VHDL designs and in HDS graphics files. A Verilog module
corresponds to both an entity and architecture, so each module in Verilog text files becomes
both an entity and an architecture in the API. This allows scripts using the API to treat VHDL
text, 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 Created
Commands” on page 137.

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
}
}
}
}
}
showPkgs [library open uart]

ieee.std_logic_1164
ieee.std_logic_arith
std.TEXTIO

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

16 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Library Contents API
Reporting Verilog Include Files

Reporting Verilog Include Files


File 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 files
are not constrained to reside within HDS libraries, they can be present anywhere in the
filesystem.
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 156 and “file object commands” on page 148.

Issue: our example designs have no include statements.

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

Simple Design Hierarchy Traversal


The following example shows a script that walks the hierarchy of a design and reports its
structure:
proc indent {} { return [string repeat { } $::indent] }

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

HDL Designer Series™ Tcl Reference Manual, v2019.4 17

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Library Contents API
Simple Design Hierarchy Traversal

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 0
walkArch [$lib declaration uart_tb struct]

Refer to “library object commands” on page 156, “instance object commands” on page 155 and
“architecture object commands” on page 140.

The procedure walkArch takes a library declaration as an argument and returns all the library
architectures 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_mux
Error: Instance ser_out_mux is
unbound

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

18 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Library Contents API
Robust Design Hierarchy Traversal

Robust Design Hierarchy Traversal


If you want your script to trap unbound component instances and continue walking the
hierarchy, you need to use the 'catch' command. The catch command evaluates a script and traps
exceptional 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 0
walkArch [$lib declaration uart_tb struct]

Refer to “library object commands” on page 156, “instance object commands” on page 155 and
“architecture object commands” on page 140.

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)

HDL Designer Series™ Tcl Reference Manual, v2019.4 19

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Library Contents API
Design Hierarchy and Frames

Design Hierarchy and Frames


The API uses the term 'frame' to refer to a number of constructs that add hierarchy within an
architecture.
• FOR frames, IF frames, ELSIF frames, ELSE frames, CASE frames, WHEN 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, ELSIF GENERATE, ELSE GENERATE, CASE
GENERATE, WHEN 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 0
walkArch [$lib declaration uart_tb struct]

Refer to “library object commands” on page 156, “instance object commands” on page 155 and
“architecture object commands” on page 140 and “frame object commands” on page 151.

20 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Library Contents API
Design Hierarchy and Frames

ARCH UART.uart_tb(struct)
class architectureFrame name struct
INST U_0
ARCH UART.tester(flow)
class architectureFrame name flow
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)

HDL Designer Series™ Tcl Reference Manual, v2019.4 21

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Library Contents API
Design Hierarchy and VHDL Configurations

Design Hierarchy and VHDL Configurations


The previous examples walked the design hierarchy assuming that each component instance
was bound to a single architecture. In a design using VHDL configuration declarations, an
architecture can have multiple configurations, each with different bindings for the component
instances. Walking the hierarchy of such a design requires keeping track of the configuration.
The API includes configuration objects, which correspond to VHDL configuration declarations
and frameConfiguration objects which correspond to a single level within the hierarchical
structure of a configuration declaration. Designs containing FOR GENERATE, IF GENERATE
and BLOCK statements will need corresponding entries in the configuration declarations, so
when 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 uses
configuredSubFrames 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 0
set cfg [$lib declaration someCfg]
walkArch [$cfg architecture] [$cfg frameConfiguration]

Refer to “library object commands” on page 156, “instance object commands” on page 155 and
“architecture object commands” on page 140 and “frame object commands” on page 151.

Issue: our sample designs do not use configurations.

22 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Library Contents API
Pruning the Hierarchy

Pruning the Hierarchy


The previous examples will expand each component instance, regardless of how many times it
has previously been encountered within the hierarchy. In some cases, it is appropriate to prune
the traversal so that a declaration is seen only once. This can be accomplished by adding a check
at the start of walkArch:
proc walkArch {arch} {
if {[info exists ::alreadyDone($arch)]} {
return
}

puts "[indent]ARCH [$arch configure fullName]"


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

Finding the Compilation Order


Most VHDL compilation tools and some Verilog compilation tools need to be given the source
files in an order which ensures that declarations are encountered before they are used. The API
can be used to determine an appropriate order.
The script shown below does this, though with some restrictions:

• For graphical VHDL designs, it assumes that the generation setting is for combined
entity and architecture files.
• It does not handle VHDL configuration declarations, these require a more sophisticated
form of pruning, since a single architecture can have a different structure for each
configuration
• It does not handle HDL text files containing declarations that are not part of the design
hierarchy

HDL Designer Series™ Tcl Reference Manual, v2019.4 23

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Library Contents API
Finding the Compilation Order

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
}
}
}

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 configure
relativePathname]"
}
}

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


walkDependencies [$decl body]
}
}

catch {unset alreadyDone}

24 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Library Contents API
Finding the Compilation Order

set lib [library open uart]


walkDependencies [$lib declaration uart_tb struct]

Refer to “library object commands” on page 156, “declaration object commands” on page 144,
and “file object commands” on page 148.

/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

HDL Designer Series™ Tcl Reference Manual, v2019.4 25

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Library Contents API
Finding the Compilation Order

26 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Chapter 2
HDS Tcl API Command Reference

Mentor Graphics has added a number of command extensions to the Tcl language to handle and
support the HDL Designer operations. These commands are “built-in” and are executed the
same as the standard Tcl commands.
This chapter provides a set of commands that can be used to work with and reference HDS
objects. HDS Tcl commands are either pre-defined or dynamically created.

Pre-Defined Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
General Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
SystemVerilog-VHDL Assistant API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
DesignChecker Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Block Diagram Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
HDL2Graphics Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Batch Mode Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Generation Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Library Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Version Management Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Dynamically Created Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Command Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
HDS objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Command List. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
architecture object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
blockFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
caseFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
configuration object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
declaration object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
elseFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
embeddedFrame object commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
entity option object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
file object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
forFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
frameConfiguration object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
frame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
ifFrame object commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
elsifFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
whenFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
instance object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
library object commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

HDL Designer Series™ Tcl Reference Manual, v2019.4 27

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference

machineFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158


packageHeader object commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
packageBody object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Command List. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

28 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Pre-Defined Commands

Pre-Defined Commands
This section provides HDS Tcl commands pre-defined and dynamically created commands.
General Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
SystemVerilog-VHDL Assistant API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
DesignChecker Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Block Diagram Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
HDL2Graphics Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Batch Mode Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Generation Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Library Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Version Management Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

HDL Designer Series™ Tcl Reference Manual, v2019.4 29

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

General Commands
This section lists general, predefined commands.
closeProject. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
configureInMemoryProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
configureProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
getDesignUnitFiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
getLibrarySearchPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
getVerilogIncludeSearchPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
invokeGUI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
openProject. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
removeInMemoryProperties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
removeProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
reportIncludeFiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
setDefaultView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
setDontTouchFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
setLibrarySearchPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
setVerilogIncludeSearchPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
unsetBlackBoxFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

30 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

closeProject
Closes current active project and automatically closes all open editors and/or browser tabs.
Usage
closeProject ()
Arguments
NA

HDL Designer Series™ Tcl Reference Manual, v2019.4 31

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

configureInMemoryProperties
Sets and gets in memory properties on a design object. This API only uses columns created by
it; using it with the fpf property columns has no effect.
Usage
configureInMemoryProperties (designObject args)
Arguments
• designObject:
Design object: {library|library/file|library.unit ?primaryName? ?secondaryName?
?filePath?}.
• args:
Optional sequence of property keys and values: key ?value? ?key value? ....
Examples
Pass only a design object to return it's property names/values as a list {{name1} val1 {name2}
val2}:

set properties [::configureInMemoryProperties $designObject]

Pass a design object and a property name to get the value of the property on this object:

set propertyValue [::configureInMemoryProperties $designObject


$propertyName]

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

::configureInMemoryProperties $designObject {$propertyName


$propertyValue}

32 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

configureProperties
Set and get properties on a design object.
Usage
configureProperties (designObject args)
Arguments
• designObject:
Design object: {library|library/file|library.unit ?primaryName? ?secondaryName?
?filePath?}.
• args:
Optional sequence of property keys and values: key ?value? ?key value? ....
Examples
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 this
object:

::configureProperties $designObject {$propertyName $propertyValue}

HDL Designer Series™ Tcl Reference Manual, v2019.4 33

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

getDesignUnitFiles
Gets the files associated with a design unit (entity, architecture, module, package, configuration,
and so on).
Usage
getDesignUnitFiles
<unit> [-source | -text | -graphics] [-generated] [-defaultView] [-skipEntity] [-diskPath | -
libraryPath] [-propertyFiles] [-sideData] [-hierarchy | -throughLibraries] [-array] [-
throughBlocks] [-includeFiles]
Arguments
• unit:
The design unit name in the form "<library>.<unit>(<view>)" to get the associated files for
a specific view, or in the form "<library>.<unit>" to get the associated files for all/default
view(s), or in the form "<library>" to get all the associated files in this library. (check "-
defaultView:" option).
• -source:
Default option. Get all source HDL and graphic files.
• -text:
Get all source HDL files.
• -graphics:
Get all source graphic files.
• -generated:
Get all generated HDL files.
• -defaultView:
Applicable only when no view name is specified in the design unit name. Get the files
associated with the unit's default view only. If not specified, get the files associated with all
available views for the design unit.
• -skipEntity:
Skip all files associated with the specified view's entity or symbol.
• -diskPath:
Default option. Get the absolute file paths.
• -libraryPath:
Get file paths relative to the library HDL/HDS mappings.
• -propertyFiles:
Get the "*._epf" and "*._fpf" associated design unit files if any.

34 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

• -sideData:
Get associated side data files if any.
• -hierarchy:
Get all files in the design unit hierarchy within the same design unit library; all other options
will be applied to the design unit and its hierarchical files.
• -throughLibraries:
Get all files in the design unit hierarchy within the same design unit library and through
other libraries in the project; all other options will be applied to the design unit and its
hierarchical files.
• -array <arrayName>:
Create an array <arrayName> that maps all the design unit files to a key in the array in the
form <Library.DesignUnit>; all other options will be applied to the design unit and its
hierarchical files.
• -throughBlocks:
Get all files in the design unit Block hierarchy within the same design unit library and
through other libraries in the project; all other options will be applied to the design unit and
its hierarchical files.
• -includeFiles:
Get all the direct ‘include files names in a design unit (even if they are missing from the
library); all other options will be applied to the design unit and its hierarchical files.
Return Values
List of design unit's associated files ordered sequentially.

Examples
Get all source HDL and graphics files for "accumulator" design unit.

getDesignUnitFiles "sequencer_vhd.accumulator" -source

Get all graphical view files (except the symbol file) for "accumulator" design unit.

getDesignUnitFiles "sequencer_vhd.accumulator" -graphics -skipEntity

Get all generated files for "flow" view of "accumulator" design unit.

getDesignUnitFiles "sequencer_vhd.accumulator(flow)" -generated

Get relative paths for all source files for "accumulator" design unit's default view.

HDL Designer Series™ Tcl Reference Manual, v2019.4 35

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

getDesignUnitFiles "sequencer_vhd.accumulator" -defaultView -libraryPath

Black-box all source HDL and graphic files for "accumulator" design unit.

eval setBlackBoxFile "sequencer_vhd" [getDesignUnitFiles


"sequencer_vhd.accumulator" -source] -justification {"black box for DC"}

36 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

getLibrarySearchPath
Get the project libraries search path.
Usage
getLibrarySearchPath
Arguments
None
Examples
Printing the list of libraries in the libraries search path

set libSearchPath [getLibrarySearchPath]


puts "Libraries in library search path..."
foreach lib $libSearchPath {
puts "Library: $lib"
}

Related Topics
setLibrarySearchPath

HDL Designer Series™ Tcl Reference Manual, v2019.4 37

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

getVerilogIncludeSearchPath
Gets the default Verilog include search path.
Usage
getVerilogIncludeSearchPath
Arguments
None
Examples
Printing the list of directories specified in the default Verilog include search path

set libSearchPath [getVerilogIncludeSearchPath]


puts "Directories in default include search path..."
foreach dir $libSearchPath {
puts "Include directory: $dir"
}

Related Topics
setVerilogIncludeSearchPath
getLibraryVerilogIncludeSearchPath

38 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

invokeGUI
Invoke the graphical user interface.
Usage
None
Arguments
None

HDL Designer Series™ Tcl Reference Manual, v2019.4 39

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

openProject
Opens a project after closing the current active project.
Usage
openProject (hdpPath)
Arguments
• hdpPath
Full path to HDS project you want to open.

40 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

removeInMemoryProperties
Deletes in memory properties on a design object.
Usage
removeInMemoryProperties (designObject args)
Arguments
• designObject:
Design object: {library|library/file|library.unit ?primaryName? ?secondaryName?
?filePath?}.
• args:
Optional sequence of property keys: {class1 ?name1?} {class2 ?name2?} ...

HDL Designer Series™ Tcl Reference Manual, v2019.4 41

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

removeProperties
Deletes properties on a design object. You can only use it with columns created by
configureProperties API. If you used it on in-memory columns, it has no effect
Usage
removeProperties (designObject args)
Arguments
• designObject
A design object that can be: Design object: a library, a file, or a unit. You need to specify the
name and path for this library, file, or unit.
• args
Optional sequence of property keys that you want to remove.

42 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

reportIncludeFiles
Reports included files and checks if there are any associated problems.
Usage
reportIncludeFiles <library> (<file_1> <file_2> <file_3>...) (-all | -problems) (verbose) (-group
(MAIN_FILE | INCLUDED_FILE)) (-fix (-preview)) (-report)
Arguments
• <library>:
Library name to report included files for. Note that an empty library name, for example “ “,
can be used but in this case at least one file must be specified and the full paths on the disk
must be provided.
• <file>:
Path of the file(s) for which the included files shall be reported. Multiple files can be
provided separated by white space “ ”. If the library name is specified, then file paths can be
provided relative to the library’s HDL mapping; otherwise, if the library name is not
specified, then the full paths on disk must be provided. If no file paths are specified, all files
in the specified library are checked for include files. This is optional.
• -all:
Default option. All included files are reported.
• -problems:
Only included files which have problems are reported. The detected problems can be as
follows:
o The include file path cannot be resolved using the current Verilog include search
path and implicit includes libraries settings.
o The include file path is resolved but it is not added to any of the project's libraries.
o The include file type is not set properly.
• -verbose:
Shows the following details for each included file:
o Indicates if the included file is resolved to a file on disk or not, and indicates the file
path on disk if resolved.
o If the included file is resolved, indicates if it is added to any library in the project.
o If the included file is resolved, indicates if it has a proper type.
• -group (MAIN_FILE | INCLUDED_FILE):
Groups the reported included files by the main file (MAIN_FILE) or by the included file
(INCLUDED_FILE). If the argument is specified with no value, the reported included files

HDL Designer Series™ Tcl Reference Manual, v2019.4 43

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

are grouped by the main file. If the argument is not specified, then the included files are
reported in a flattened way (no groups).
• -fix:
Tries to fix the included files’ problems (if any).
• -preview:
Lists the actions to be taken to fix the included files’ problems (without applying these
actions). This argument can be used only with '-fix' argument.
• -report:
Returns the report text rather than the number of problems.
Note
Note that this API returns the number of problems by default (if any); but if the -
report option is used, it returns the report text itself (rather than the number of
problems).

Return Values
By default, this command returns the number of included files which have problems (returns '0'
if no problems are encountered). If the '-fix' option is provided, it returns the number of
problems found after the fix (it should return '0' if all problems can be fixed). Also, this
command reports all the included files in the output log.

Examples
Check all files in "ethernet" library and report any problem associated with the included files.

reportIncludeFiles "ethernet" -problems

Report all files included by "eth_top.v" and "eth_cop.v" files in library "ethernet" (paths are
relative to HDL mapping) and group the result.

reportIncludeFiles "ethernet" "data/rtl/verilog/eth_top.v" "data/rtl/


verilog/eth_cop.v" -all -verbose -group

Check all files in "ethernet" library and try to fix include files’ problems (if any).

reportIncludeFiles "ethernet" -fix

44 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

setDefaultView
Set Default View.
Usage
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 verilog module).
• secondary:
Secondary HDL declaration (VHDL architecture, use module name for verilog).
Examples
Setting a view defined in an HDL file as the default one (view file name relative to the HDL
mapping).

setDefaultView "uart_txt" "xmit_rcv_control_fsm.vhd" "xmit_rcv_control"


"fsm"

Setting a view defined in a graphics file as the default one (view file name relative to the HDS
mapping).

setDefaultView "uart_v" "xmit_rcv_control/asm.am" "xmit_rcv_control"


"xmit_rcv_control"

HDL Designer Series™ Tcl Reference Manual, v2019.4 45

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

setDontTouchFile
Marks file(s) as don’t touch for all tasks.
Usage
setDontTouchFile <library> <file 1> <file 2> <file 3>… [-diskPath | -libraryPath] [-tool <tool
1> <tool 2> <tool 3>…] [-justification <comment>]
Arguments
• library:
Library name of the file(s) to be marked as don’t touch.
• file:
Path of the file to be marked as don’t touch (check -diskPath:, and -libraryPath: options).
Multiple files can be provided (separated by a white-space).
• -diskPath:
Default option. Accept file paths as absolute or relative path on disk.
• -libraryPath:
Accept file paths as relative to the library HDL/HDS mappings.
• -tool <tool 1> <tool 2> <tool 3>…:
Specifies tools to mark this file as dont touch for. This argument is optional. Multiple tools
can be specified. They could be one of the following:
ALL All the tools. This is the default value.
H2G Conversion to graphics
GENERATION Generation
VHDL_CONFIGURATION_GENERATION VHDL configuration generation
ALL_PLUGINS All the downstream plug-ins (any plug-in
which outputs files to downstream mapping).
SIMULATION_PLUGINS All simulation plug-ins
SYNTHESIS_PLUGINS All synthesis plug-ins
DESIGNCHECKER DesignChecker plug-in
PLUGIN:<downstream plug-in name> A specific downstream plug-in. Example"
"PLUGIN:QuestaSim Compiler".

• -justification <comment>:
Optional. Specifies a comment which explains why the file is marked as don’t touch.

46 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

Examples
Don’t touch HDL file in "uart_txt" library providing the absolute path on disk

setDontTouchFile "uart_txt" "$env(HDS_PROJECT_DIR)/uart_txt/hdl/


clock_divider.v" -diskPath

Don’t touch two HDL files in "ethernet" library providing relative file paths

setDontTouchFile "ethernet" "bench/verilog/tb_eth_behcomp.v" "bench/


verilog/stimuli/eth_txethmac_stim.v" -libraryPath

Don’t touch a HDL file in "ethernet" library for DesignChecker and QuestaSim Compiler plug-
in only

setDontTouchFile "ethernet" "bench/verilog/tb_eth_behcomp.v" -libraryPath


-tool DESIGNCHECKER PLUGIN:QuestaSim\ Compiler

Don’t touch graphics file in "sequencer_vhd" library providing relative file path

setDontTouchFile "sequencer_vhd" "accumulator/flow.fc" -libraryPath -


justification "dont touch 'flow' flow chart view"

Don’t touch all source HDL and graphics files for "accumulator" design unit in
"sequencer_vhd" library

eval setDontTouchFile "sequencer_vhd" [getDesignUnitFiles


"sequencer_vhd.accumulator" -source] -justification {"dont touch"}

Related Topics
unsetDontTouchFile

HDL Designer Series™ Tcl Reference Manual, v2019.4 47

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

setLibrarySearchPath
Sets the project libraries search path used when a missing component is referenced.
Usage
setLibrarySearchPath <libraries> [-start | -end]
Arguments
• <libraries>:
List of libraries to be searched for missing components (separated by white-space). It can be
empty. Example: "components_lib primitives_library".
• -start:
Appends the provided search path to the beginning of the current search path.
• -end:
Appends the provided search path to the end of the current search path.
Examples
Printing current library search path

puts "Current library search path \"[getLibrarySearchPath]\"."

Appending new libraries to the current search path

puts "Add 'components_lib' and 'primitives_lib' libraries to the search


path..."
setLibrarySearchPath "components_lib primitives_lib" -start

Printing the new library search path

puts "New library search path \"[getLibrarySearchPath]\"."

Related Topics
getLibrarySearchPath

48 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

setVerilogIncludeSearchPath
Sets the default Verilog include search path. The include search path is used to search for
included files. This path is used if the library specific include search path is not specified.
Usage
setVerilogIncludeSearchPath <directories> [-start | -end]
Arguments
• <directory>:
Search path directories (separated by ";"). Referencing environment variables and library
names (where $<library name> points to the library's HDL mapping) is allowed. Example:
"c:\my_includes;c:\design\includes".
• -start:
Appends the provided search path to the beginning of the current search path.
• -end:
Appends the provided search path to the end of the current search path.
Examples
Setting the default include search path preference

setVerilogIncludeSearchPath "c:\my_includes;c:\design\includes"

Append a new directory (specified by referencing an environment variable) to the default


include search path preference

setVerilogIncludeSearchPath "\$MY_INCLUDES" -start

Related Topics
getVerilogIncludeSearchPath
setLibraryVerilogIncludeSearchPath

HDL Designer Series™ Tcl Reference Manual, v2019.4 49

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
General Commands

unsetBlackBoxFile
Unsets the black-box property for file(s).
Usage
unsetBlackBoxFile <library> <file 1> <file 2> <file 3>… [-diskPath | -libraryPath]
Arguments
• library:
Library name of the file(s) to have the black-box property unset for.
• file:
Path of the file to have the black-box property unset for (check -diskPath:, and -libraryPath:
options).
• -diskPath:
Default option. Accept file paths as absolute or relative path on disk.
• -libraryPath:
Accept file paths as relative to the library HDL/HDS mappings.
Examples
Remove black-box property for HDL file in "uart_txt" library providing the absolute path on
disk

unsetBlackBoxFile "uart_txt" "$env(HDS_PROJECT_DIR)/uart_txt/hdl/


clock_divider.v" -diskPath

Remove black-box property for two HDL files in "ethernet" library providing relative file paths

unsetBlackBoxFile "ethernet" "bench/verilog/tb_eth_behcomp.v" "bench/


verilog/stimuli/eth_txethmac_stim.v" -libraryPath

Remove black-box property for graphics file in "sequencer_vhd" library providing relative file
path

unsetBlackBoxFile "sequencer_vhd" "accumulator/flow.fc" -libraryPath

Related Topics
setBlackBoxFile

50 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
SystemVerilog-VHDL Assistant API

SystemVerilog-VHDL Assistant API


Following is the way to configure HDS to run SystemVerilog-VHDL Assistant in batch mode.
In this case, there will be two tcl files.
These files are as follows:

• A Tcl file having HDS APIs to create HDS project, customize HDS and configure
SystemVerilog-VHDL Assistant to run in batch mode.
• A Tcl file to be passed to SystemVerilog-VHDL Assistant which should contain
SystemVerilog-VHDL Assistant APIs.

Note
For more information about SystemVerilog-VHDL Assistant APIs, refer to
SystemVerilog-VHDL Assistant API Reference manual located at
<HDS_install_location>/svassistant/docs/pdfdocs.

The following HDS API is used to configure SystemVerilog-VHDL Assistant batch run:

setupTask {SVAssistant} –setting Options

• runBatchMode:
It takes the value "1" to force running the -tcl switch (batch mode) or the value "0" to
force running the -do switch (GUI mode). Its default value is "0".
• execFilePath "<filepath>":
Tcl file having Systemverilog-VHDL Assistant APIs.
• cmdLineOptions "<SVAssistant -options>":
This option is used to pass the command options to SVA.
• runMode "newProjectRun":
This option will open SVA with the newProjectWizard opened.
• runMode "projectFile":
This option will open the projects specified in the TCL list in the other TaskSetting
named "projectFile".
• projectFile "<TCL list of SVAssistant project files to open>":
TCL list of SVAssistant project files to open when TaskSetting "runMode" is set to
"projectFile".

HDL Designer Series™ Tcl Reference Manual, v2019.4 51

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
SystemVerilog-VHDL Assistant API

Related Topics
setupTask

52 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
DesignChecker Commands

DesignChecker Commands
You can use DesignChecker commands in a Tcl file, then pass the file to an HDS batch file
through the ConfigFile option. You cannot use DesignChecker commands directly in HDS
batch files.
Use the ConfigFile option as follows to pass the Tcl file to HDS:

setupTask {DesignChecker} –setting ConfigFile {<absolute path of the tcl


file >}

For information on supported DesignChecker API commands you can use in the Tcl file, refer
to DesignChecker API Reference Manual.

addDCExclusion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
enablePragmaExclusions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
getBlackBoxFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
getLibraryDCConstraintsFile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
getPolicyLocation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
getRulesetLocation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
setBlackBoxFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
setLibraryDCConstraintsFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
setPolicyLocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
setRulesetLocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
unsetDontTouchFile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

HDL Designer Series™ Tcl Reference Manual, v2019.4 53

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
DesignChecker Commands

addDCExclusion
Sets up DesignChecker library or global constraints file by adding the necessary dc_exclude
command(s) to exclude selected library design unit(s), file(s) or line(s) from being checked by
the specified rule(s) or ruleset(s).
Usage
addDCExclusion -library <libraryName | * | all > (-design_unit <unitName | * | all> | -
source_file <path | * | all >) -start_line <lineNumber> -end_line <lineNumber>) -check
(<check1> <check2> <check3> ...) -comment <description>
Arguments
• -library <libraryName>
Specifies which library to exclude from.
• -design_unit <designUnit>
Specifies the design unit to be excluded.
• -source_file <sourceFile>
Specifies the source file to be excluded. Note that this argument accepts both relative and
full file paths. For relative paths, the path is relative to your current directory, or to the TCL
script where it is written in.
• -start_line <lineNumber>
Specifies the start line of the excluded range. Note that it only accepts integers. (Optional)
• -end_line <lineNumber>
Specifies the end line of the excluded range. Note that it only accepts a positive integer
greater than or equal the start_line.(Optional)
• -check <List<check>>
Specifies the rule or ruleset name(s) to be disabled. Note that they should be separated by
spaces.
• -comment <description>
Specifies the description/justification text that will be associated with the defined exclusion.
(Optional)
Examples
Exclude all design units of Library "UART" from "Allowed Constructs" base rule (and all its
configured rules)

addDCExclusion -library UART -design_unit {*} -check {Base Rules\Allow\


Allowed Constructs}

Exclude line 86 of source file "tester_flow.vhd" in library "UART" from "Sub-Program Body"
check

54 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
DesignChecker Commands

addDCExclusion -library UART -source_file {$HDS_HOME/examples/uart/hdl/


tester_flow.vhd} -start_line 86 -end_line 86 -check {RuleSets\Essentials\
Coding Practices\Sub-Program Body}

HDL Designer Series™ Tcl Reference Manual, v2019.4 55

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
DesignChecker Commands

enablePragmaExclusions
Enables or disables the pragma exclusion feature for DesignChecker.
Usage
enablePragmaExclusions (yes_no)
Arguments
• yes_no
Required argument to enable/disable pragma exclusions feature. “1” for enabling pragma
exclusions feature and “0” for disabling the feature.

56 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
DesignChecker Commands

getBlackBoxFile
Gets the files marked as black-box for DesignChecker tasks.
Usage
getBlackBoxFile <library> <file 1> <file 2> <file 3>… [-diskPath | -libraryPath]
Arguments
• library:
Library name of the file(s) marked as black-box.
• file:
Path of the file for which you need to get black-box information (check -diskPath:, and -
libraryPath: options). Multiple files can be provided (separated by a white-space).
• -diskPath:
Default option. Accept absolute or relative file paths.
• -libraryPath:
Accepts file paths relative to the library HDL/HDS mappings.
Return Values
This command returns an empty string “ ” if the file has never been black-boxed before, “0” if
the file is not black-boxed but has been black boxed before, and “1” if the file is black-boxed.

Examples
Get black-box information for HDL file in "uart_txt" library providing the absolute path on disk

getBlackBoxFile "uart_txt" "$env(HDS_PROJECT_DIR)/uart_txt/hdl/


clock_divider.v" -diskPath

Get black-box information for two HDL files in "ethernet" library providing relative file paths

getBlackBoxFile "ethernet" "bench/verilog/tb_eth_behcomp.v" "bench/


verilog/stimuli/eth_txethmac_stim.v" -libraryPath

Get black-box information for for graphics file in "sequencer_vhd" library providing the
relative file path

getBlackBoxFile "sequencer_vhd" "accumulator/flow.fc" -libraryPath

Get black-box information for all source HDL and graphics files for "accumulator" design unit
in "sequencer_vhd" library

HDL Designer Series™ Tcl Reference Manual, v2019.4 57

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
DesignChecker Commands

eval getBlackBoxFile "sequencer_vhd" [getDesignUnitFiles


"sequencer_vhd.accumulator" -source] -justification {"black box for DC"}

58 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
DesignChecker Commands

getLibraryDCConstraintsFile
Gets the path of DesignChecker library’s specific constraint Tcl file.
Usage
getLibraryDCConstraintsFile <library>
Arguments
• <library>
Library name for which to get the path of the associated constraints Tcl file.

HDL Designer Series™ Tcl Reference Manual, v2019.4 59

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
DesignChecker Commands

getPolicyLocation
Gets the locations for DesignChecker policies.
Usage
getPolicyLocation ()
Arguments
NA

60 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
DesignChecker Commands

getRulesetLocation
Gets the location for DesignChecker rulesets.
Usage
getRulesetLocation ()
Arguments
NA

HDL Designer Series™ Tcl Reference Manual, v2019.4 61

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
DesignChecker Commands

setBlackBoxFile
Marks file(s) as black-box for DesignChecker task.
Usage
setBlachBoxFile <library> <file 1> <file 2> <file 3>… [-diskPath | -libraryPath] [-justification
<comment>]
Arguments
• library:
Library name of the file(s) to be marked as black-box.
• file:
Path of the file to be marked as black-box (check -diskPath:, and -libraryPath: options).
Multiple files can be provided (separated by a white-space).
• -diskPath:
Default option. Accept file paths as absolute or relative path on disk.
• -libraryPath:
Accept file paths as relative to the library HDL/HDS mappings.
• -justification <comment>:
Optional. Specifies a comment which explains why the file is marked as black-box.
Examples
Black-box HDL file in "uart_txt" library providing the absolute path on disk

setBlackBoxFile "uart_txt" "$env(HDS_PROJECT_DIR)/uart_txt/hdl/


clock_divider.v" -diskPath

Black-box two HDL files in "ethernet" library providing relative file paths

setBlackBoxFile "ethernet" "bench/verilog/tb_eth_behcomp.v" "bench/


verilog/stimuli/eth_txethmac_stim.v" -libraryPath

Black-box graphics file in "sequencer_vhd" library providing relative file path

setBlackBoxFile "sequencer_vhd" "accumulator/flow.fc" -libraryPath -


justification "black-box 'flow' flow chart view"

Black-box all source HDL and graphics files for "accumulator" design unit in "sequencer_vhd"
library

62 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
DesignChecker Commands

eval setBlackBoxFile "sequencer_vhd" [getDesignUnitFiles


"sequencer_vhd.accumulator" -source] -justification {"black box for DC"}

Related Topics
unsetBlackBoxFile

HDL Designer Series™ Tcl Reference Manual, v2019.4 63

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
DesignChecker Commands

setLibraryDCConstraintsFile
Specifies the path of DesignChecker library’s specific constraint Tcl file.
Usage
setLibraryDCConstraintsFile <library> <path>
Arguments
• <library>
Library name for which to set the path of the associated constraints Tcl file.
• <path>
Path of DesignChecker library constraints Tcl file.

64 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
DesignChecker Commands

setPolicyLocation
Set the location for DesignChecker policies.
Usage
setPolicyLocation (location)
Arguments
• location:
Directory path beneath which the policies are located.

HDL Designer Series™ Tcl Reference Manual, v2019.4 65

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
DesignChecker Commands

setRulesetLocation
Set the location for DesignChecker RuleSets.
Usage
setRulesetLocation (location)
Arguments
• location:
Directory path beneath which the rulesets are located.

66 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
DesignChecker Commands

unsetDontTouchFile
Unsets the dont touch property for file(s).
Usage
unsetDontTouchFile <library> <file 1> <file 2> <file 3>… [-diskPath | -libraryPath] [-tool
<tool 1> <tool 2> <tool 3>…]
Arguments
• library:
Library name of the file(s) to have the dont touch property unset for.
• file:
Path of the file to have the dont touch property unset for (check -diskPath:, and -libraryPath:
options). Multiple files can be provided (separated by a white-space).
• -diskPath:
Default option. Accept file paths as absolute or relative path on disk.
• -libraryPath:
Accept file paths as relative to the library HDL/HDS mappings.
• -tool <tool 1> <tool 2> <tool 3>…:
Specifies tools to unmark this file as dont touch for. This argument is optional. Multiple
tools can be specified. They could be one of the following:
ALL All the tools. This is the default value.
H2G Conversion to graphics
GENERATION Generation
VHDL_CONFIGURATION_GENERATION VHDL configuration generation
ALL_PLUGINS All the downstream plug-ins (any plug-in
which outputs files to downstream mapping).
SIMULATION_PLUGINS All simulation plug-ins
SYNTHESIS_PLUGINS All synthesis plug-ins
DESIGNCHECKER DesignChecker plug-in
PLUGIN:<downstream plug-in name> A specific downstream plug-in. Example"
"PLUGIN:QuestaSim Compiler".

Examples
Remove dont touch property for HDL file in "uart_txt" library providing the absolute path on
disk

HDL Designer Series™ Tcl Reference Manual, v2019.4 67

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
DesignChecker Commands

unsetDontTouchFile "uart_txt" "$env(HDS_PROJECT_DIR)/uart_txt/hdl/


clock_divider.v" -diskPath

Remove dont touch property for two HDL files in "ethernet" library

unsetDontTouchFile "ethernet" "bench/verilog/tb_eth_behcomp.v" "bench/


verilog/stimuli/eth_txethmac_stim.v" -libraryPath

Remove dont touch property for a HDL file in "ethernet" library for Generation and
DesignChecker

unsetDontTouchFile "ethernet" "bench/verilog/tb_eth_behcomp.v" -


libraryPath -tool GENERATION DESIGNCHECKER

Remove dont touch property for graphics file in "sequencer_vhd" library

unsetDontTouchFile "sequencer_vhd" "accumulator/flow.fc" -libraryPath

Related Topics
setDontTouchFile

68 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Block Diagram Commands

Block Diagram Commands


This section lists batch flow APIs that create and manage HDS Block Diagrams.

addCmpInst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
addGenParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
addModuleWareCmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
addNet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
addPortIO. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
changeInstPMFUserText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
closeBDBatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
connectCmpPortToNet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
connectNetToInstPMF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
createBD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
createEmbeddedBlock. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
enablePortMapFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
layoutDiagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
openBDBatch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
setCptGenParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
setMWCmpParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

HDL Designer Series™ Tcl Reference Manual, v2019.4 69

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Block Diagram Commands

addCmpInst
Creates a component instance in the current active Block Diagram window.
Usage
addCmpInst <instName> <library> <component>
Arguments
• <instName>:
Name of the new instance you want to create from the component in the Block Diagram.
• <library>:
Name of the library that contains the instantiated component.
• <component>:
Name of the component you want to instantiate.
Note
If you use this API command in HDL Designer interactive mode, ensure that a Block
Diagram window is active using “setActiveWindow” API command. Note that if you are
creating a Block Diagram using “createBD” API command, the Block Diagram window opens
and is automatically set as active.

If you use this API command in batch mode, ensure that a Block Diagram document is open in
memory using “openBDBatch” API command.

Related Topics
connectCmpPortToNet
setCptGenParam
enablePortMapFrame
connectNetToInstPMF
changeInstPMFUserText

70 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Block Diagram Commands

addGenParam
Creates a new generic/parameter for the current active Block Diagram.
Usage
addGenParam <name> [value] [comment] [type] [pragma]
Arguments
• <name>:
Name of the generic/parameter you want to create.
• [value]:
Initial value for the generic/parameter. This argument is required for Verilog parameters.
• [comment]:
"End of line" comment for the generic/parameter.
• [type]:
Data type of the VHDL generic. This argument applies to VHDL block diagrams only. If
you do not specify this argument, the genericis created with type "Integer".
• [pragma]:
This is a boolean that takes the value “1” to create a VHDL pragma. This argument is
ignored for Verilog parameters.
Note
If you use this API command in HDL Designer interactive mode, ensure that a Block
Diagram window is active using “setActiveWindow” API command. Note that if you are
creating a Block Diagram using “createBD” API command, the Block Diagram window opens
and is automatically set as active.

If you use this API command in batch mode, ensure that a Block Diagram document is open in
memory using “openBDBatch” API command.

Related Topics
setCptGenParam

HDL Designer Series™ Tcl Reference Manual, v2019.4 71

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Block Diagram Commands

addModuleWareCmp
Creates an instance of the ModuleWare model you specify.
Usage
addModuleWareCmp <instName> <model>
Arguments
• <instName>:
Name of the instance you want to create from the ModuleWare component.
• <model>:
Name of the ModuleWare component you want to instantiate.
Note
If you use this API command in HDL Designer interactive mode, ensure that a Block
Diagram window is active using “setActiveWindow” API command. Note that if you are
creating a Block Diagram using “createBD” API command, the Block Diagram window opens
and is automatically set as active.

If you use this API command in batch mode, ensure that a Block Diagram document is open in
memory using “openBDBatch” API command.

Related Topics
setMWCmpParam

72 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Block Diagram Commands

addNet
Adds a new net in the current active Block Diagram window.
Usage
addNet <name> <bounds> <type>
Arguments
• <name>:
Name of the new net to create.
• <bounds>:
Dimensions of the net.
• <type>:
Data type of the net.
Note
If you use this API command in HDL Designer interactive mode, ensure that a Block
Diagram window is active using “setActiveWindow” API command. Note that if you are
creating a Block Diagram using “createBD” API command, the Block Diagram window opens
and is automatically set as active.

If you use this API command in batch mode, ensure that a Block Diagram document is open in
memory using “openBDBatch” API command.

HDL Designer Series™ Tcl Reference Manual, v2019.4 73

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Block Diagram Commands

addPortIO
Converts previously created NET to PORTIO with the specified mode.
Usage
addPortIO <mode> <name>
Arguments
• <mode>:
Mode of the port. This argument accepts one of the following values:
o input
o in
o output
o out
o inout
o buffer
This argument is case insensitive.
• <name>:
Name of the existing net to convert to port.
Note
If you use this API command in HDL Designer interactive mode, ensure that a Block
Diagram window is active using “setActiveWindow” API command. Note that if you are
creating a Block Diagram using “createBD” API command, the Block Diagram window opens
and is automatically set as active.

If you use this API command in batch mode, ensure that a Block Diagram document is open in
memory using “openBDBatch” API command.

Related Topics
addNet

74 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Block Diagram Commands

changeInstPMFUserText
Changes the Port Map Frame (PMF) user text for the instance you specify.
Usage
changeInstPMFUserText <instName> <text>
Arguments
• <instName>:
Name of the component instance for which you want to change the PMF user text.
• <text>:
New text for the instance’s PMF user text.
Note
If you use this API command in HDL Designer interactive mode, ensure that a Block
Diagram window is active using “setActiveWindow” API command. Note that if you are
creating a Block Diagram using “createBD” API command, the Block Diagram window opens
and is automatically set as active.

If you use this API command in batch mode, ensure that a Block Diagram document is open in
memory using “openBDBatch” API command.

Examples
Change the PMF text for the component instance U_1

::BDAPI::changeInstPMFUserText U_1 "addr = addr"

Related Topics
addCmpInst
enablePortMapFrame
connectNetToInstPMF

HDL Designer Series™ Tcl Reference Manual, v2019.4 75

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Block Diagram Commands

closeBDBatch
Closes the Block Diagram that is currently open in batch mode.
Usage
closeBDBatch
Parameters
• None

Related Topics
openBDBatch

76 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Block Diagram Commands

connectCmpPortToNet
Connects the port of the component instance to a net you specify. You can optionally specify a
net slice.
Usage
connectCmpPortToNet <instName> <formalPort> <actualNet> [actualSlice]
Arguments
• <instName>:
Name of the component instance where the port will be connected.
• <formalPort>:
Name of the port you want to connect.
• <actualNet>:
Name of the net to connect to the specified port.
• [actualSlice]:
Name of the slice of the specified net to connect to the port.
Note
If you use this API command in HDL Designer interactive mode, ensure that a Block
Diagram window is active using “setActiveWindow” API command. Note that if you are
creating a Block Diagram using “createBD” API command, the Block Diagram window opens
and is automatically set as active.

If you use this API command in batch mode, ensure that a Block Diagram document is open in
memory using “openBDBatch” API command.

Related Topics
addCmpInst

HDL Designer Series™ Tcl Reference Manual, v2019.4 77

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Block Diagram Commands

connectNetToInstPMF
Connects the Port Map Frame (PMF) of the component instance to the net you specify. You can
optionally specify a net slice.
Usage
connectNetToInstPMF <instName> <actualNet> [actualSlice]
Arguments
• <instName>:
Name of the component instance where the PMF will be connected to an existing net.
• <actualNet>:
Name of the net to connect to the instance PMF.
• [actualSlice]:
The slice of the specified net to connect to the instance PMF.
Note
If you use this API command in HDL Designer interactive mode, ensure that a Block
Diagram window is active using “setActiveWindow” API command. Note that if you are
creating a Block Diagram using “createBD” API command, the Block Diagram window opens
and is automatically set as active.

If you use this API command in batch mode, ensure that a Block Diagram document is open in
memory using “openBDBatch” API command.

Related Topics
addCmpInst
enablePortMapFrame
changeInstPMFUserText

78 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Block Diagram Commands

createBD
Creates a structure diagram and defines its library, name, and dialect.
Usage
createBD <library> <name> <dialect>
Arguments
• <library>:
Name of an existing library where the new block diagram will be created.
• <name>:
Design unit name of the block diagram.
• <dialect>:
Language dialect of the block diagram. For example, VHDL_2008.
Note
If you use this API command in HDL Designer interactive mode, the Block Diagram is
opened and set as the active window.

If you use this API command in batch mode, the Block Diagram is created on disk and does not
open in memory. You can use “openBDBatch” API command to open the created Block
Diagram in memory.

Related Topics
layoutDiagram
save

HDL Designer Series™ Tcl Reference Manual, v2019.4 79

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Block Diagram Commands

createEmbeddedBlock
Creates an embedded text block with RTL text that you define.
Usage
createEmbeddedBlock <rtlText>
Arguments
• <rtlText>:
RTL text of the embedded text block.
Note
If you use this API command in HDL Designer interactive mode, ensure that a Block
Diagram window is active using “setActiveWindow” API command. Note that if you are
creating a Block Diagram using “createBD” API command, the Block Diagram window opens
and is automatically set as active.

If you use this API command in batch mode, ensure that a Block Diagram document is open in
memory using “openBDBatch” API command.

80 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Block Diagram Commands

enablePortMapFrame
Enables Port Map Frame for the instance you specify and changes the connectByName option.
Usage
enablePortMapFrame <instName> <connectByName>
Arguments
• <instName>:
Name of the component instance where the PMF will be enabled.
• <connectByName>:
This is a boolean value that takes “1” to set the connectByName option and “0” to unset the
connectByName option.
Note
If you use this API command in HDL Designer interactive mode, ensure that a Block
Diagram window is active using “setActiveWindow” API command. Note that if you are
creating a Block Diagram using “createBD” API command, the Block Diagram window opens
and is automatically set as active.

If you use this API command in batch mode, ensure that a Block Diagram document is open in
memory using “openBDBatch” API command.

Related Topics
addCmpInst
connectNetToInstPMF
changeInstPMFUserText

HDL Designer Series™ Tcl Reference Manual, v2019.4 81

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Block Diagram Commands

layoutDiagram
Lays out the current active Block Diagram window.
Usage
layoutDiagram
Arguments
• None

Note
If you use this API command in HDL Designer interactive mode, ensure that a Block
Diagram window is active using “setActiveWindow” API command. Note that if you are
creating a Block Diagram using “createBD” API command, the Block Diagram window opens
and is automatically set as active.

If you use this API command in batch mode, ensure that a Block Diagram document is open in
memory using “openBDBatch” API command.

Related Topics
createBD

82 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Block Diagram Commands

openBDBatch
Opens a Block Diagram document in memory in batch mode.
Usage
openBDBatch <LibraryName> <BDName>
Arguments
• <LibraryName>:
Name of the library containing the Block Diagram document.
• <BDName>:
Name of the Block Diagram document to open.
Note
You must use the API command “closeBDBatch” to close the Block Diagram document
after performing all batch operations.

Related Topics
closeBDBatch

HDL Designer Series™ Tcl Reference Manual, v2019.4 83

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Block Diagram Commands

save
Saves the current active Block Diagram window.
Usage
save
Arguments
• None

Note
Using this API command in HDL Designer interactive mode saves the active Block
Diagram. On the other hand, using this API command in batch mode saves the open Block
Diagram document.

Related Topics
createBD

84 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Block Diagram Commands

setCptGenParam
Sets a value of generic/parameter mapping in the component instance you specify.
Usage
setCptGenParam <instName> <genName> <newValue>
Arguments
• <instName>:
Name of the component instance where the generic/parameter mapping will be set.
• <genName>:
Name of the generic/parameter mapping for which to set the value.
• <newValue>:
The new value of the generic/parameter you specify.
Note
If you use this API command in HDL Designer interactive mode, ensure that a Block
Diagram window is active using “setActiveWindow” API command. Note that if you are
creating a Block Diagram using “createBD” API command, the Block Diagram window opens
and is automatically set as active.

If you use this API command in batch mode, ensure that a Block Diagram document is open in
memory using “openBDBatch” API command.

Examples
Set the value of generic mapping "gen1" for the instance U_1

::BDAPI::setCptGenParam U_1 gen1 "1^1"

Related Topics
addGenParam
addCmpInst
setMWCmpParam

HDL Designer Series™ Tcl Reference Manual, v2019.4 85

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Block Diagram Commands

setMWCmpParam
Sets a parameter value for the ModuleWare component instance you specify.
Usage
setMWCmpParam <instName> <paramName> <paramValue>
Arguments
• <instName>:
Name of the Modulware component instance where the parameter value will be set.
• <paramName>:
Name of the parameter for which to set the value.
• <paramValue>:
The new value of the parameter you specify.
Note
If you use this API command in HDL Designer interactive mode, ensure that a Block
Diagram window is active using “setActiveWindow” API command. Note that if you are
creating a Block Diagram using “createBD” API command, the Block Diagram window opens
and is automatically set as active.

If you use this API command in batch mode, ensure that a Block Diagram document is open in
memory using “openBDBatch” API command.

Examples
Set a new value of the parameter "value" for the moduleware component
"CMP_TIE_s_ones_31dt0"

::BDAPI::addModuleWareCmp CMP_TIE_s_ones_31dt0 constval


::BDAPI::setMWCmpParam CMP_TIE_s_ones_31dt0 value
"11111111111111111111111111111111"

Related Topics
addModuleWareCmp
setCptGenParam

86 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
HDL2Graphics Commands

HDL2Graphics Commands
This section lists predefined HDL2Graphics commands.
runH2G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
runHdlImport. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
runHtmlExport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
setupH2G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
setupHdlImport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
setupHtmlExport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

HDL Designer Series™ Tcl Reference Manual, v2019.4 87

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
HDL2Graphics Commands

runH2G
Converts specified text declarations to graphics. Uses options set by setupH2G.
Usage
runH2G hierarchyType library file primary secondary
Arguments
• hierarchyType:
Type SINGLE | HIERARCHY.
• library:
Library name.
• file:
File path, relative to the library HDL mapping.
• primary:
Primary HDL declaration (VHDL entity or verilog module).
• secondary:
Secondary HDL declaration (VHDL architecture).
Examples
Converting all units of library UART_TXT to graphics

runH2G SINGLE UART_TXT "" "" ""

Converting the hierarchy beneath UART_TXT.uart_tb to graphics

runH2G HIERARCHY UART_TXT uart_tb.v uart_tb ""

Related Topics
setupH2G

88 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
HDL2Graphics Commands

runHdlImport
Imports HDL files to a new or an existing library. Options set by setupHdlImport are used.
Usage
runHdlImport <library> [<path to file 1> … <path to file n>] [-filelist <path to filelist>] [-
useSpecifiedLibraries] [-copy | -point] [-clean | -subDirectory]
Arguments
• <library>:
The name of the target library where files are imported. It could be an empty string. If an
empty string is provided (and no library specified in filelist), the project's default library is
used if -copy option is supplied and a made-up library name is used if -point option is
supplied. If the library does not exist, it is automatically created at the libraries root
directory preference (see setLibrariesRootDirectory).
• <path to file 1> … <path to file n>:
File paths to be imported. File paths can be specified relative to the current working
directory.
• -filelist <path to file-list>:
Imports a list of files specified in a filelist (see HDS User Manual for filelist format). Filelist
path can be specified relative to the current working directory.
• -useSpecifiedLibraries:
This option forces the import process to use the library(ies) specified in the file list or the
default library (as appropriate) when importing files. If this option is not used, the import
process will infer in which libraries the VHDL files belong by parsing “library”, “use” and
instance statements. New libraries will be created if necessary.
• -copy:
Imports the files by copying them to the target library HDL mapping. This option is the
default.
• -point:
Imports the files by pointing the library HDL mapping to them. If the target library is
already created, the HDL mapping must by enclosing all the files to import.
• -clean:
Applicable only when -point option is supplied. If the target library already exists, it cleans
the HDS mapping specified by the libraries root directory preference (see
setLibrariesRootDirectory) if it is not empty.

HDL Designer Series™ Tcl Reference Manual, v2019.4 89

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
HDL2Graphics Commands

• -subDirectory {<library 1> <directory 1>} {<library 2> <directory 2>} ... :
Applicable only when -copy option is supplied. Specify a sub-directory (relative to library's
HDL mapping) to have the files copied to. If nothing specified, files are copied to target
libraries' HDL mapping directory.
Examples
Importing files by pointing to them (without copying)

runHdlImport "mylib" "d:/mydesign/file1.v" "d:/mydesign/file2.v" -point -


clean

Importing files specified in a file-list by copying them to the target library location

runHdlImport "mylib" -filelist "d:/mydesign/components/filelist.txt" -


copy

Importing a set of files specified in a Tcl list

set files {{d:/mydesign/file1.v} {d:/mydesign/file2.v}}


eval runHdlImport {""} $files -point -clean

Related Topics
setupHdlImport

90 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
HDL2Graphics Commands

runHtmlExport
Run the HTML export on the given design object. Uses options set by setupHtmlExport.
Usage
runHtmlExport (library unit view file)
Arguments
• library:
Library name.
• unit:
Design unit name.
• view:
View name for graphics or secondary declaration name for HDL (VHDL architecture).
View name can be left empty when exporting primary unit files (e.g. graphical symbol).
• file:
File path, relative to the library HDS/HDL mapping.
Examples
Run HTML Export for Block Diagram view "struct" of design unit UART.uart_top

runHtmlExport UART uart_top struct uart_top/struct.bd

Run HTML Export for Symbol view of design unit UART_V.uart_tb

runHtmlExport UART_V uart_tb "" uart_tb/symbol.sb

HDL Designer Series™ Tcl Reference Manual, v2019.4 91

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
HDL2Graphics Commands

setupH2G
Set up the options for runHG2.
Usage
setupH2G (args)
Arguments
• args:
Option names and values.
View Styles Options:
• createAltSmFlowChart ON|OFF (ON):
If a State Diagram view cannot be created, create a FlowChart 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.
• createLeafBlockDiagram ON|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 are selected.
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.

92 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
HDL2Graphics Commands

• 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:
• assignmentShape RECTANGLE|BUFFER (RECTANGLE):
Specify the shape of concurrent assignments, if extracted.
• connectEmbedded ON|OFF (OFF):
Create signals between embedded blocks.
• createEmbeddedStateDiagram ON|OFF (OFF):
Create embedded state machines if possible.
• defaultInstanceView ON|OFF (OFF):
Apply to instances in preference to a specified view.
• diagramTextVisibility NONE|ALL|PREFS (NONE):
Specify the visibility of text associated with the diagram.
• extractAssignments ON|OFF (OFF):
Create separate embedded blocks for concurrent assignments.
• instanceLimit <positive integer> (1000):
Maximum number of instances allowed in a Block Diagram.
• netTextVisibility NONE|PORT_ONLY|ALL|PREFS (PORT_ONLY):
Specify the visibility of text associated with nets.
• portTextVisibility NONE|NAME_ONLY|NAME_AND_TYPE|PREFS (PREFS):
Specify the visibility of text associated with PortIO.
Placement Options:
• instanceAutoSize WIDTH|HEIGHT|WIDTH_AND_HEIGHT|NONE
(WIDTH_AND_HEIGHT):
Size component instances to fit the visible text.
• placementLimit <positive integer> (50):
Maximum number of auto-placed instances.
• preservePlacement ON|OFF (OFF):
Preserve placement of existing diagrams.

HDL Designer Series™ Tcl Reference Manual, v2019.4 93

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
HDL2Graphics Commands

Routing Options:
• alignPorts ON|OFF (ON):
Align port I/O with connections.
• bundleLimit <positive integer> (5):
Maximum number of signals allowed in a bundle.
• bundleSignals DIRECT|INDIRECT|NONE (NONE):
Bundle signals between nodes.
• busReconstruct ON|OFF (OFF):
Reconstruct buses for signal slices.
• connectionLimit <positive integer>:
Maximum number of connections allowed for a net.
• globalConnectors ON|OFF (ON):
Create global connectors for global signals.
• movePorts ON|OFF (ON):
Allow connector end points to move during routing.
• routeSignals ON|OFF (ON):
Connect and route signals on the diagram.
• useDefaults:
Set all options to default values. Default values are shown in brackets, above.
Examples
Set up the Convert to Graphics operation to create leaf level Block Diagram, Flow Chart, State
Diagram views and to use the default values for other H2G options.

setupH2G -createLeafBlockDiagram ON -createFlowChart ON -


createStateDiagram ON –useDefaults

Related Topics
runH2G

94 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
HDL2Graphics Commands

setupHdlImport
Set up the options for runHdlImport.
Usage
setupHdlImport [-useDefaults] [-overwrite (ON | OFF)] [-importReferencedText (ON | OFF)] [-
importDirectoryStructure (ON | OFF)] [-defaultLanguage (VHDL | Verilog | UNKNOWN)]
[-defaultVhdlDialect (VHDL_ANY | VHDL_87 | VHDL_93 | VHDL_2002 | VHDL_2008)]
[-defaultVerilogDialect (VERILOG_ANY | VERILOG_95 | VERILOG_2001 |
SYSTEM_VERILOG_2002)]
Arguments
• -useDefaults:
Sets all options to default values. Default values are shown in brackets, above.
• -overwrite:
Overwrite existing files.
• -importReferencedText:
Reference files from their original location instead of copying.
• -importDirectoryStructure:
Imports directory structure of source files.
• -defaultLanguage:
Specifies the language of source files with unrecognized extensions. Use UNKNOWN to
import non-HDL files.
• -defaultVhdlDialect:
Sets the specific VHDL dialect that will be used during import. Its default value is
VHDL_ANY. If set to default, HDS will auto detect the dialect during the import operation.
• -defaultVerilogDialect:
Sets the specific verilog dialect that will be used during import. Its default value is
VERILOG_ANY. If set to default, HDS will auto detect the dialect during the import
operation. Note that if set to SYSTEM_VERILOG_2002, HDS will import the files as
System Verilog and if set to VERILOG_2001, HDS will import the files as Verilog 2005.
Examples
Set up an HDL import for the library “mylib” to create a directory called “import” beneath
library HDL mapping to contain the imported files as well as creating references to the imported
files instead of copying them. Also, keep the same directory structure for imported files and use
the default values for other HDL import options.

setupHdlImport -setTargetDirectory mylib import -importReferencedText ON -


importDirectoryStructure OFF –useDefaults

HDL Designer Series™ Tcl Reference Manual, v2019.4 95

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
HDL2Graphics Commands

Related Topics
runHdlImport

96 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
HDL2Graphics Commands

setupHtmlExport
Set up the options for runHTMLExport.
Usage
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_types ALL|<doc_types> (ALL):
Add a list of document types to include in the export (see the Documentation and
Visualization Options dialog box for document type names).
• -include_only_doc_types:
Make these document types the only ones included for export. More types can be added
with subsequent include_doc_types calls (see the Documentation and Visualization Options
dialog box 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_files ALL|REGISTERED (ALL):
Set the types of sidedata files to export.
• -export_sidedata_type USER|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.

HDL Designer Series™ Tcl Reference Manual, v2019.4 97

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
HDL2Graphics Commands

• -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.
• -graphics_size <1- 100> (100):
Percentage size for graphics.
Related Topics
runHtmlExport

98 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Batch Mode Tasks

Batch Mode Tasks


This section describes the following batch mode tasks.
Use these commands to set up 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 of
hierarchy

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

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}

runTask. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
setCompileAlways . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
setupTask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

HDL Designer Series™ Tcl Reference Manual, v2019.4 99

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Batch Mode Tasks

runTask
Run a task.
Usage
runTask
Arguments
• <taskName>:
Specify the task run. Must be specified.
• [library [unit [view [pathName] ] ] ]:
Specifies the view to run the task on. If none are specified uses design root.
• 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.
Examples
Running DesignChecker on Verilog view "asm" for "xmit_rcv_control" design unit.

runTask DesignChecker "uart_v" "xmit_rcv_control" "xmit_rcv_control"


"xmit_rcv_control/asm.am"

100 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Batch Mode Tasks

setCompileAlways
Enable or disable incremental compilation for all incremental compilers.
Usage
setCompileAlways (enable)
Arguments
• enable:
ON|OFF: Set the global compile always switch (defaults to off)

HDL Designer Series™ Tcl Reference Manual, v2019.4 101

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Batch Mode Tasks

setupTask
Set up options for a task.
Usage
setupTask (args)
Arguments
• <taskName>:
Specify the task to apply these set up options to. Must be specified.
• setting <name> <value>:
Changes the value of the setting given by <name> on the specified task.
• single:
Changes the hierarchy depth to be used when running the task to single level. This option is
not applied to SystemVerilog-VHDL Assistant.
• hierarchical:
Changes the hierarchy depth to be used when running the task to hierarchy through blocks.
This option is not applied to SystemVerilog-VHDL Assistant.
• throughCpt:
Changes the hierarchy depth to be used when running the task to hierarchy through
components. This option is not applied to SystemVerilog-VHDL Assistant.
• 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.
Examples
Set up “ModelSim Compile” Task to always compile even if no changes have been made.

setupTask {ModelSim\ Compile} -setting compAlways 1

Set up “Precision Synthesis Prepare Data” Task to use safe FSM mode.

setupTask {Precision\ Synthesis Precision\ Synthesis\ Prepare\ Data} -


setting safeFsm 1

102 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Generation Commands

Generation Commands
This section described the following generation commands.
runConfigGenerate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
runGenerate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
setupGenerate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

HDL Designer Series™ Tcl Reference Manual, v2019.4 103

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Generation Commands

runConfigGenerate
Generate VHDL configuration files for the specified graphical objects. Uses options set by
setupGenerate.
Usage
runConfigGenerate (library entity arch)
Arguments
• library (= {}):
Library name.
• entity (= {}):
Design unit name for graphics.
• arch (= {}):
View name (file name without extension) for graphics file.

104 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Generation Commands

runGenerate
Generate HDL for the specified graphical objects. Uses options set by setupGenerate.
Usage
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 without extension) for graphics file.
Examples
Generating HDL for "asm" view for "xmit_rcv_control" design unit.

runGenerate "UART_V" "xmit_rcv_control" "asm.am"

HDL Designer Series™ Tcl Reference Manual, v2019.4 105

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Generation Commands

setupGenerate
Set up options for runGenerate and runConfigGenerate.
Usage
setupGenerate (args)
Arguments
• useDefaults:
Using this value will allow you to override your preference values to the following.
• generateAlways ON|OFF:
Always generate even if no changes have been made. 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).
• hierarchicalConfigSpecification ON|OFF:
Default (OFF).
• thruCptsConfigSpecification ON|OFF:
Default (OFF).
• synopsysPragmasForEmbeddedConfig ON|OFF:
Default (ON).

106 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Generation Commands

• 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).
• customCodeGen ON|OFF:
Default (OFF). If you require a flat configuration file, when using runConfigGenerate
specify -hierarchicalConfigSpecification and -thruCptsConfigSpecification with OFF.
• useDefaultCustomCodeScript ON|OFF:
Default (ON). Specify whether you want to use the default custom code script.
• includeVhdlGenProps ON|OFF:
Include generation properties after header in generated VHDL.
• includeVerilogGenProps ON|OFF:
Include generation properties after header in generated Verilog.
Examples
Setting up the Generation operation to go down through blocks and components, combine
VHDL entity and architecture in generated files, use conversion functions for type conversion,
always generate even if no changes have been made, use VHDL 93 style to generate end
statements and the default values for other generation options.

setupGenerate -throughCpt -combineEntityArch ON -autoTypeConversion


conv_func_only -generateAlways ON -vhdlEndStmtStyle VHDL_93 -useDefaults

Related Topics
runGenerate
runConfigGenerate

HDL Designer Series™ Tcl Reference Manual, v2019.4 107

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Library Commands

Library Commands
This section describes the following library commands.
addLibraryMapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
getLibrariesRootDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
getLibraryMacroDefinitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
getLibraryVerilogIncludeSearchPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
library names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
library open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
refreshLibraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
setLibrariesRootDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
setLibraryMacroDefinitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
setLibraryVerilogIncludeSearchPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

108 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Library Commands

addLibraryMapping
Adds (or changes) a library mapping and sets the library type and mode. Project file is edited
and saved.
Usage
addLibraryMapping <library> [-hdl <path>] [-hds <path>] [-downstream <path>] [-regular | -
protected] [-all | -specified]
Arguments
• library:
Library name to add or change mapping(s) for.
• -hdl <path>:
Adds (or changes) the HDL mapping and make it points to <path> location.
• -hds <path>:
Adds (or changes) the HDS mapping and make it points to <path> location.
• -downstream <path>:
Adds (or changes) a downstream mapping <mapping name> (example: ModelSim,
QuestaSim, DesignChecker, etc.) and make it points to <path> location.
• -regular:
Sets the library type to Regular. This option is the default.
• -protected:
Sets the library type to Protected.
• -all:
Sets the library mode to All. This option is the default.
• -specified:
Sets the library mode to Specified.
Examples
Adding a new HDL & HDS mappings for a library named "mylib"

addLibraryMapping "mylib" -hdl "d:/mydesign" -hds "d:/libraries/mylib/hds"


-all

Adding a downstream mapping for "ModelSim Compile" task

addLibraryMapping "mylib" -downstream ModelSim "d:/libraries/mylib/work"

Changing the library type to Protected

HDL Designer Series™ Tcl Reference Manual, v2019.4 109

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Library Commands

addLibraryMapping "mylib" -protected

110 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Library Commands

getLibrariesRootDirectory
Gets the default root directory location for libraries' HDL and HDS mappings. The default root
directory is used when there is no specific location specified for HDL or HDS mappings.
Mappings directories are created under "<libraries root directory>/<library name>".
Usage
getLibrariesRootDirectory
Arguments
None
Examples
Printing the default libraries root directory

puts "Libraries default root directory: [getLibrariesRootDirectory]"

Related Topics
setLibrariesRootDirectory

HDL Designer Series™ Tcl Reference Manual, v2019.4 111

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Library Commands

getLibraryMacroDefinitions
Gets the library macro definitions.
Usage
getLibraryMacroDefinitions <library> [-exact]
Arguments
• <library>:
Library name to get the macro definitions for.
• -exact:
Return the exact macro definitions strings.
Examples
Printing the list of macro definitions for "mylib" library

set libMacros [getLibraryMacroDefinitions "mylib"]


foreach macro $libMacros {
puts "Macro: $macro"
}

Getting the current exact macros string

set libMacros [getLibraryMacroDefinitions "mylib" -exact]

Append new macro definition to the currently defines ones

setLibraryMacroDefinitions "mylib" "$libMacros +define+WIDTH=8"

Related Topics
setLibraryMacroDefinitions

112 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Library Commands

getLibraryVerilogIncludeSearchPath
Gets the library Verilog include search path.
Usage
getLibraryVerilogIncludeSearchPath <library>
Arguments
• <library>:
Library name to get the search path for.
Examples
Printing the list of directories specified in the Verilog include search path for "mylib" library set
library "mylib"

set libSearchPath [getLibraryVerilogIncludeSearchPath $library]


puts "Directories in library '$library' include search path..."
foreach dir $libSearchPath {
puts "Include directory: $dir"
}

Related Topics
getVerilogIncludeSearchPath
setLibraryVerilogIncludeSearchPath

HDL Designer Series™ Tcl Reference Manual, v2019.4 113

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Library Commands

library names
Obtains the names of all libraries in the project.
Usage
library names ()
Arguments
• entity (= {}):
Design unit name for graphics.
• arch (= {}):
View name (file name without extension) for graphics file.
Return Values
List of library names.

114 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Library Commands

library open
Opens a library so its content can be examined.
Usage
library open (libraryName)
Arguments
• libraryName:
The library to open.
Return Values
The library object.

See “library object commands” on page 156.

HDL Designer Series™ Tcl Reference Manual, v2019.4 115

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Library Commands

refreshLibraries
Refreshes libraries by reloading files from the machine. You can use this command to refresh
current opened libraries, the whole project libraries, or library names you have chosen.
Usage
refreshLibraries (args)
Arguments
• args
An argument that accepts one of the following values: -opened | -project | {-libraries
<library names>}

116 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Library Commands

setLibrariesRootDirectory
Sets the default root directory location for libraries' HDL and HDS mappings. The default root
directory is used when there is no specific location specified for HDL or HDS mappings.
Mappings directories are created under "<libraries root directory>/<library name>".
Usage
setLibrariesRootDirectory <directory>
Arguments
• <directory>:
Directory path where libraries mapping created underneath by default.
Examples
Setting the libraries default root directory preference

setLibrariesRootDirectory "d:/design/libraries"

Importing some files to a library that does not exist

runHdlImport "newlib" "d:/design/file1.v" "d:/design/file2.v"

Mappings (HDL and HDS) for library "newlib" are created at "d:/design/libraries/newlib"

Related Topics
getLibrariesRootDirectory

HDL Designer Series™ Tcl Reference Manual, v2019.4 117

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Library Commands

setLibraryMacroDefinitions
Sets the library macro definitions.
Usage
setLibraryMacroDefinitions <library> <macros>
Arguments
• <library>:
Library name to set the macro definitions for.
• <macros>:
Macro definitions (separated by white-space or new line). Example: "+define+WIDTH=16
+define+ADDRESS=1".
Examples
Setting the macro definitions for "mylib" library

setLibraryMacroDefinitions "mylib" "+define+WIDTH=16 +define+ADDRESS=1"

Related Topics
getLibraryMacroDefinitions

118 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Library Commands

setLibraryVerilogIncludeSearchPath
Sets the library Verilog include search path. The include search path is used to search for
included files. The default include search path is used if this library-specific search path is not
specified.
Usage
setLibraryVerilogIncludeSearchPath <library> <directories> [-start | -end]
Arguments
• <library>:
Library name to set the search path for.
• <directory>:
Search path directories (separated by ";"). Referencing environment variables and library
names (where $<library name> points to the library's HDL mapping) is allowed. Example:
"c:\my_includes;c:\design\includes".
• -start:
Appends the provided search path to the beginning of the current search path.
• -end:
Appends the provided search path to the end of the current search path.
Examples
Setting Verilog include search path for "mylib" library to path under the library's HDL mapping

setLibraryVerilogIncludeSearchPath "mylib" "\$mylib/includes"

Appending new directories to the Verilog include search path for "mylib" library

setLibraryVerilogIncludeSearchPath "mylib" "c:\my_includes;c:\design\


includes" -end

Related Topics
setVerilogIncludeSearchPath
getLibraryVerilogIncludeSearchPath

HDL Designer Series™ Tcl Reference Manual, v2019.4 119

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Version Management Commands

Version Management Commands


This section describes the following version management commands.
runVMChangeLock. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
runVMCheckIn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
runVMCheckOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
runVMGet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
runVMHistory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
runVMLabel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
runVMSynchronize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
runVMUndoCheckOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
setupVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
setupVMChangeLock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
setupVMCheckIn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
setupVMCheckOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
setupVMGet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
setupVMHierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
setupVMLabel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
setupVMSynchronize. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

120 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Version Management Commands

runVMChangeLock
Change lock on a specified library, design unit, view. Uses options set by
setupVMChangeLock.
Usage
runVMChangeLock (args)
Arguments
• library:
The library name. This is required.
• view:
View name (optional, absent if design unit not specified).

HDL Designer Series™ Tcl Reference Manual, v2019.4 121

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Version Management Commands

runVMCheckIn
Check in a specified library, design unit, view. Uses options set by setupVMCheckIn.
Usage
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).

122 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Version Management Commands

runVMCheckOut
Check out a specified library, design unit, view. Uses options set by setupVMCheckOut.
Usage
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).

HDL Designer Series™ Tcl Reference Manual, v2019.4 123

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Version Management Commands

runVMGet
Get a specified library, design unit, view. Uses options set by setupVMGet.
Usage
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).

124 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Version Management Commands

runVMHistory
Get the history of a specified library, design unit, view.
Usage
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).

HDL Designer Series™ Tcl Reference Manual, v2019.4 125

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Version Management Commands

runVMLabel
Label a specified library, design unit, view. Uses options set by setupVMLabel.
Usage
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).

126 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Version Management Commands

runVMSynchronize
Synchronize a specified library, design unit, view. Uses options set by setupVMSynchronize.
Usage
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).

HDL Designer Series™ Tcl Reference Manual, v2019.4 127

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Version Management Commands

runVMUndoCheckOut
Undo the check out of a specified library, design unit, view.
Usage
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).

128 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Version Management Commands

setupVM
Set up the options for Version Management.
Usage
setupVM (option arg)
Arguments
• option:
Option name.
• tool <string>:
The version management interface required.
• library <string>:
Specify the library on which you want to invoke these options (this is only necessary if you
want to set 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 1|0:
You can choose to version manage the default view file.
• include_side_data 1|0:
Side data for a version managed object is included.
• verbose 1|0:
Additional info is displayed in the log window.
• create_empty_side_data 1|0:
Automatically create side data directories if they do not exist.
• multiple_repository_mode 1|0:
Repository is defined on a mapping by mapping basis.
• include_generated_hdl 1|0:
Generated HDL for a version managed object is included.

HDL Designer Series™ Tcl Reference Manual, v2019.4 129

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Version Management Commands

setupVMChangeLock
Set up the change lock options for Version Management.
Usage
setupVMChangeLock (option arg)
Arguments
• option:
Option name.
• version <string>:
The version required.
• change_lock 1|0:
When you lock an object, the version in your private workspace is made editable. If you
unlock an object, the version in your workspace is made read-only.

130 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Version Management Commands

setupVMCheckIn
Set up the check-in options for Version Management.
Usage
setupVMCheckIn (option arg)
Arguments
• option:
Option name.
• version <string>:
The version required.
• label <string>:
You can specify a symbolic label which is associated with a particular set of objects.
• description <string>:
Specify a description for the check in.
• overwrite_label 1|0:
Transfer the label to the new version number.
• retain_lock 1|0:
You can choose to retain a lock on the checked in objects.

HDL Designer Series™ Tcl Reference Manual, v2019.4 131

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Version Management Commands

setupVMCheckOut
Set up the check-out options for Version Management.
Usage
setupVMCheckOut (option arg)
Arguments
• option:
Option name.
• version <string>:
The version required.
• lock 1|0:
The objects are normally checked out with a lock to prevent concurrent editing by other
users but you can choose to unset this option.
• comment <string>:
If you are using ClearCase, you can enter a comment in the description field.

132 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Version Management Commands

setupVMGet
Set up the Get options for Version Management.
Usage
setupVMGet (option arg)
Arguments
• option:
Option name.
• version <string>:
The version required.
• overwrite 1|0:
Transfer the label to the new version number.

HDL Designer Series™ Tcl Reference Manual, v2019.4 133

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Version Management Commands

setupVMHierarchy
Set up the hierarchy options for Version Management.
Usage
setupVMHierarchy (option arg)
Arguments
• option:
Option name.
• hierarchy 1|0:
Include the hierarchy below the selected object.
• through_components 1|0:
If hierarchy selected, then include components.
• through_libraries 1|0:
You can choose to limit the scope to the current library or operate on objects through all
libraries.
• include_protected_libraries 1|0:
Include objects in protected libraries.
• packages 1|0:
Automatically include referenced VHDL packages or Verilog include files.
• -current_design_only 1|0:
Version Management operations on a parent design unit will run on the specified view for
each instance. If no view is specified, they will run on the default view.

134 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Version Management Commands

setupVMLabel
Set up the label options for Version Management.
Usage
setupVMLabel (option arg)
Arguments
• option:
Option name.
• version <string>:
The version required.
• label <string>:
Specify the required label.
• add 1|0:
Add or remove the label.
• overwrite 1|0:
Transfer the label to the new version number.
• description:
Specify a description for the label.

HDL Designer Series™ Tcl Reference Manual, v2019.4 135

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Version Management Commands

setupVMSynchronize
Set up the Synchronize options for Version Management.
Usage
setupVMSynchronize (option arg)
Arguments
• option:
Option name.
• version <string>:
The version required.
• add_files 1|0:
If this option is not set, only objects that already exist are synchronized.

136 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Dynamically Created Commands

Dynamically Created Commands


This section lists dynamically created commands.
Command Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
HDS objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
architecture object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
blockFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
caseFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
configuration object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
declaration object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
elseFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
embeddedFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
entity option object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
file object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
forFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
frameConfiguration object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
frame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
ifFrame object commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
elsifFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
whenFrame object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
instance object commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
library object commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
machineFrame object commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
packageHeader object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
packageBody object commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

Command Structure
A dynamically created Tcl command consists of an HDS object or a variable holding the value
of a handle to that object. The object is followed by an option possibly followed by one or more
arguments and is written according to the following format:
HDS object /Option/?Arguments

HDL Designer Series™ Tcl Reference Manual, v2019.4 137

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
HDS objects

HDS objects
HDS Objects listing:

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

For example:

$lib configure class

The command in the above example is a library command; in other words the HDS object
referenced in this command is a library object. The variable $lib holds the value of a handle
referring to the UART library.

Variables are created using the standard Tcl set command. HDS refers to objects through a set
of handles.The pre-defined library open command returns a handle to the UART library that
substitutes 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 $.

138 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Option

Option
Options listing:

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

For example:

$lib configure class

All objects have a ‘configure’ command option, this provides access to the attributes of the
object. If you use the configure command with no arguments, it shows the names and values of
all the attributes. Note that each command may have one or more arguments.

Command List
Command listing:

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

HDL Designer Series™ Tcl Reference Manual, v2019.4 139

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
architecture object commands

architecture object commands


Associated with an implementation of an entity. Corresponds to a VHDL architecture, a Verilog
module and an HDS structural or leaf graphics file.
Example:

• $architecture configure (args)


• $architecture entity ()
• $architecture file ()
• $architecture frame ()
• $architecture instances ()
• $architecture packages ()
Refer to the following table.
Table 2-1. architecture object commands
Command Description
$architecture configure (args) With no arguments lists the names and values of all
options.
The following arguments are available:
class: identifies the object as an architecture
name: name of the declaration itself
fullName: fully qualified name including those of parent
objects
startLine: the line number where the declaration begins
in the source file
refName: Name that can be to refer to the object when
running tasks or accessing properties
$architecture entity () Gets the entity associated with the architecture. Refer to
“entity option object commands” on page 147.
Returns: The entity object.
$architecture file () Obtains the file containing the object.
Returns: A single object, refer to“file object commands”
on page 148.
$architecture frame () Obtains the root frame of the architecture. Refer to “frame
object commands” on page 151.
Returns: The root frame.
$architecture instances () Gets all the instances in all frames of the architecture.
Refer to “instance object commands” on page 155.

140 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
blockFrame object commands

Table 2-1. architecture object commands (cont.)


Command Description
$architecture packages () Obtains the packages referenced.
Returns: A list of packages, refer to “packageHeader
object commands” on page 159, or an empty list if the
declaration is not VHDL.

blockFrame object commands


A VHDL block statement.
Example:

• $blockFrame configure (args)


• $blockFrame configuredSubFrames (frameConfiguration)
• $blockFrame instances ()
• $blockFrame subFrames ()
Refer to the following table.
Table 2-2. blockFrame object commands
Command Description
$blockFrame configure (args) With no arguments lists the names and values of all
options.
With one argument lists the value of the specified
option.
The following arguments are available:
class: identifies the object as a blockFrame
name:
$blockFrame configuredSubFrames Obtains the sub-frames.
(frameConfiguration) The following argument is available:
frameConfiguration: defines a level in a VHDL
configuration declaration from which the bindings
are selected
Returns: A list of sub-frame information, each
consecutive pair represents a frame and a
frameConfiguration in that order.

HDL Designer Series™ Tcl Reference Manual, v2019.4 141

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
caseFrame object commands

Table 2-2. blockFrame object commands (cont.)


Command Description
$blockFrame instances () Obtains the component instances; Instances
contained within a sub-frame are not included.
Refer to “instance object commands” on page 155.
Returns: A list of instances.
$blockFrame subFrames () Obtains the sub-frames.
Returns: A list of sub-frames.

caseFrame object commands


A VHDL ‘case generate'’ statement.
Example:

• $caseFrame configure (args)


• $caseFrame configuredSubFrames (frameConfiguration)
• $caseFrame instances ()
• $caseFrame subFrames ()
Refer to the following table.
Table 2-3. caseFrame object commands
Command Description
$caseFrame configure (args) With no arguments lists the names and values of all
options.
With one argument lists the value of the specified
option.
The following arguments are available:
class: identifies the object as a caseFrame
name:
$caseFrame configuredSubFrames Obtains the sub-frames.
(frameConfiguration) The following argument is available:
frameConfiguration: defines a level in a VHDL
configuration declaration from which the bindings
are selected
Returns: A list of sub-frame information, each
consecutive pair represents a frame and a
frameConfiguration in that order.

142 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
configuration object commands

Table 2-3. caseFrame object commands (cont.)


Command Description
$caseFrame instances () Obtains the component instances, directly contained
within the frame. Instances contained within a sub-
frame are not included. Refer to “instance object
commands” on page 155.
Returns: A list of instances.
$caseFrame subFrames () Obtains the sub-frames.
Returns: A list of sub-frames.

configuration object commands


A VHDL configuration declaration.
Example:

• $configuration architecture ()
• $configuration configure (args)
• $configuration file ()
• $configuration frameConfiguration ()
• $configuration packages ()
Refer to the following table.
Table 2-4. configuration object commands
Command Description
$configuration architecture () Gets the architecture associated with the
configuration. Refer to“architecture object
commands” on page 140.
Returns: The architecture object.

HDL Designer Series™ Tcl Reference Manual, v2019.4 143

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
declaration object commands

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


Command Description
$configuration configure (args) With no arguments lists the names and values of
all options.
With one argument lists the value of the
specified option.
The following arguments are available:
class : identifies the object as a configuration
name : name of the declaration itself
fullName : fully qualified name including those
of parent objects
startLine : the line number where the
declaration begins in the source file
refName : Name that can be to refer to the object
when running tasks or accessing properties
$configuration file () Obtain the file containing the object.
Returns: A single object. Refer to “file object
commands” on page 148.
$configuration frameConfiguration () Gets the frame configuration associated with the
configuration, refer to “frameConfiguration
object commands” on page 151.
Returns: The architecture object.
$configuration packages () Obtains the packages referenced.
Returns: A list of packages, refer to
“packageHeader object commands” on page 159,
or an empty list if the declaration is not VHDL.

declaration object commands


Declaration object commands.
Example:

• $declaration configure (args)


• $declaration file ()
• $declaration packages ()
Refer to the following table.

144 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
elseFrame object commands

Table 2-5. declaration object commands


Command Description
$declaration configure (args) With no arguments lists the names and values of all
options.
With one argument lists the value of the specified
option.
The following arguments are available:
name: name of the declaration itself
fullName: fully qualified name including those of
parent objects
startLine: the line number where the declaration
begins in the source file
refName: Name that can be to refer to the object
when running tasks or accessing properties
class: identifies the object as a declaration
$declaration file () Obtains the file containing the object.
Returns: A single object, refer to “file object
commands” on page 148.
$declaration packages () Obtains the packages referenced.
Returns: A list of packages, see “packageHeader
object commands” on page 159, or an empty list if
the declaration is not VHDL.

elseFrame object commands


A VHDL ‘else generate’ statement or a Verilog ‘else.
Example:

• $elseFrame configure (args)


• $elseFrame configuredSubFrames (frameConfiguration)
• $elseFrame instances ()
• $elseFrame subFrames ()
Refer to the following table.

HDL Designer Series™ Tcl Reference Manual, v2019.4 145

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
embeddedFrame object commands

Table 2-6. elseFrame object commands


Command Description
$elseFrame configure (args) With no arguments lists the names and values of all
options.
With one argument lists the value of the specified
option.
The following arguments are available:
class: identifies the object as an elseFrame
name:
$elseFrame configuredSubFrames Obtains the sub-frames.
(frameConfiguration) The following argument is available:
frameConfiguration: defines a level in a VHDL
configuration declaration from which the bindings
are selected
Returns: A list of sub-frame information, each
consecutive pair represents a frame and a
frameConfiguration in that order.
$elseFrame instances () Obtains the component instances, refer to“instance
object commands” on page 155, directly contained
within 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.

embeddedFrame object commands


Represents an embedded text within a graphics file.
Example:

• $embeddedFrame configure (args)


• $embeddedFrame configuredSubFrames (frameConfiguration)
• $embeddedFrame instances ()
• $embeddedFrame subFrames ()
Refer to the following table.

146 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
entity option object commands

Table 2-7. embeddedFrame object commands


Command Description
$embeddedFrame configure (args) With no arguments lists the names and values
of all options.
With one argument lists the value of the
specified option.
The following arguments are available:
class : identifies the object as an
embeddedFrame
name :
$embeddedFrame configuredSubFrames Obtains the sub-frames.
(frameConfiguration) The following argument is available:
frameConfiguration: defines a level in a
VHDL configuration declaration from which
the bindings are selected
Returns: A list of sub-frame information, each
consecutive pair represents a frame and a
frameConfiguration in that order.
$embeddedFrame instances () Obtains the component instances, refer to
“instance object commands” on page 155,
directly contained within the frame. Instances
contained within a sub-frame are not included.
Returns: A list of instances.
$embeddedFrame subFrames () Obtains the sub-frames.
Returns: A list of sub-frames.

entity option object commands


Associated with the interface to a design unit. Corresponds to a VHDL entity, a Verilog module
and an HDS symbol or block interface file.
Example:

• $entity architecture (name)


• $entity configure (args)
• $entity file ()
• $entity packages ()
Refer to the following table.

HDL Designer Series™ Tcl Reference Manual, v2019.4 147

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
file object commands

Table 2-8. entity option object commands


Command Description
$entity architecture (name) Obtains the architecture for an entity.
The following arguments are available:
name (= {})
The name of the architecture to find, if omitted uses the
default view settings to choose between alternative
architectures.
Returns: The matching architecture, refer to
“architecture object commands” on page 140.
$entity configure (args) With no arguments lists the names and values of all
options.
With one argument lists the value of the specified
option.
The following arguments are available:
class: identifies the object as an entity
name: name of the declaration itself
fullName: fully qualified name including those of parent
objects
startLine: the line number where the declaration begins
in the source file
refName: Name that can be to refer to the object when
running tasks or accessing properties
$entity file () Obtains the file containing the object.
Returns: A single object, refer to “file object commands”
on page 148.
$entity packages () Obtains the packages referenced.
Returns: A list of packages, see “packageHeader object
commands” on page 159, or an empty list if the
declaration is not VHDL.

file object commands


File object commands.
Example:

• $file configure (args)


• $file declarations ()

148 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
file object commands

• $file generated ()
• $file includes ()
• $file library ()
Refer to the following table.
Table 2-9. file object commands
Command Description
$file configure (args) With no arguments lists the names and values of all
options.
With one argument lists the value of the specified
option.
The following arguments are available:
relativePathname: pathname relative to the library
mapping
language: HDL language
version: version checked out from the version
management system
timestamp: time the file was last modified
type: identifies the type of the file
designDir: The full hard pathname of the design side
data directory
userDir: The full hard pathname of the design side data
directory
refName: Name that can be to refer to the object when
running tasks or accessing properties
class: 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.
$file includes () Gets the include files.
Returns: A list of files or the empty list of the language
is not Verilog.
$file library () Gets the library containing the file.
Returns: The library.

HDL Designer Series™ Tcl Reference Manual, v2019.4 149

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
forFrame object commands

forFrame object commands


A VHDL 'for generate' statement.
Example:

• $forFrame configure (args)


• $forFrame configuredSubFrames (frameConfiguration)
• $forFrame instances ()
• $forFrame subFrames ()
Refer to the following table.
Table 2-10. forFrame object commands
Command Description
$forFrame configure (args) With no arguments lists the names and values of all
options.
With one argument lists the value of the specified
option.
The following arguments are available:
leftBound:
rightBound:
class: identifies the object as a forFrame
name:
$forFrame configuredSubFrames Obtains the sub-frames.
(frameConfiguration) The following argument is available:
frameConfiguration: defines a level in a VHDL
configuration declaration from which the bindings
are selected
Returns: A list of sub-frame information, each
consecutive pair represents a frame and a
frameConfiguration in that order.
$forFrame instances () Obtains the component instances, refer to “instance
object commands” on page 155, directly contained
within the frame. Instances contained within a sub-
frame are not included.
Returns: A list of instances.
$forFrame subFrames () Obtains the sub-frames.
Returns: A list of sub-frames.

150 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
frameConfiguration object commands

frameConfiguration object commands


Represents 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 as
arguments to control the path through the design hierarchy.
Example:

• $frameConfiguration configure (args)


Refer to the following table.
Table 2-11. frameConfiguration object commands
Command Description
$frameConfiguration configure With no arguments lists the names and values of all
(args) options.
With one argument lists the value of the specified
option.
The following arguments are available:
name:
class: identifies the object as a frameConfiguration

Related Topics
instance object commands

frame object commands


Frame object commands.
Example:

• $frame configure (args)


• $frame configuredSubFrames (frameConfiguration)
• $frame instances ()
• $frame subFrames ()
Refer to the following table.

HDL Designer Series™ Tcl Reference Manual, v2019.4 151

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
ifFrame object commands

Table 2-12. frame object commands


Command Description
$frame configure (args) With no arguments lists the names and values of all
options.
With one argument lists the value of the specified
option.
The following arguments are available:
name:
class: identifies the object as a frame
$frame configuredSubFrames Obtains the sub-frames.
(frameConfiguration) The following argument is available:
frameConfiguration: defines a level in a VHDL
configuration declaration from which the bindings
are selected
Returns: A list of sub-frame information, each
consecutive pair represents a frame and a
frameConfiguration in that order.
$frame instances () Obtains the component instances, see “instance
object commands” on page 155, directly contained
within 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.

ifFrame object commands


A VHDL 'if generate' statement or a Verilog 'ifdef.
Example:

• $ifFrame configure (args)


• $ifFrame configuredSubFrames (frameConfiguration)
• $ifFrame instances ()
• $ifFrame subFrames ()
Refer to the following table.

152 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
elsifFrame object commands

Table 2-13. ifFrame object commands


Command Description
$ifFrame configure (args) With no arguments lists the names and values of all
options.
With one argument lists the value of the specified
option.
The following arguments are available:
class: identifies the object as an ifFrame
name:
$ifFrame configuredSubFrames Obtains the sub-frames.
(frameConfiguration) The following argument is available:
frameConfiguration: defines a level in a VHDL
configuration declaration from which the bindings
are selected
Returns: A list of sub-frame information, each
consecutive pair represents a frame and a
frameConfiguration in that order.
$ifFrame instances () Obtains the component instances, see“instance
object commands” on page 155, directly contained
within 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.

elsifFrame object commands


A VHDL ‘elsif generate’ statement.
Examples:

• $elsifFrame configure (args)


• $elsifFrame configuredSubFrames (frameConfiguration)
• $elsifFrame instances ()
• $elsifFrame subFrames ()
Table 2-14 explains the elsifFrame commands available.

HDL Designer Series™ Tcl Reference Manual, v2019.4 153

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
whenFrame object commands

Table 2-14. elsifFrame object commands


Command Description
$elsifFrame configure (args) With no arguments lists the names and values of all
options.
With one argument lists the value of the specified option.
The following arguments are available:
class: identifies the object as an elsifFrame
name:
$elsifFrame configuredSubFrames Obtains the sub-frames.
(frameConfiguration) The following argument is available:
frameConfiguration: defines a level in a VHDL
configuration declaration from which the bindings are
selected
Returns: A list of sub-frame information, each consecutive
pair represents a frame and a frameConfiguration in that
order.
$elsifFrame instances () Obtains the component instances, see“instance object
commands” on page 155, directly contained within the
frame. Instances contained within a sub-frame are not
included.
Returns: A list of instances.
$elsifFrame subFrames () Obtains the sub-frames.
Returns: A list of sub-frames.

whenFrame object commands


A VHDL ‘case generate’ alternative.
Examples:

• $whenFrame configure (args)


• $whenFrame configuredSubFrames (frameConfiguration)
• $whenFrame instances ()
• $whenFrame subFrames ()
Table 2-15 explains the whenFrame commands available.

154 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
instance object commands

Table 2-15. whenFrame object commands


Command Description
$whenFrame configure (args) With no arguments lists the names and values of all
options.
With one argument lists the value of the specified option.
The following arguments are available:
class: identifies the object as an whenFrame
name:
$whenFrame configuredSubFrames Obtains the sub-frames.
(frameConfiguration) The following argument is available:
frameConfiguration: defines a level in a VHDL
configuration declaration from which the bindings are
selected
Returns: A list of sub-frame information, each consecutive
pair represents a frame and a frameConfiguration in that
order.
$whenFrame instances () Obtains the component instances, see“instance object
commands” on page 155, directly contained within the
frame. Instances contained within a sub-frame are not
included.
Returns: A list of instances.
$whenFrame subFrames () With no arguments lists the names and values of all
options.
With one argument lists the value of the specified option.
The following arguments are available:
class: identifies the object as an whenFrame
name:

instance object commands


A component instance in a block diagram, IBD or structural HDL text file.
Example:

• $instance child ()
• $instance configure (args)
• $instance configuredChild (frameConfiguration)
Refer to the following table.

HDL Designer Series™ Tcl Reference Manual, v2019.4 155

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
library object commands

Table 2-16. instance object commands


Command Description
$instance child () Obtains the architecture under the component
instance.
Returns: The architecture object.
$instance configure (args) With no arguments lists the names and values of all
options.
With one argument lists the value of the specified
option.
The following arguments are available:
name:
class: identifies the object as an instance
$instance configuredChild Like 'child' but supporting VHDL configuration
(frameConfiguration) declarations.
The following argument is available:
frameConfiguration see “frameConfiguration
object commands” on page 151.
Returns: A 3 element list containing:
The configuration declaration object, if specified in
the component binding; see “configuration object
commands” on page 143.
The architecture object, see“architecture object
commands” on page 140.
The frame configuration for the root of the child
architecture.

library object commands


A library object is obtained from the 'library open' command. It provides access to the files and
declarations within the library.
Example:

• $library close ()
• $library configure (args)
• $library declaration (primaryName secondaryName)
• $library file (relativePathname)
• $library files ()

156 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
library object commands

• $library hdlDirectory ()
Refer to the following table.
Table 2-17. library object commands
Command Description
$library close () Removes the library from memory.
It is an error to close a library while an editor
window or Design Explorer tab is showing design
items in the library.
Returns: None.
$library configure (args) With no arguments lists the names and values of all
options.
With one argument lists the value of the specified
option.
The following arguments are available:
name: name of the library
type: regular, standard or downstreamOnly
hdlDir: directory as literally given
hdsDir: directory as literally given
hardHdlDir: directory with variables expanded
hardHdsDir: directory with variables expanded
refName: Name that can be to refer to the object
when running tasks or accessing properties
class: identifies the object as a library
$library declaration (primaryName Finds an entity, architecture, package or
secondaryName) configuration declaration by name. Raises an error
if a matching architecture is not available.
The following arguments are available:
primaryName: name to look for
secondaryName (= {}): only specified when
looking for an architecture can be the empty string if
the default architecture should be used
Returns: The matching declaration.
$library file (relativePathname) Finds a file, raises an error if not available.
The following argument is available:
relativePathname: pathname of the file relative to
the root directory of the library.
Returns: The file object.

HDL Designer Series™ Tcl Reference Manual, v2019.4 157

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
machineFrame object commands

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


Command Description
$library files () Obtains the files of the library, see “file object
commands” on page 148.
Returns: List of files.
$library hdlDirectory () Obtains the root HDL directory of the library.
Returns: Directory object.

machineFrame object commands


Represents hierarchy or concurrency within a state machine, algorithmic state machine or flow
chart file.
Example:

• $machineFrame configure (args)


• $machineFrame configuredSubFrames (frameConfiguration)
• $machineFrame instances ()
• $machineFrame subFrames ()
Refer to the following table.
Table 2-18. machineFrame object commands
Command Description
$machineFrame configure (args) With no arguments lists the names and values of
all options.
With one argument lists the value of the
specified option.
The following arguments are available:
class: identifies the object as a machineFrame
name:
$machineFrame configuredSubFrames Obtains the sub-frames.
(frameConfiguration) The following argument is available:
frameConfiguration: defines a level in a VHDL
configuration declaration from which the
bindings are selected
Returns: A list of sub-frame information, each
consecutive pair represents a frame and a
frameConfiguration in that order.

158 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
packageHeader object commands

Table 2-18. machineFrame object commands (cont.)


Command Description
$machineFrame instances () Obtains the component instances, see“instance
object commands” on page 155, directly
contained within the frame. Instances contained
within a sub-frame are not included.
Returns: A list of instances.
$machineFrame subFrames () Obtains the sub-frames.
Returns: A list of sub-frames.

packageHeader object commands


Package header object commands.
Example:

• $packageHeader body ()
• $packageHeader configure (args)
• $packageHeader file ()
• $packageHeader packages ()
Refer to the following table.
Table 2-19. packageHeader object commands
Command Description
$packageHeader body () Gets the package body implementing the
interface of a package header, see “packageBody
object commands” on page 160.
Returns: The body object.

HDL Designer Series™ Tcl Reference Manual, v2019.4 159

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
packageBody object commands

Table 2-19. packageHeader object commands (cont.)


Command Description
$packageHeader configure (args) With no arguments lists the names and values of
all options.
With one argument lists the value of the
specified option.
The following arguments are available:
class: identifies the object as a packageHeader
name: name of the declaration itself
fullName: fully qualified name including those
of parent objects
startLine: the line number where the declaration
begins in the source file
refName: Name that can be to refer to the object
when running tasks or accessing properties
$packageHeader file () Obtains the file containing the object.
Returns: A single object, see “file object
commands” on page 148.
$packageHeader packages () Obtains the packages referenced.
Returns: A list of packages, see “packageHeader
object commands” on page 159, or an empty list
if the declaration is not VHDL.

packageBody object commands


A VHDL package body.
Example:

• $packageBody configure (args)


• $packageBody file ()
• $packageBody packages ()
Refer to the following table.

160 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Command List

Table 2-20. packageBody object commands


Command Description
$packageBody configure (args) With no arguments lists the names and values of
all options.
With one argument lists the value of the
specified option.
The following arguments are available:
class: identifies the object as a packageBody
name: name of the declaration itself
fullName: fully qualified name including those
of parent objects
startLine: the line number where the declaration
begins in the source file
refName: Name that can be to refer to the object
when running tasks or accessing properties
$packageBody file () Obtains the file containing the object.
Returns: A single object, see “file object
commands” on page 148.
$packageBody packages () Obtains the packages referenced.
Returns: A list of packages, see “packageHeader
object commands” on page 159, or an empty list
if the declaration is not VHDL.

Command List
The following is a list of all HDS Tcl commands pre-defined and dynamically created
commands.
addLibraryMapping
configureInMemoryProperties
configureProperties
getBlackBoxFile
getDesignUnitFiles
getLibrariesRootDirectory
getLibraryMacroDefinitions
getLibrarySearchPath
getLibraryVerilogIncludeSearchPath
getVerilogIncludeSearchPath
invokeGUI
removeInMemoryProperties
reportIncludeFiles

HDL Designer Series™ Tcl Reference Manual, v2019.4 161

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Command List

setBlackBoxFile
setDefaultView
setDontTouchFile
setLibrariesRootDirectory
setLibraryMacroDefinitions
setLibrarySearchPath
setLibraryVerilogIncludeSearchPath
setPolicyLocation
setRulesetLocation
setVerilogIncludeSearchPath
unsetBlackBoxFile
unsetDontTouchFile
runH2G
runHdlImport
runHtmlExport
setupH2G
setupHdlImport
setupHtmlExport
runTask
setCompileAlways
setupTask
runConfigGenerate
runGenerate
setupGenerate
library names
library open
runVMChangeLock
runVMCheckIn
runVMCheckOut
runVMGet
runVMHistory
runVMLabel
runVMSynchronize
runVMUndoCheckOut
setupVM
setupVMChangeLock
setupVMCheckIn
setupVMCheckOut
setupVMGet
setupVMHierarchy
setupVMLabel
setupVMSynchronize
architecture object commands
architecture object commands
architecture object commands

162 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Command List

architecture object commands


architecture object commands
architecture object commands
blockFrame object commands
blockFrame object commands
blockFrame object commands
blockFrame object commands
caseFrame object commands
caseFrame object commands
caseFrame object commands
caseFrame object commands
configuration object commands
configuration object commands
configuration object commands
configuration object commands
configuration object commands
declaration object commands
declaration object commands
declaration object commands
elseFrame object commands
elseFrame object commands
elseFrame object commands
elseFrame object commands
embeddedFrame object commands
embeddedFrame object commands
embeddedFrame object commands
embeddedFrame object commands
entity option object commands
entity option object commands
entity option object commands
entity option object commands
file object commands
file object commands
file object commands
file object commands
file object commands
forFrame object commands
forFrame object commands
forFrame object commands
forFrame object commands
frameConfiguration object commands
frame object commands
frame object commands
frame object commands
frame object commands

HDL Designer Series™ Tcl Reference Manual, v2019.4 163

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
Command List

ifFrame object commands


ifFrame object commands
ifFrame object commands
ifFrame object commands
instance object commands
instance object commands
instance object commands
library object commands
library object commands
library object commands
library object commands
library object commands
library object commands
machineFrame object commands
machineFrame object commands
machineFrame object commands
machineFrame object commands
packageHeader object commands
packageHeader object commands
packageHeader object commands
packageHeader object commands
packageBody object commands
packageBody object commands
packageBody object commands

164 HDL Designer Series™ Tcl Reference Manual, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Index

$entity configure (args), 148


Index

— Symbols — $entity file (), 148


$architecture configure (args), 140 $entity option (arg), 147
$architecture entity (), 140 $entity packages (), 148
$architecture file (), 140 $file configure (args), 148, 149
$architecture frame (), 140 $file declarations (), 149
$architecture instances (), 140 $file generated (), 149
$architecture packages (), 141 $file includes (), 149
$architecture/option/arguments, 140 $file library (), 149
$blockFrame configure (args), 141 $forFrame configure (args), 150
$blockFrame configuredSubFrames $forFrame configuredSubFrames
(frameConfiguration), 141 (frameConfiguration), 150
$blockFrame instances (), 142 $forFrame instances (), 150
$blockFrame subFrames (), 142 $forFrame option (args), 150
$caseFrame configure (args), 142 $forFrame subFrames (), 150
$caseFrame configuredSubFrames $frame configure (args), 152
(frameConfiguration), 142 $frame configuredSubFrames
$caseFrame instances (), 143 (frameConfiguration), 152
$caseFrame option (args), 142 $frame instances (), 152
$caseFrame subFrames (), 143 $frame option (args), 151
$configuration architecture (), 143 $frame subFrames (), 152
$configuration configure (args), 144 $frameConfiguration configure (args), 151
$configuration file (), 144 $ifFrame configure (args), 153
$configuration frameConfiguration (), 144 $ifFrame configuredSubFrames
$configuration packages (), 144 (frameConfiguration), 153
$declaration configure (args), 145 $ifFrame instances (), 153
$declaration file (), 145 $ifFrame option (args), 152
$declaration packages (), 145 $ifFrame subFrames (), 153
$elseFrame configure (args), 145, 146 $instance child (), 156
$elseFrame configuredSubFrames $instance configure (args), 156
(frameConfiguration), 146 $instance configuredChild
$elseFrame instances (), 146 (frameConfiguration), 156
$elseFrame subFrames (), 146 $instance option (), 155
$embeddedFrame configure (args), 147 $library close (), 157
$embeddedFrame configuredSubFrames $library configure (args), 157
(frameConfiguration), 147 $library declaration (primaryName
$embeddedFrame instances (), 147 secondaryName), 157
$embeddedFrame option (args), 146 $library file (relativePathname), 157
$embeddedFrame subFrames (), 147 $library files (), 158
$entity architecture (name), 148 $library hdlDirectory (), 158

HDL Designer Series™ Tcl Reference Manual, v2019.4 165


$library option (), 156 —F—
$machineFrame configure (args), 158 file object commands, 148
$machineFrame configuredSubFrames forFrame object commands, 150
(frameConfiguration), 158 frame object commands, 151
$machineFrame instances (), 159 frameConfiguration object commands, 151
$machineFrame option (args), 158
$machineFrame subFrames (), 159 —G—
$packageBody configure (args), 161 Generated HDL File Paths, 14
$packageBody file (), 161 —H—
$packageBody option (args), 160 HDS objects, 27
$packageBody packages (), 161 Hierarchy
$packageHeader body (), 159 Pruning, 23
$packageHeader configure (args), 160
$packageHeader file (), 160 —I—
$packageHeader packages (), 160 ifFrame object commands, 152
instance object commands, 155
—A— invokeGUI (), 39
addLibraryMapping, 109
API Command Modes, 11 —L—
architecture object commands, 140 library names (), 114
library object commands, 156
—B— library open (libraryName), 115
blockFrame object commands, 141
—M—
—C— machineFrame object commands, 158
caseFrame object commands, 142
Command Basics, 12 —P—
Compilation Order, 23 packageBody object commands, 160
configuration object commands, 143 packageHeader object commands, 159
configureProperties (designObject args), 33
Console —R—
Accessing, 12 runConfigGenerate (library entity arch), 104
runGenerate (library entity arch), 105
—D— runH2G (hierarchyType library file primary
declaration object commands, 144 secondary), 88
Design Hierarchy and Frames, 20 runHdlImport (library args), 89
Design Hierarchy and VHDL Configurations, runTask (args), 100
22 runVMChangeLock (args), 121
Design Hierarchy Traversal, Robust, 19 runVMCheckIn (args), 122
Design Hierarchy Traversal, Simple, 17 runVMCheckOut (args), 123
Document Conventions, 12 runVMGet (args), 124
runVMHistory (args), 125
—E— runVMLabel (args), 126
elseFrame object commands, 145 runVMSynchronize (args), 127
embeddedFrame object commands, 146 runVMUndoCheckOut (args), 128
entity option object commands, 147
Example Scripts, 14

166 HDL Designer Series™ Tcl Reference Manual, v2019.4


—S—
setCompileAlways (enable), 101
setDefaultView (library file primary
secondary), 45
setRulesetLocation (location), 66
setupGenerate (args), 106
setupH2G (args), 92
setupHdlImport (args), 95
setupTask (args), 102
setupVM (option arg), 129
setupVMChangeLock (option arg), 130
setupVMCheckIn (option arg), 131
setupVMCheckOut (option arg), 132
setupVMGet (option arg), 133
setupVMHierarchy (option arg), 134
setupVMLabel (option arg), 135
setupVMSynchronize (option arg), 136
—V—
Verilog Include Files, 17
VHDL Packages, 15

HDL Designer Series™ Tcl Reference Manual, v2019.4 167


168 HDL Designer Series™ Tcl Reference Manual, v2019.4
End-User License Agreement
with EDA Software Supplemental Terms
Use of software (including any updates) and/or hardware is subject to the End-User License Agreement together with the
Mentor Graphics EDA Software Supplement Terms. You can view and print a copy of this agreement at:

mentor.com/eula

You might also like