方法一:
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腳本文件。