The scan-chain is specified in the .batch file in your board's platform
directory. You need a BSDL file for each device in the chain. The BSDL
file can either be found in the ISE installation or if it's a non-Xilinx
part you can create a BSDL from within the iMPACT GUI. Once you have
BSDL files for all the devices you're NOT programming, and a .bit file
for the device you ARE programing, you specify them all in the .batch
file for your board:
$ cat libfpgalink/hdl/sync/platforms/nexys2-1200/platform.batch
setMode -bs
setCable -port xsvf -file top_level.xsvf
addDevice -p 1 -file top_level.bit
addDevice -p 2 -file ${XILINX}/xcf/data/xcf04s.bsd
program -p 1
quit
This says that the Digilent Nexys2 has an FPGA and a JTAG PROM on the
chain.*
In libfpgalink/hdl/common/
top.mk, each supported board defines four
macros, VENDOR, FPGA, MAPFLAGS and PARFLAGS. Generally when you start an
ISE project, you specify the FPGA family & part, and when you build your
project, ISE gives appropriate options to the programs implementing the
various stages in the process (synthesis, map, place & route, .bit
generation etc). For some reason, ISE gives different options to map and
par for spartan-3 and spartan-6 devices. I have just codified in the
Makefile what ISE does for different FPGA families. In other words, the
.bit file you get from the make build should be identical to the one you
get from the same code built in ISE (assuming default settings).
Chris
* Note that the only piece of information in the BSDL files which is
relevant is the JTAG instruction length, given by Instruction_Length. So
as long as you know that, you can just copy an existing generated BSDL
file (e.g
https://github.com/makestuff/vhdl/blob/master/test000/atmega162.bsd) and
change the value for Instruction_Length. In theory all that's needed by
the programming algorithm is the number of bits to shift each JTAG
instruction by. If there are only two devices in the chain, this can
always be determined by querying the chain itself. In theory the
programming algorithm only needs to be given offset information when
there are three or more devices in the chain AND the one you want to
program is in the middle. At some point I will add code to infer as much
information as possible about the chain, which will make this step
easier for users. I believe this will be necessary when I start
supporting multi-device boards based on Altera FPGAs anyway, because the
Altera SVF-generator appears to assume there will only ever be one
device in the chain.
-------------------------------------------------------------------------------------
On 19/05/12 12:11, Marco wrote:
> About a month ago i discussed about the object of the post. I think
> that it maybe useful for many others users, and so i decided to re-
> open the theme in a dedicated topic.
> My question was: Is there a way to pass from BIT (edit by ISE) to XSVF
> format without using iMPACT?
> Chris anwered:
>
> On 27 Apr, 12:25, Chris McClelland<
fpgalink...@m3.ath.cx> wrote:
>> I just run "make", which goes all the way from source VHDL to XSVF. It
>> will work out of the box on Linux, but on Windows you need to install
>> the MakeStuff build infrastructure[1].
>>
>> You can continue using ISE for editing if you like, but I personally
>> prefer Emacs. I have also heard good things about Sigasi[2].
>>
>> There is a rule[3] to go from .bit to .xsvf, which just needs the XILINX
>> environment variable to be set.
>>
>> On my Linux desktop it's set to /opt/Xilinx/13.1/ISE_DS/ISE and on my
>> Windows laptop it's set to C:\Xilinx\11.1\ISE.
>>
>> The XSVF generation uses Xilinx iMPACT in batch mode, which needs to be
>> told what devices are present on the JTAG chain. This is specified in
>> the vhdl/platform/*/platform.batch files, e.g [4].
>>
>> On Xilinx-supported platforms (i.e Linux& Windows), for the special