HDL Designer Series TCL Reference Manual: Release v2019.4
HDL Designer Series TCL Reference Manual: Release v2019.4
HDL Designer Series TCL Reference Manual: Release v2019.4
Manual
Release v2019.4
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.
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
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
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
Index
End-User License Agreement
with EDA Software Supplemental Terms
This document is designed to help you use the HDS library contents API more effectively.
The HDS library contents API enables Tcl scripts to:
http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html
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
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.
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 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.
$lib help
Error: bad option "help" should be configure or file
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
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]
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 []
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:
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.
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.
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
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).
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.
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
Refer to “library object commands” on page 156 and “file object commands” on page 148.
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.
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
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
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.
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
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)
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
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.
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)
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
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.
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.
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
• 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
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
if {$reportFile} {
set lib [$file library]
# Exclude standard and downstreamOnly libraries.
if {[$lib configure type] eq "regular"} {
puts "[$lib configure hardHdlDir]/[$file configure
relativePathname]"
}
}
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
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
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
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
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
HDS Tcl API Command Reference
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
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
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
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}:
Pass a design object and a property name to get the value of the property on this object:
Pass a design object and a list of property name/value pairs to set the value of properties on this
object:
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}:
Pass a design object and a property name to get the value of the property on this object:
Pass a design object and a list of property name/value pairs to set the value of properties on this
object:
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.
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.
Get all graphical view files (except the symbol file) for "accumulator" design unit.
Get all generated files for "flow" view of "accumulator" design unit.
Get relative paths for all source files for "accumulator" design unit's default view.
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
Black-box all source HDL and graphic files for "accumulator" design unit.
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
Related Topics
setLibrarySearchPath
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
Related Topics
setVerilogIncludeSearchPath
getLibraryVerilogIncludeSearchPath
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
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.
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?} ...
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.
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
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.
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.
Check all files in "ethernet" library and try to fix include files’ problems (if any).
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).
Setting a view defined in a graphics file as the default one (view file name relative to the HDS
mapping).
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.
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
Don’t touch two HDL files in "ethernet" library providing relative file paths
Don’t touch a HDL file in "ethernet" library for DesignChecker and QuestaSim Compiler plug-
in only
Don’t touch graphics file in "sequencer_vhd" library providing relative file path
Don’t touch all source HDL and graphics files for "accumulator" design unit in
"sequencer_vhd" library
Related Topics
unsetDontTouchFile
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
Related Topics
getLibrarySearchPath
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"
Related Topics
getVerilogIncludeSearchPath
setLibraryVerilogIncludeSearchPath
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
Remove black-box property for two HDL files in "ethernet" library providing relative file paths
Remove black-box property for graphics file in "sequencer_vhd" library providing relative file
path
Related Topics
setBlackBoxFile
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
• 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:
• 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".
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
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:
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
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)
Exclude line 86 of source file "tester_flow.vhd" in library "UART" from "Sub-Program Body"
check
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
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.
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
Get black-box information for two HDL files in "ethernet" library providing relative file paths
Get black-box information for for graphics file in "sequencer_vhd" library providing the
relative file path
Get black-box information for all source HDL and graphics files for "accumulator" design unit
in "sequencer_vhd" library
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
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.
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
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
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
Black-box two HDL files in "ethernet" library providing relative file paths
Black-box all source HDL and graphics files for "accumulator" design unit in "sequencer_vhd"
library
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
Related Topics
unsetBlackBoxFile
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.
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.
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.
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
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
Remove dont touch property for two HDL files in "ethernet" library
Remove dont touch property for a HDL file in "ethernet" library for Generation and
DesignChecker
Related Topics
setDontTouchFile
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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
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
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
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
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.
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
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
Related Topics
addCmpInst
enablePortMapFrame
connectNetToInstPMF
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
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
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
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
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.
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
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
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
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
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
Related Topics
addGenParam
addCmpInst
setMWCmpParam
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"
Related Topics
addModuleWareCmp
setCptGenParam
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
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
Related Topics
setupH2G
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.
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)
Importing files specified in a file-list by copying them to the target library location
Related Topics
setupHdlImport
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
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.
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
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.
Related Topics
runH2G
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.
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
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.
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
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
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
Flow 1
|--- Tool A
|--- Tool B
|--- Flow 2
|--- Tool C
|--- Tool D
runTask. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
setCompileAlways . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
setupTask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
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.
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)
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.
Set up “Precision Synthesis Prepare Data” Task to use safe FSM mode.
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
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.
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.
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).
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.
Related Topics
runGenerate
runConfigGenerate
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
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"
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
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
Related Topics
setLibrariesRootDirectory
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
Related Topics
setLibraryMacroDefinitions
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"
Related Topics
getVerilogIncludeSearchPath
setLibraryVerilogIncludeSearchPath
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.
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.
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>}
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"
Mappings (HDL and HDS) for library "newlib" are created at "d:/design/libraries/newlib"
Related Topics
getLibrariesRootDirectory
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
Related Topics
getLibraryMacroDefinitions
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
Appending new directories to the Verilog include search path for "mylib" library
Related Topics
setVerilogIncludeSearchPath
getLibraryVerilogIncludeSearchPath
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
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).
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).
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).
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).
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).
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).
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).
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).
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.
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.
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.
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.
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.
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.
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.
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.
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
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
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:
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.
A variable can hold the value of one or more handles referring to HDS objects i.e
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.
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:
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
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
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
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
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
• $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.
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
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
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
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
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
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.
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
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
Related Topics
instance object commands
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
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
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
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
• $instance child ()
• $instance configure (args)
• $instance configuredChild (frameConfiguration)
Refer to the following table.
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 close ()
• $library configure (args)
• $library declaration (primaryName secondaryName)
• $library file (relativePathname)
• $library files ()
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.
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
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
• $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.
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
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
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
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
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
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
Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Index
mentor.com/eula