方法一:
1)在工程文件夹下面新建一个txt文件(或csv文件),按如下格式编写管教分配内容。注意:逗号是英文标点
To, Location
clk, PIN_T1
rst_n, PIN_T22
fpga_rxd, PIN_R20
fpga_txd, PIN_R19
divide_clk,
led_done, PIN_V8
2)点击菜单栏的Assigments–>Import Assignments,导入xxx.txt或者xxx.csv文件即可。
3)在菜单栏中。打开Assigment–>Pin Planer,可以查看上述方法分配的结果,验证管教是否分配正确。
方法二:
今天学会了用TCL写管教分配,跟他家分享下。
set_location_assignment PIN_M2 -to rst_n
set_location_assignment PIN_L11 -to led595_clk
set_location_assignment PIN_L13 -to led595_dout
set_location_assignment PIN_L14 -to led595_latch
set_location_assignment PIN_C3 -to spi_sck
set_location_assignment PIN_D1 -to spi_mosi
set_location_assignment PIN_G5 -to spi_cs
set_location_assignment PIN_F3 -to spi_miso
set_location_assignment PIN_E16 -to clk
TCL脚本对管脚分配的方法是set_location_assignment PIN_58 -to out_port_from_the_led[1]
set_location_assignment是固定的,PIN_58是开发板的管脚地址,out_port_from_the_led[1]是你在bdf中对管脚的命名。
把这些复制到TCL脚本下,插入到XXXXXX处,
如下图所示:
TCL脚本的打开方法:
Project–>Generate Tcl File for Project…. –>OK。
然后运行TCL脚本,
Tools–>Tcl Scripts…
会打开一个Tcl Scripts的编辑窗口,在这个窗口的Libraries中在Project的下拉中选择你的文件名的tcl的文件。
(注释:就是不带XX_add_qip_file的文件。),然后”Run”,就可以,看看你的bdf文件中是不是所有的管脚都分配地址了,如果有没有分配地址的,检查一下TCL脚本文件。