没有合适的资源?快使用搜索试试~ 我知道了~
vivado tcl 命令
3星 · 超过75%的资源 需积分: 50 32 下载量 71 浏览量
2014-12-06
11:10:04
上传
评论 1
收藏 996KB PDF 举报
温馨提示
试读
73页
vivado 支持脚本处理,对于熟悉脚本的人来说,操作起来非常方便,但是对于不熟悉脚本的人操作起来就比较困难。
资源推荐
资源详情
资源评论
Vivado Design Suite
User Guide
Using Tcl Scripting
UG894 (v2014.1) April 2, 2014
This document applies to the following software versions: Vivado Design Suite 2014.1 and 2014.2.This document applies to the following software versions: Vivado Design Suite 2014.1 and 2014.2.This document applies to the following software versions: Vivado Design Suite 2014.1 and 2014.2.This document applies to the following software versions: Vivado Design Suite 2014.1 and 2014.2.
Using Tcl Scripting www.xilinx.com 2
UG894 (v2014.1) April 2, 2014
Revision History
The following table shows the revision history for this document.
Date Version Revision
04/02/2014 2014.1
Added or revised the following section:
• Platform Specific Tcl Behaviors
• Collection versus String Representation
• Manipulating DRCs
Send Feedback
Using Tcl Scripting www.xilinx.com 3
UG894 (v2014.1) April 2, 2014
Table of Contents
Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Tcl Scripting in Vivado
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
A Brief Overview of Tcl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Getting Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Platform Specific Tcl Behaviors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Compilation and Reporting Example Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Loading and Running Tcl Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Writing a Tcl Script. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Accessing Design Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Handling Lists of Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Redirecting Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Controlling Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Accessing Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Creating Custom Design Rules Checks (DRCs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Contributing to the Tcl App Store: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Tcl Scripting Tips. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Appendix A: Additional Resources and Legal Notices
Xilinx Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Solution Centers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Please Read: Important Legal Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Send Feedback
Using Tcl Scripting www.xilinx.com 4
UG894 (v2014.1) April 2, 2014
Tcl Scripting in Vivado
Introduction
The Tool Command Language, or Tcl, is an interpreted programming language with
variables, procedures, and control structures, to interface to a variety of design tools and to
the design data.
Note:
For more information, see the Vivado Design Suite Tcl Command Reference Guide (UG835)
[Ref 1], or type <command> -help.
Note: For information on launching and using the Vivado® Design suite, see Vivado Design Suite
User Guide: Getting Started (UG910) [Ref 2]
The language is easily extended with new function calls, so that it has been expanded to
support new tools and technology since its inception and adoption in the early 1990s. It has
been adopted as the standard application programming interface, or API, among most EDA
vendors to control and extend their applications.
Xilinx® has adopted Tcl as the native programming language for the Vivado Design Suite,
as it is easily adopted and mastered by designers familiar with this industry standard
language. The Tcl interpreter inside the Vivado Design Suite provides the full power and
flexibility of the Tcl language to control the application, access design objects and their
properties, and create custom reports. Using Tcl, you can adapt your design flow to meet
specific design challenges.
The Tcl language provides built-in commands to read and write files to the local file system.
This enables you to dynamically create directories, start FPGA design projects, add files to
the projects, run synthesis and implementation. You can customize the reports generated
from design projects, on device utilization and quality of results, to share across the
organization.
You can also use the Tcl language to implement new design approaches, or work around
existing problems, inserting and deleting design objects, or modifying properties as
needed. You can write scripts to replay established portions of your design flow to
standardize the process.
Many of the Tcl commands discussed in the following text and script examples are specific
to the Vivado Design Suite. You can find detailed information regarding Vivado specific Tcl
commands in the Vivado Design Suite Tcl Command Reference Guide (UG835) [Ref 1], or in
the help system of the Vivado tools.
The Vivado IDE uses Xilinx Design Constraints (XDC) to specify the design constraints. XDC
is based on a subset of all the Tcl commands available in Vivado and is interpreted exactly
like Tcl. The XDC commands are primarily timing constraints, physical constraints, object
Send Feedback
Using Tcl Scripting www.xilinx.com 5
UG894 (v2014.1) April 2, 2014
A Brief Overview of Tcl
queries and a few Tcl built-in commands: set, list, and expr. For a complete description
of the XDC commands, see Appendix B of the Vivado Design Suite User Guide: Using
Constraints (UG903) [Ref 3]. Unlike Tcl scripts, XDC files are managed by the Vivado IDE so
that any constraint edited through the graphical interface or the Timing Constraints Editor
can be saved back to its original XDC file. For this reason, only XDC commands can be used
in a XDC file. If you need to use other Tcl commands to write your constraints, you must use
a Tcl script.
The Vivado tools write a journal file called vivado.jou into the directory from which
Vivado was launched. The journal is a record of the Tcl commands run during the session
that can be used as a starting point to create new Tcl scripts.
A log file, vivado.log is also created by the tool and includes the output of the
commands that are executed. Both the journal and log file are useful to verify which
commands were run and what result they produced.
Additional Tcl commands are provided by the Tcl interpreter that is built into the Vivado
Design Suite. For Tcl built-in commands, Tcl reference material is provided by the Tcl
Developer Xchange website, which maintains the open source code base and
documentation for Tcl, and is located at http://www.tcl.tk
See http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html [Ref 9]for an introductory tutorial
to the Tcl programming language. Also see the Tclers Wiki located at http://wiki.tcl.tk
for
some example scripts.
In this document you will see some examples of Tcl commands and Tcl scripts, and the
results that are returned by the Vivado Design Suite when these commands are run. The
commands and their return values appear with the following formats:
• Tcl commands and example scripts:
puts $outputDir
• Output to Tcl Console or results of Tcl commands:
./Tutorial_Created_Data/cpu_output
A Brief Overview of Tcl
A Tcl script is a series of Tcl commands, separated by new-lines or semicolons. A Tcl
command is a string of words, separated by blanks or tabs. The Tcl interpreter breaks the
command line into words and performs command and variable substitutions as needed.
The Tcl interpreter reads the line from left to right, evaluates each word completely before
attempting to evaluate the next. Command and variable substitutions are performed from
left to right as the line is read.
Send Feedback
剩余72页未读,继续阅读
资源评论
- ncf252017-09-22不错的材料,挺好的
- Hyunnnnn2017-10-25用官方文档骗分,用的是xilinx ug894文档,可以自行下载
yinpeng6eric
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功