EmbeddedRelated.com
Forums

Emulating JTAG with micro for programming PROM

Started by Unknown May 4, 2006
First off I am new to JTAG emulation.   I am required to program a
Xilinx configuration PROM from a microcontroller.  I realize that I can
program the PROM with a cable from the parallel port but the product
will require field upgrades.  I've been sifting through docs from
Xilinx and searching the web, and it seems like this should be easy and
straight forward to implement.  What I have learned so far in my
reading is that JTAG has a lot more capability than what I actually
need, which is just the instruction sequence for programming.   Can
anyone point me to some reference material that is geared toward
someone new to JTAG emulation?  If there were a document that spelled
out just what I need, and possibly some coding examples it would be
very much appreciated.

The relevant project details are as follows:  FPGA  is Xilinx Virtex-4
LX part # XCV4LX25, and the PROM which I need to program for FPGA
configuration is XCF08P.  Microcontoller is the 8051-based Cypress
FX2LP Hi-speed USB controller.

Scott

scott.manton@gmail.com wrote:
> First off I am new to JTAG emulation. I am required to program a > Xilinx configuration PROM from a microcontroller. I realize that I can > program the PROM with a cable from the parallel port but the product > will require field upgrades. I've been sifting through docs from > Xilinx and searching the web, and it seems like this should be easy and > straight forward to implement. What I have learned so far in my > reading is that JTAG has a lot more capability than what I actually > need, which is just the instruction sequence for programming. Can > anyone point me to some reference material that is geared toward > someone new to JTAG emulation? If there were a document that spelled > out just what I need, and possibly some coding examples it would be > very much appreciated. > > The relevant project details are as follows: FPGA is Xilinx Virtex-4 > LX part # XCV4LX25, and the PROM which I need to program for FPGA > configuration is XCF08P. Microcontoller is the 8051-based Cypress > FX2LP Hi-speed USB controller. > > Scott
Why not use a Xilinx part with internal flash and provide JTAG programmability in your firmware? If the Xilinx image does not match some found specified value in the firmware it automatically reprograms the Xilinx at init time. The Xilinx image is compiled into an array and included in the code at compile time as a .h. A few years ago a couple of us developed the JTAG algorithm in DOS using the parallel port to burn the Xilinx and then moved the code to the embedded app when we had it working later. We used an XC95xx Xilinx part as I remember it. Chris
the problem wirth XCFxxP is that xilinx has never released (and is not
going to!) the programming algorithm for the XCFxxP devices. It's still
possible to program the XCFxxP devices but the proper algorithm has to
be indirectly obtained by the observation of BSDL and SVF files. I have
done that and the succeeded, but it did take some time to get it fully
working

Antti

Chris_99 wrote:
> scott.manton@gmail.com wrote:
> > FPGA is Xilinx Virtex-4 > > LX part # XCV4LX25, and the PROM which I need to program for FPGA > > configuration is XCF08P. Microcontoller is the 8051-based Cypress > > FX2LP Hi-speed USB controller.
> Why not use a Xilinx part with internal flash and provide JTAG > programmability in your firmware?
> We used an XC95xx Xilinx part as I remember it.
XC95xx and Virtex-4 are on extreme opposite ends of the current Xilinx product line... I don't think they offer a flash version of the Virtex.
That is good to know!  Do you have any recommendation for Virtex-4
configuration, with local storage and field upgradeability of the FPGA
load?  We are more or less committed to the Cypress 8051 derivative
since we have used them before and we need hi-speed USB.  Would direct
configuration from the USB be a better solution, with local storage on
some flash?

Antti-

I need help with programming a xcf32p via a micro. Would you mind
providing more information?

Thanks

