Hallo,
ich habe mir eine einfache Batch erstellt, die erstmal prüft ob das
Impact schon im Pfad liegt und ggf. die Ise Setting32.bat aufruft.
Danach wird impact mit impact -batch ... programmiert.
programmiere.bat
1 | @echo off
|
2 | SET SETTINGS=c:\xilinx\13.2\ISE_DS\settings32.bat
|
3 | SET IMPACT=impact.exe
|
4 | SET PARAMETER=-batch
|
5 | SET FILE=board.scr
|
6 |
|
7 | cls
|
8 |
|
9 | for %%i in (%path%) do if exist %%i\%IMPACT% set found=%%i
|
10 |
|
11 | if not exist %found%\%IMPACT% goto XILINX
|
12 | echo "Programmiere FPGA"
|
13 | goto PROGRAMMIERE
|
14 |
|
15 | :XILINX
|
16 | echo "Lade Xilinx Settings"
|
17 | call %SETTINGS%
|
18 |
|
19 | :PROGRAMMIERE
|
20 | %IMPACT% %PARAMETER% %FILE%
|
21 |
|
22 | :ENDE
|
board.scr beinhaltet dann folgendes:
1 | setMode -bscan
|
2 | setCable -p usb21
|
3 | identify -inferir
|
4 | assignfile -p 1 -file "../file.bit"
|
5 | program -p 1 -onlyFpga
|
6 | quit
|
program -p 1 -onlyFpga
steht für den ersten FPGA in der chain. -onlyFPGA kannst Du weglassen
wenn Du es im Flash haben willst (Spartan 3 mit integr. Flash).
Wenn Du einen externen Flash hast geht das nach folgendem Schema:
1 | setMode -bscan
|
2 | setCable -p usb21
|
3 | identify
|
4 | identifyMPM
|
5 | attachflash -position 1 -bpi "INTEL28F320J3"
|
6 | assignfiletoattachedflash -position 1 -file "..(file.mcs"
|
7 | program -p 1 -bpionly -e -v -loadfpga
|
8 | quit
|
tausche ggf. für
IMPACT11
attachflash -position 1 -bpi "INTEL28F320J3D"
mit
IMPACT12
attachflash -position 1 -bpi "28F320J3D"
Für andere Flashs musst Du es wohl selbst ausprobieren.
Die Impact GUI schreibt aber irgendwo eine Art Logfile mit. ich glaube
sogar unten im Command Window. Die Kommandos sind dort zwischen den
Zeilen zu finden. Ansonsten gibt es noch von Xilinx den Impact Guide als
PDF.