转自:https://blog.csdn.net/Blaze_Xu/article/details/110851365
参考手册:
UG625:https://china.xilinx.com/support/documentation/sw_manuals/xilinx14_7/cgd.pdf
一、时钟约束
1.外部输入时钟clk_in周期为10ns,占空比为25%,相移为90°约束形式为:
create_clock -name clk_in -period 10 -waveform{2.5 5} [get_ports clk_in]
// {2.5, 5} 表示一个周期的波形中2.5ns - 5ns 为高。
2.时钟clk0的周期为10ns占空比为50%相移为0其约束形式为:
clk0: period = 10, waveform = {0 5}
// {0, 5} 表示一个周期的波形中0ns - 5ns 为高。
3.时钟clk1的周期为8ns占空比为75%(6ns)相移为2ns其约束形式为:
clk1: period = 8, waveform = {2 8}
//周期为8ns,2ns - 8ns 为高。
4.外部输入时钟clk_in周期为10ns,占空比为25%,相移为90°约束形式为:
create_clock -period 10 -waveform{2.5 5} [get_ports clk_in]
二、引脚约束
1.将led1信号放在芯片的W13引脚
set_property PACKAGE_PIN W13 [get_port led1]
2.将led1所在引脚的电气标准设置为LVCMOS33:
set_property IOSTANDARD LVCMOS33 [get_ports led1]
3.将led1引脚上拉电阻约束为有效:
set_property PULLUP true [get_ports led1]
4.将led1引脚下拉电阻约束为有效:
set_property PULLDOWN true [get_ports led1]
5.IO的驱动能力不够导致线上的电平不能马上到达期望的波形,从而产生抖动。提高电源及时供给能力可以采用在芯片电源引脚周围加入较大电容储能。默认驱动能力为12mA。驱动能力有< 2 4 6 8 12 16 24 >mA。将led1所在管脚驱动能力设置为16mA:
set_property DRIVE 16 [get_ports led1]
6.输出(双向)引脚转换速率slew rate可以设置为快fast和慢slow。默认为slow。
将led1所在输出引脚转换速率设置为快:
set_property SLEW FAST [get_ports led1]