找回密码
 立即注册
查看: 236|回复: 5

常用XDC约束

[复制链接]

4

主题

18

回帖

87

积分

少年

积分
87
发表于 2025-3-17 15:06:10 | 显示全部楼层 |阅读模式
本帖最后由 CrazyClock 于 2025-3-18 09:36 编辑

###############################################################################
# Pinout and Related I/O Constraints
###############################################################################
  1. set_property -dict {PACKAGE_PIN K28 IOSTANDARD LVCMOS25} [get_ports CLK_50M]
  2. 等同于
  3. set_property PACKAGE_PIN K28 [get_ports CLK_50M]
  4. set_property IOSTANDARD LVCMOS25 [get_ports CLK_50M]
复制代码
###############################################################################
#差分终端匹配约束
###############################################################################
  1. #UltraScale
  2. set_property DIFF_TERM_ADV TERM_100     [get_ports adc_glblclk_p]
  3. #V7
  4. set_property DIFF_TERM      TRUE        [get_ports dac_glblclk_p]
复制代码
Flash约束
# BPI Flash Programming

###############################################################################
# Flash Programming Settings: Uncomment as required by your design
# Items below between < > must be updated with correct values to work properly.
###############################################################################
  1. # BPI Flash Programming
  2. #set_property CONFIG_MODE BPI16 [current_design]
  3. #set_property BITSTREAM.CONFIG.BPI_SYNC_MODE <disable | Type1 | Type2> [current_design]
  4. #set_property BITSTREAM.CONFIG.CONFIGRATE 9 [current_design]
  5. #set_property CONFIG_VOLTAGE <voltage> [current_design]
  6. #set_property CFGBVS GND [current_design]
  7. # Example PROM Generation command that should be executed from the Tcl Console
  8. #write_cfgmem -format mcs -interface bpix16 -size 128 -loadbit "up 0x0 <inputBitfile.bit>" <outputBitfile.bit>

  9. set_property BITSTREAM.CONFIG.CONFIGRATE 22 [current_design]
  10. set_property BITSTREAM.CONFIG.BPI_SYNC_MODE Type1 [current_design]
复制代码

# SPI Flash Programming
  1. #set_property CONFIG_MODE SPIx4 [current_design]
  2. #set_property BITSTREAM.CONFIG.SPI_BUSWIDTH 4 \[current_design\]"
  3. #set_property CONFIG_VOLTAGE <voltage> [current_design]
  4. #set_property CFGBVS <GND | VCC> [current_design]
  5. # Example PROM Generation command that should be executed from the Tcl Console
  6. #write_cfgmem -format mcs -interface spix4 -size 128 -loadbit "up 0x0 <inputBitfile.bit>" <outputBitfile.bit>

  7. #SPI
  8. set_property CONFIG_MODE SPIx4 [current_design]
  9. set_property BITSTREAM.CONFIG.SPI_BUSWIDTH 4 [current_design]
  10. set_property BITSTREAM.CONFIG.CONFIGRATE 22 [current_design]
  11. #set_property BITSTREAM.CONFIG.SPI_32BIT_ADDR YES [current_design]
  12. #set_property BITSTREAM.CONFIG.SPI_FALL_EDGE YES [current_design]
复制代码



###############################################################################
#BIT压缩,未使用引脚悬空
###############################################################################
  1. set_property BITSTREAM.CONFIG.UNUSEDPIN Pullnone [current_design]
  2. set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
复制代码

# ID Config
  1. set_property BITSTREAM.CONFIG.USERID 32'h12345678 [current_design]
复制代码

国产V7 含有DDR逻辑,重新加载无法启动添加约束:

  1. set_property BITSTREAM.STARTUP.MATCH_CYCLE NOWAIT [current_design]
复制代码

###############################################################################
#dbg_hub约束
###############################################################################
  1. set_property C_CLK_INPUT_FREQ_HZ 300000000 [get_debug_cores dbg_hub]
  2. set_property C_ENABLE_CLK_DIVIDER false [get_debug_cores dbg_hub]
  3. set_property C_USER_SCAN_CHAIN 1 [get_debug_cores dbg_hub]
  4. connect_debug_port dbg_hub/clk [get_nets [list clk300m]]
复制代码

异步时钟组约束
  1. set_clock_groups -asynchronous \
  2.             -group [get_clocks -include_generated_clocks clk1] \  
  3.             -group [get_clocks -include_generated_clocks clk2] \
  4.             -group [get_clocks userclk1] \
  5.             -group [get_clocks userclk2]   
复制代码

6

主题

108

回帖

289

积分

壮年

积分
289
发表于 2025-3-17 16:30:11 | 显示全部楼层
感谢感谢

16

主题

90

回帖

330

积分

管理员

积分
330
发表于 2025-3-17 22:44:48 | 显示全部楼层
不如你试试 插入代码块的方式
这样帖子会更好看

4

主题

18

回帖

87

积分

少年

积分
87
 楼主| 发表于 2025-3-18 09:37:16 | 显示全部楼层
CrazyBingo 发表于 2025-3-17 22:44
不如你试试 插入代码块的方式
这样帖子会更好看

哈哈哈,学习了,确实好看点了

16

主题

90

回帖

330

积分

管理员

积分
330
发表于 2025-3-18 11:46:51 | 显示全部楼层
CrazyClock 发表于 2025-3-18 09:37
哈哈哈,学习了,确实好看点了

100分

1

主题

23

回帖

94

积分

少年

积分
94
发表于 2025-3-20 14:52:30 | 显示全部楼层
感谢分享!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|CrazyFPGA ( 粤ICP备2023025753号 )

GMT+8, 2025-4-2 16:41 , Processed in 0.047304 second(s), 20 queries .

Powered by CrazyFPGA X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表