完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
假设我有一个端口A,它的宽度是30位。
所以就像A [29:0]。 在Xdc文件中,我尝试使用: get_ports A [1 *]从10到19获取位,但是它会回退10到19,但它也会退回A [1]。 我不知道我能从A [0]返回到A [9]。 有没有办法用一个Xdc命令而不是: get_ports A [0] get_ports A [1] 。 。 。 逐个? 谢谢。 以上来自于谷歌翻译 以下为原文 Assume I have a port A, the width of it is 30 bits. So it is like A[29:0]. In Xdc file, I try to use : get_ports A[1*] to get bits from 10 to 19, but it retures 10 to 19, but it also retures A[1]. And I have no idea can I get return from A[0] to A[9]. Is there any approach to get these bits with one Xdc command instead of: get_ports A[0] get_ports A[1] . . . one by one? Thanks. |
|
相关推荐
12个回答
|
|
默认情况下,get_ports(和其他get_ *命令)使用“glob”通配符。
在“glob”通配符中,*表示“任意数量的任何字符”和一个? 意思是“任何一个角色”(+也做了一些事,但我从不使用它)。 因此,你可以使用 get_ports A [?]; #为0-9位 get_ports A [1?]; #为10-19位 get_ports(以及其他get_ *命令)可以更改其行为以使用正则表达式而不是glob通配符。 为此,您必须在命令中添加-regexp选项。 然后你可以做muzaffer建议的,但你必须小心“真正的”方形支架。 get_ports -regexp“A [[0-9] ]”; #对于0-9位 get_ports -regexp“A [1 [0-9] ]”; #为10-19位 Avrum 在原帖中查看解决方案 以上来自于谷歌翻译 以下为原文 By default, the get_ports (and other get_* commands) use "glob" wildcarding. In "glob" wildcarding, a * means "any number of any characters" and a ? means "any one character" (The + does something as well, but I never use it). Thus, you can use get_ports A[?]; # for bits 0-9 get_ports A[1?]; # for bits 10-19 The get_ports (and other get_* commands) can change their behavior to use regular expressions instead of glob wildcarding. To do this, you have to add the -regexp option to the command. Then you can do what muzaffer suggested, but you have to be careful with the "real" square brakets. get_ports -regexp "A[[0-9]]"; # For bits 0-9 get_ports -regexp "A[1[0-9]]"; # for bits 10-19 Avrum View solution in original post |
|
|
|
你可以把它放在一个循环中。
我认为XDC支持主机TCL:for {set i 0} {$ i ... get_ports A [$ i]}另一种选择是使用更受限制的正则表达式。 我想你应该能够说get_ports A [[0-9]。],即给定列表中的单个字符。 您可能需要进行一些实验,因为我不确定Xilinx在XDC中支持哪种RE实现。 - 如果提供的信息有用,请将答案标记为“接受为解决方案”。给予您认为有用且回复的帖子。 以上来自于谷歌翻译 以下为原文 You can put it in a loop. I think XDC support hosts TCL: for {set i 0} {$i < 10} {incr i} { ... get_ports A[$i] } Another option is to use a more restricted regular expression. I think you should be able to say get_ports A[[0-9].] ie a single character from the given list. You may need to experiment a little bit as I am not sure which RE implementation Xilinx supports in XDC.- Please mark the Answer as "Accept as solution" if information provided is helpful. Give Kudos to a post which you think is helpful and reply oriented. |
|
|
|
默认情况下,get_ports(和其他get_ *命令)使用“glob”通配符。
在“glob”通配符中,*表示“任意数量的任何字符”和一个? 意思是“任何一个角色”(+也做了一些事,但我从不使用它)。 因此,你可以使用 get_ports A [?]; #为0-9位 get_ports A [1?]; #为10-19位 get_ports(以及其他get_ *命令)可以更改其行为以使用正则表达式而不是glob通配符。 为此,您必须在命令中添加-regexp选项。 然后你可以做muzaffer建议的,但你必须小心“真正的”方形支架。 get_ports -regexp“A [[0-9] ]”; #对于0-9位 get_ports -regexp“A [1 [0-9] ]”; #为10-19位 Avrum 以上来自于谷歌翻译 以下为原文 By default, the get_ports (and other get_* commands) use "glob" wildcarding. In "glob" wildcarding, a * means "any number of any characters" and a ? means "any one character" (The + does something as well, but I never use it). Thus, you can use get_ports A[?]; # for bits 0-9 get_ports A[1?]; # for bits 10-19 The get_ports (and other get_* commands) can change their behavior to use regular expressions instead of glob wildcarding. To do this, you have to add the -regexp option to the command. Then you can do what muzaffer suggested, but you have to be careful with the "real" square brakets. get_ports -regexp "A[[0-9]]"; # For bits 0-9 get_ports -regexp "A[1[0-9]]"; # for bits 10-19 Avrum |
|
|
|
非常感谢,你们俩。
它看起来像使用“?” 是一个更好的主意。 是否有任何文档可以在Xdc文件中学习这些语法?谢谢。 以上来自于谷歌翻译 以下为原文 Thanks very much, both of you. It looks like using "?" is a better idea. Is there any document to learn these grammars in Xdc file? Thanks. |
|
|
|
约束记录在UG903中 - 命令列表见附录A.
但是,每个Tcl命令都有帮助信息(类型为“help get_clocks”) - 帮助信息很有用! 但是,XDC约束非常强大,并且很好地了解它们可以让您对设计进行大量控制。 Xilinx有一个很好的课程,用于教授Vivado设计流程和Vivado约束 - 专门针对经验丰富的ISE用户 适用于ISE软件项目导航器用户的Vivado设计套件 适用于ISE软件用户的Vivado Advanced XDC和静态时序分析 这些都是很好的类,真正让您深入了解Vivado,静态时序分析和XDC约束。 Avrum 以上来自于谷歌翻译 以下为原文 Constraints are documented in UG903 - the list of commands is shown in Appendix A. Each of the Tcl commands, though, has help information (type "help get_clocks") - the help information is helpful! But, XDC constraints are very powerful, and knowing them well gives you lots of control over your design. Xilinx has a good classes for teaching Vivado design flow and Vivado constraints - specifically aimed at experienced ISE users Vivado Design Suite for ISE Software Project Navigator Users Vivado Advanced XDC and Static Timing Analysis for ISE Software Users These are good classes and really give you a deep understanding of Vivado, Static Timing Analysis and XDC constraints. Avrum |
|
|
|
|
|
|
|
嗨Avrum,当我尝试在Vivado tcl控制台中输入命令为:get_ports A [?] Vivado给我错误“无效命令名称”?“”。但是当我输入:get_ports A [1?]它确实有效。
为什么呢?谢谢。 以上来自于谷歌翻译 以下为原文 Hi Avrum, When I try to input command in Vivado tcl console as: get_ports A[?] Vivado gives me error that "invalid command name "?"". But when I input: get_ports A[1?] It does work. Why? Thanks. |
|
|
|
因为在TCL []中是一个表达式求值器。
解析器试图逃脱它,但显然不是很成功。 它知道1? 开始全球比赛,但由于某种原因通过? 直接到tcl。 - 如果提供的信息有用,请将答案标记为“接受为解决方案”。给予您认为有用且回复的帖子。 以上来自于谷歌翻译 以下为原文 Because in TCL [] is an expression evaluator. The parser is trying to escape it but not very successfully apparently. It knows that 1? starts a global match but for some reason passes ? directly to tcl.- Please mark the Answer as "Accept as solution" if information provided is helpful. Give Kudos to a post which you think is helpful and reply oriented. |
|
|
|
嗯,等一下Avrum是否有解决方案。
以上来自于谷歌翻译 以下为原文 hmmm, wait to see whether Avrum has the solution for this. |
|
|
|
试试“get_port A [?]”
- 如果提供的信息有用,请将答案标记为“接受为解决方案”。给予您认为有用且回复的帖子。 以上来自于谷歌翻译 以下为原文 try "get_port A[?]"- Please mark the Answer as "Accept as solution" if information provided is helpful. Give Kudos to a post which you think is helpful and reply oriented. |
|
|
|
这确实有效。
非常感谢。我刚才发现Avrum之前曾提到这一点,但我没注意到...... 以上来自于谷歌翻译 以下为原文 That did work. Thanks very much. I just found Avrum has mentioned this before, but I did't notice that …… |
|
|
|
你也可以把它们放在硬报价中
get_ports {A [?]} 然而,这令人费解。 除非在它之前有空格,否则Tcl解析器不应该看到[作为命令。 它很好用 get_ports A [1] get_ports A [1?] 我很确定这是一个错误。 我将提交一个webcase。 Avrum 以上来自于谷歌翻译 以下为原文 You can also put them in hard quotes get_ports {A[?]} However, that's puzzling. The Tcl parser is not supposed to see the [ as a command unless there is white space before it. Its fine with get_ports A[1] get_ports A[1?] I am pretty sure that this is a bug. I will file a webcase. Avrum |
|
|
|
只有小组成员才能发言,加入小组>>
2388 浏览 7 评论
2804 浏览 4 评论
Spartan 3-AN时钟和VHDL让ISE合成时出现错误该怎么办?
2270 浏览 9 评论
3338 浏览 0 评论
如何在RTL或xilinx spartan fpga的约束文件中插入1.56ns延迟缓冲区?
2440 浏览 15 评论
有输入,但是LVDS_25的FPGA内部接收不到数据,为什么?
768浏览 1评论
请问vc707的电源线是如何连接的,我这边可能出现了缺失元件的情况导致无法供电
551浏览 1评论
求一块XILINX开发板KC705,VC707,KC105和KCU1500
386浏览 1评论
1975浏览 0评论
692浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-29 17:13 , Processed in 1.529255 second(s), Total 67, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号