scott.manton@gmail.com wrote:
> First off I am new to JTAG emulation. I am required to program a > Xilinx configuration PROM from a microcontroller. I realize that I > can program the PROM with a cable from the parallel port but the > product will require field upgrades. I've been sifting through docs > from Xilinx and searching the web, and it seems like this should be > easy and straight forward to implement. What I have learned so far > in my reading is that JTAG has a lot more capability than what I > actually need, which is just the instruction sequence for > programming. Can anyone point me to some reference material that is > geared toward someone new to JTAG emulation? If there were a > document that spelled out just what I need, and possibly some coding > examples it would be very much appreciated. > > The relevant project details are as follows: FPGA is Xilinx Virtex-4 > LX part # XCV4LX25, and the PROM which I need to program for FPGA > configuration is XCF08P. Microcontoller is the 8051-based Cypress > FX2LP Hi-speed USB controller. >
I would be very interested in knowing why you need to have high speed USB. The XCF08P is 8 Mbit, so with raw USB transfer on a full speed USB host, you will be limited to configuration times of 1 second. It is very likely that the flash programming time of the device is the real limit to the programing time of the configurator. If this is the case, and you thus can accept full speed USB, then what you want is a micro where you can connect low cost flash and configure the it using a high speed interface. The Atmel part that would do this is the AT91SAM7S64 (and soon the AT91SAM7S321). The key functions ont his part are: USB Device to download the configuration data Synchronous Serial Port for configuration interface (DIN, CCLK) SPI port to access a serial dataflash (AT45DBxxx) The AT91SAM7S64 will, when USB is used, run at 48 MHz providing a configuration speed of 12 MHz using the built in SSC. (The SSC speed will increase to 24 Mhz on future devices) The SPI can run at 24 Mhz accessing the dataflash. Both the SPI and the SSC is supported by a double buffered DMA capable of handling 64 kB blocks. The SAM7S64 only has 16 kB of SRAM so you would probably double buffer 4 kB blocks. The PDC will reduce interrupts to about once every 2,7 ms per (SPI/SSC) channel -- Really low. Even when the configuration speed goes up to 24 Mhz, interrupts are still around 1300 per second, allowing the CPU to mostly idle. The AT45DBxxx dataflash are available in configurations between 1 Mbit to 64 Mbit. They are typically A LOT cheaper than configurators. Atmel has USB Mass Storage Device S/W running on the AT91SAM7S64 (Check www.at91.com) and I think this supports the dataflash by now. The only think you really need to do is to write the stuff to do the configuration using the SSC. Think this would be a nice appnote.
> Scott
If you really want to use a configurator then you can also use the AT17F series http://www.atmel.com/dyn/products/datasheets.asp?family_id=625 Using a large part will allow you to store several configurations. The Programming Specification is here: http://www.atmel.com/dyn/resources/prod_documents/doc3018.pdf The interface is more or less I2C (again limiting the usability of High Speed USB) -- Best Regards, Ulf Samuelsson ulf@a-t-m-e-l.com This message is intended to be my own personal view and it may or may not be shared by my employer Atmel Nordic AB
Ulf Samuelsson wrote:

> scott.manton@gmail.com wrote: > >>First off I am new to JTAG emulation. I am required to program a >>Xilinx configuration PROM from a microcontroller. I realize that I >>can program the PROM with a cable from the parallel port but the >>product will require field upgrades. I've been sifting through docs >>from Xilinx and searching the web, and it seems like this should be >>easy and straight forward to implement. What I have learned so far >>in my reading is that JTAG has a lot more capability than what I >>actually need, which is just the instruction sequence for >>programming. Can anyone point me to some reference material that is >>geared toward someone new to JTAG emulation? If there were a >>document that spelled out just what I need, and possibly some coding >>examples it would be very much appreciated. >> >>The relevant project details are as follows: FPGA is Xilinx Virtex-4 >>LX part # XCV4LX25, and the PROM which I need to program for FPGA >>configuration is XCF08P. Microcontoller is the 8051-based Cypress >>FX2LP Hi-speed USB controller. >> > > > I would be very interested in knowing why you need to have high speed USB. > The XCF08P is 8 Mbit, so with raw USB transfer on a full speed USB host, > you will be limited to configuration times of 1 second. > It is very likely that the flash programming time of the device is the real > limit to the programing time of the configurator.
Commonly, when one sees a FX2LP _and_ a FPGA, the high speed is not there for config program, but is needed for the final application data pathways. Since Xilinx insist on this 'unique' sales model : - Here is our great FLASH Config Device - No, we can't tell you how to program it then the OPs best solution is probably to ditch the XCF08, and use any of a wide range of more standard devices, like Ulf's DataFlash ( Atmel offer two types ), or Std SPI SerialFLASH. The FX2LP can easily handle the SPI-FPGA -jg
> > then the OPs best solution is probably to ditch the XCF08, and use any > of a wide range of more standard devices, like Ulf's DataFlash > ( Atmel offer two types ), or Std SPI SerialFLASH.
What so std about it?
> The FX2LP can easily handle the SPI-FPGA >
Don't know what the FX2LP cost but the AT89C51SND3 has high speed USB and will allow low cost flash storage through NAND flash.
> -jg
-- Best Regards, Ulf Samuelsson ulf@a-t-m-e-l.com This message is intended to be my own personal view and it may or may not be shared by my employer Atmel Nordic AB
Ulf Samuelsson wrote:
>>then the OPs best solution is probably to ditch the XCF08, and use any >>of a wide range of more standard devices, like Ulf's DataFlash >>( Atmel offer two types ), or Std SPI SerialFLASH. > > > What so std about it?
about what ?
> >>The FX2LP can easily handle the SPI-FPGA >> > > Don't know what the FX2LP cost but the AT89C51SND3 has high speed USB > and will allow low cost flash storage through NAND flash.
Did you mean AT85C51SND3 ? I don't think AT89C51SND3 exists ? The AT85 is ram cored, like the FX2LP. That could be a very nice device for FPGA-USB(high speed), tho probably not as fast a the FX2LP ? AT85C51SND3 claims 6MBytes ( 48 MBd ) on the PSI ? -jg