03-22-2009 08:29 AM
Hi
We are using CVI 8.5 and Testing a board populated with Xilinx Device.
I would like to program the device via CVI by some command line.
Is any one has some tips or idea?
Do i need install IMPACT Xilinx Software?
The JTAG programmer device is HW-PC4.
03-23-2009 08:26 AM
You will need to load the inpact software
i then created a xilinex batch file that would
set the correct port for the programming interface
load the device file
03-23-2009 08:34 AM
lets try to complete this reply thin time
you will need the xilinx inpact programming software to use the programmer.
i generated a batch file that would
select the device programmer
load the software
set a log file
erase the device
program the device
i then executed the xilinex tool using the command line format (for me this was performed through Test stand but you should be able to do this from CVI)
Note the inpact software will not report errors through the return code so you will need to open the log file and search for the programming success message in order to get a correct result of the programming exercise.
the following is an extract of the batch file i used
setMode -bs
setCable -port auto
loadProjectFile -file "c:\firmdata\cplds\mds_cpld.cdf"
setLog -file C:\log.txt
program -e -p 1 -v
program -e -p 2 -v
quit
hope this helps
It was a long time ago so the inpact software may have changed (also I was using the USB programming cable and not the parallell port programming cable)
Colin
03-23-2009 12:25 PM
I have done this with other target devices (Altera, Microchip, AVR), using the following steps:
1. Build a batch file, as Colin described above. It looks like the Xilinx IMPACT software has suitable command line programming software for the HW-PC4.
2. Incorporate a call to the batch flie into your CVI. I always have the path and filename in an .ini file, so that I do not need to recompile and redistribute every time there is a change (we have one CVI license to support multiple targets, so we build distribution kits for everythiing). The code looks like:
//Filename initialization:
DebugInt = Ini_GetStringCopy (g_myInifile,"ProgFiles","Prog",(&ProgFile));
//Programming Step
LaunchExecutableEx (ProgFile, LE_SHOWNORMAL, &progHandle); while (!(ExecutableHasTerminated (progHandle))) { ProcessSystemEvents (); }RetireExecutableHandle (progHandle);
with the following lines in the .ini file:
[ProgFiles]
Prog = "Z:\\Projects\\MyFakeProject\\PC Application\\prog\\ProgBatFileName.bat"
This way, you can easily manage changing paths or programming files.
One disadvantage to this approach is that the CVI will not recognize if the programming failed for some reason. If you end the batch file with a pause statement, it will allow you to view the programmer output before the window closes.
03-24-2009 07:17 PM
Hi Friendes
I will check your advices ASAP.
TX
You are great community.
07-13-2009 09:06 AM
It works:
prepare the batch/cmd file with text editor and name it > something.cmd
place that in some folder or directory and notify the link in the script.
the command line should start like this
c:> impact -batch myfile.cmd
the content of the cmd file is:
setMode -ss
setMode -ss
addDevice -p 1 -file "c:/folder/bitfile.BIT"
setcable -port auto
assigFile -p 1 -file "c:/folder/bitfile.BIT"
setLog -file -file "c:/folder/log.txt"
Program -p 1 -bit2mcs
quit
Another good tip is to follow the console Window in the IMPACT and see the commands it does when working manualy
from the ISE application.
In the end go to the log file and see what is writen there. It should be clear indication programming successful.
On the Xilinx JTAG pin named "done" the status for successful programming is 1- High.
A.E