当前位置:网站首页>FPGA的虚拟时钟如何使用?
FPGA的虚拟时钟如何使用?
2022-08-10 08:42:00 【yundanfengqing_nuc】
在我之前写的FPGA时序约束教程中,有一篇中讲到了虚拟时钟:
但文中对虚拟时钟的应用介绍的还不够详细,因此这里我们再对虚拟时钟做一个更加细致的介绍。
首先,虚拟时钟用于什么地方?
虚拟时钟通常用于设定输入和输出的延时,即set_input_delay
和set_output_delay
。可能有同学忘记这两个约束的用法了,这里我们再展示一下:
set_input_delay 0.5 -clock clkA [get_ports A]
set_output_delay 1 -clock clkB [get_ports B]
其中clkA
和clkB
就是我们使用create_clock
创建的主时钟或者虚拟时钟。
主时钟在创建的时候需要指定时钟输入端口,虚拟时钟不需要指定端口,所以称之为虚拟时钟。那什么场景下要用到虚拟时钟呢?
外部IO的参考时钟并不是设计中的时钟
下图中,外部IO的参考时钟比设计中主时钟的路径上多了一个BUFFER,因此我们需要使用虚拟时钟来进行约束。
create_clock -name sysclk -period 10 [get_ports clkin]
create_clock -name virtclk -period 10
set_clock_latency -source 1 [get_clock virtclk]
set_input_delay -clock virtclk -max 4 [get_ports dina]
set_input_delay -clock virtclk -min 2 [get_ports dina]
FPGA I/O路径参考时钟来源于内部衍生时钟,但与主时钟的频率关系并不是整数倍
如果I/O路径参考时钟源于内部的衍生时钟,那set_input_delay
和set_output_delay
约束中-clock
参数后的时钟不能是衍生时钟,比如下图的例子中,输入10MHz时钟经过了MMCM后去采输入的数据。
image-20211206203529124
a) 如果MMCM没有负的相移而且输出的频率也是10MHz,那么直接使用主时钟来约束input delay。
create_clock -period 100.000 -name clk [get_ports clk]
set_input_delay -clock clk -max 2.000 [get_ports datain]
set_input_delay -clock clk -min 1.000 [get_ports datain]
b) 如果MMCM输出频率是60MHz,那么这个衍生时钟跟主时钟并不是整数倍关系,这时就需要用到虚拟时钟了
create_clock -period 100.000 -name clk [get_ports clk]
create_clock -name clk_port_vclk -period 16.67
set_input_delay -clock clk_port_vclk -max 2 [get_ports datain]
set_input_delay -clock clk_port_vclk -min 1 [get_ports datain]
在不修改时钟特性的情况下针对I/O指定不同的jitter和latency
这个需求我们可以在Constraints Wizards
中指定,简单又方便
image-20211206212729797
在设置完成后,可以看到Tcl Command Preview
中提示的约束指令。
边栏推荐
- FFT模板
- The precise effect of network integration promotion outsourcing in the era of Internet of Things-Shenzhen Win-Win World News
- iwemeta metaverse: a doll sells for 9999 yuan, and Bubble Mart thinks it is not expensive at all
- m.bjhjwy.com全面教学设备 类型包括: 教学仪器, 教学设备 ,
- 明明加了唯一索引,为什么还是产生重复数据?
- Go-Excelize API源码阅读(十一)—— GetActiveSheetIndex()
- 【OAuth2】二十、OAuth2扩展协议 PKCE
- How to use [jmeter regular expression extractor] to solve the problem of returning the value as a parameter
- Uni-app开发微信小程序使用本地图片做背景图
- VMware ESX Server常用命令行
猜你喜欢
随机推荐
Quickly enter the current date and time
大佬们,请问一下,oraclecdc报错没有序列化,可是我看源码中的确是没有继承序列化的,是什么原因
怎么使用【jmeter正则表达式提取器】解决返回值作参数的问题
[机缘参悟-65]:《兵者,诡道也》-7-三十六计解读-败战计
UGUI—事件,iTween插件
TensorFlow 2.9的零零碎碎(一)
幂次方(暑假每日一题 20)
Compilation failure:找不到符号
CV-人脸识别-2018:ArcFace
It is obvious that a unique index is added, why does it still generate duplicate data?
编程老手如何在autojs和冰狐智能辅助之间选择?
winget package manager
深度剖析“八大排序”(上)_ 探寻一些不为人知的细节
Rust learning: 6.4_ enumeration of composite types
How to use [jmeter regular expression extractor] to solve the problem of returning the value as a parameter
Different command line styles
1 活动时间与安排
CV+Deep Learning——网络架构Pytorch复现系列——classification(三:MobileNet,ShuffleNet)
ShardingSphere入门
组合数模板