当前位置:网站首页>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中提示的约束指令。
边栏推荐
- 硬件工程师90天学习资料及笔记汇总
- SQL SERVER 数据库,表的数据发生增删改,该表的索引会在ldf日志中记录吗?
- LaTeX出现错误代码Command \algorithmic already defined
- debezium-connector-mysql拉起docker报错:debezium启动docke
- ARM Architecture 2: Processor Core and Assembly Instruction Set
- 基于sklearn的决策树应用实战
- 封装和使用通用的工具栏组件
- 协同工具满足70%-90%的工作需求,成为企业香饽饽
- Go-Excelize API source code reading (11) - GetActiveSheetIndex()
- 【Unity入门计划】Collision2D类&Collider2D类
猜你喜欢

短视频同城流量宣传小魔推有何优势?如何给实体商家带来销量?

Unity—UGUI control

Solve the problem that the win10win7win8 system cannot find the specified module and cannot register the desert plug-in

详解构建mock服务最方便的神器——Moco

iwemeta metaverse: a doll sells for 9999 yuan, and Bubble Mart thinks it is not expensive at all

【 WeChat applet 】 read page navigation

1 活动时间与安排

DAY25: Logic Vulnerability

2022-08-01 Advanced Network Engineering (24) STP Advanced Knowledge

J9数字科普:Web 3.0 是关于数据所有权还是去中心化?
随机推荐
The sixteenth day & the basic operation of charles
J9 digital science: Web 3.0 is about data ownership or decentralized?
Class Notes (7) (1) - #647. Find the root and the child (root)
1 活动时间与安排
1-31部 1-31套 和硬件工程师90天学习资料及笔记汇总
JS reduce
Rust learning: 6.3_ Tuples of composite types
Docker搭建Mysql一主一从
Uni-app开发微信小程序使用本地图片做背景图
详解构建mock服务最方便的神器——Moco
【OAuth2】二十、OAuth2扩展协议 PKCE
J9数字论:Web3.0+互联网电商会引起怎样的火花?
明明加了唯一索引,为什么还是产生重复数据?
How to use [jmeter regular expression extractor] to solve the problem of returning the value as a parameter
组合数模板
Spotify使用C4模型表达其架构设计
iwemeta元宇宙:一个娃娃卖9999元,泡泡玛特认为一点也不贵
Unity—UGUI控件
微信小程序--》小程序生命周期和WXS使用
NaiveUI中看起来没啥用的组件(文字渐变)实现原来这么简单