Author Topic: First FPGA board layout - JTAG programming  (Read 2543 times)

0 Members and 1 Guest are viewing this topic.

Offline pigtwoTopic starter

  • Regular Contributor
  • *
  • Posts: 133
First FPGA board layout - JTAG programming
« on: November 29, 2016, 05:35:16 pm »
Hello all,

I'm working on a small project that will include a Spartan-6(XC6SLX9) FPGA and I'm creating the schematic but I'm a little confused about how programming over JTAG works. 

I'm trying to keep things as simple as possible to avoid making mistakes so I'm following the Spartan-6 configuration guide and they use a XCF04SVOG20C to store the configuration.  Below(attached) is an example schematic from the Spartan-6 configuration guide for reference.  In this example they connect TCK and TMS to the PROM and the FPGA.  Then the TDI goes in to the FPGA then to the PROM then back to TDO.  This all makes sense for the most part.  What I don't understand how the programming will work.  In this configuration when I go to program through the JTAG interface will it program the FPGA and the PROM or will the programmer know there is two devices in the chain and act accordingly? 

I've worked with dev boards and they usually include a jumper for programming the FPGA or the PROM which is making me think that I'm missing something here. 

I am planning on using this programmer:
http://www.digikey.com/product-search/en?mpart=410-249&v=1286

But I just chose it arbitrarily so it might be wrong.

Thank you! 
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: First FPGA board layout - JTAG programming
« Reply #1 on: November 29, 2016, 05:57:07 pm »
I have designed numerous boards with the spartan 6 and that exact programmer.  Here's how I usually do it:

1) M0: Vcc, M1: Gnd - this sets it to SPI master mode so it will load its configuration on boot from a SPI flash
2) Connect a SPI flash (I usually use MX25L6445) to the flash pins, eg: R11, P10, T10, T3 on the FTG256 package
3) Connect the JTAG header to the JTAG pins on the FPGA, normal TDI to TDI, TDO to TDO, etc.

In ISE, you'll compile the bit file.  You can then use Impact to load it directly on the FPGA.  If you want to program the flash, you need to convert the bit to mcs.  You can probably do this within ISE, but I just do it on the command line in Linux:
promgen -spi -p mcs -o "project.mcs" -s 8192 -u 0 "project.bit" -w

4) In Impact, when it scans the JTAG it'll see the FPGA, tell you it supports an attached flash device, and ask if you want to set it up, select yes.  It will ask you for the flash type/model, if you used the MX25L6445 you can select "S25FL064P" from the drop down menu.  Then right click on the flash on the diagram and select program

Impact will load a temporary image on the FPGA that allows it to pass data through the FPGA to program the flash directly.  When it's done, it will cycle the FPGA which will then load its configuration from the flash like a normal boot.
 

Offline pigtwoTopic starter

  • Regular Contributor
  • *
  • Posts: 133
Re: First FPGA board layout - JTAG programming
« Reply #2 on: November 29, 2016, 08:54:26 pm »
Thank you for the info.  That seems pretty simple.  I searched for MX25L6445 but I wasn't able to find the exact part but I think I had found the series.  Is there anything special about this flash part that lets it work with the FPGA or is it just a generic flash and the FPGA handles the rest? 

I ask because I was thinking of using this chip instead:
http://www.digikey.com/product-detail/en/micron-technology-inc/M25P80-VMN6TP-TR/M25P80-VMN6TP-CT-ND/1889061

only because I don't have a 1.8v supply on my board and this one runs off of 3.3v. 

Also I'm glad to hear that programmer is good, I was a little worried because I saw $200+ programmers. 

Thank you!
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: First FPGA board layout - JTAG programming
« Reply #3 on: November 30, 2016, 12:59:33 am »
Thank you for the info.  That seems pretty simple.  I searched for MX25L6445 but I wasn't able to find the exact part but I think I had found the series.
It comes in several packages.  The SOIC-8 is MX25L6445EM2I-10G:
http://www.digikey.com/product-detail/en/macronix/MX25L6445EM2I-10G/1092-1065-ND/2744748

Is there anything special about this flash part that lets it work with the FPGA or is it just a generic flash and the FPGA handles the rest?

I ask because I was thinking of using this chip instead:
http://www.digikey.com/product-detail/en/micron-technology-inc/M25P80-VMN6TP-TR/M25P80-VMN6TP-CT-ND/1889061

only because I don't have a 1.8v supply on my board and this one runs off of 3.3v.
The MX25L6445 is a 3.3v part as well.  Either way, there's nothing super special about it, but there are subtle differences between different devices with regards to organization, bursting, etc.  The one you linked would probably work, but you may need to pick a different option from the drop down list in Impact in order for it to talk to it.
 
The following users thanked this post: pigtwo

Offline pigtwoTopic starter

  • Regular Contributor
  • *
  • Posts: 133
Re: First FPGA board layout - JTAG programming
« Reply #4 on: November 30, 2016, 03:26:25 am »
Oh I must have been looking at a different part.  That one is perfect then.  I'm going to go with the one you recommend just for peace of mind. 

Thanks again! I was worried that I would choose the wrong part and have to get the boards remade. 
 

Online Neilm

  • Super Contributor
  • ***
  • Posts: 1546
  • Country: gb
Re: First FPGA board layout - JTAG programming
« Reply #5 on: November 30, 2016, 07:16:04 pm »
Xilinx have a pretty good datasheet on this subject. Just look for UG380. It contains all the different ways to programme the chip, both using Xilinx memory chips (works but is expensive), spi et al.
Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe. - Albert Einstein
Tesla referral code https://ts.la/neil53539
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf