Author Topic: Programming external FPGA's using DE1's on-board programmer  (Read 5804 times)

0 Members and 1 Guest are viewing this topic.

Offline gregallenwarnerTopic starter

  • Regular Contributor
  • *
  • Posts: 144
  • Country: us
This may be a beginner question, but I'm still a beginner with FPGA's so forgive me.  ;D

I've been experimenting with an Altera DE1, and I'm wondering if it's possible to take my designs and program them into an external FPGA and storage memory using the built-in USB Blaster on the DE1? Basically, what I'm wanting to do is go ahead and design up a finished product for my FPGA designs and buy and embed a dedicated FPGA for the final board, then use my DE1 as a programmer to program that finished board, so I don't have to purchase a separate JTAG programmer. Is that possible?

I guess the closest analogy to what I'm trying to achieve is the "Arduino as ISP" function for flashing external ATMega's that you may have on an external board. You can use your Arduino dev board itself as a programmer to flash the external chip and get it bootloaded. Is it possible to do the same sort of thing with FPGA's and the DE1? (Obviously, I know that I'll have to embed some configuration memory along with my FPGA in my embedded design. I just wanna avoid buying another costly programmer if I can use the DE1 in this fashion.)

Thanks.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Programming external FPGA's using DE1's on-board programmer
« Reply #1 on: May 13, 2014, 01:33:19 am »
You are going to also need an EPCQ (Quad Serial Configuration) device like the EPCQ256. There are alternatives not from Altera as well for the configuration device.

What FPGA are you targeting? that way we can check the datasheet for what is needed.

As far as JTAG you can configure it also with ISP as I recall, let me dig some more info, but nevertheless if you are targeting an Altera FPGA you need something to flash it at boot time.

But knowing the device in particular will help (full part number preferably)

Edit: EPCQ  doc http://www.altera.com/literature/hb/cfg/cfg_cf52012.pdf

« Last Edit: May 13, 2014, 02:12:22 am by miguelvp »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Programming external FPGA's using DE1's on-board programmer
« Reply #2 on: May 13, 2014, 02:06:07 am »
Other way to do it is like fpga4fun does it via a serial interface:
http://www.fpga4fun.com/FPGAinfo7.html

They have a shop where they sell fpgas and the serial adaptor, but I have never shopped from them so I have no idea how it all works. But here are the links that I think are relevant:

http://www.fpga4fun.com/FPGAinfo7.html (look at "synchronous serial" interface)


http://www.knjn.com/TXDI.html (you'll need this to program it from a PC)

http://www.knjn.com/docs/KNJN%20RS232%20FPGA%20boards.pdf (look at page 17 for the rs232 configuration via pc or even an mcu. Or page 3 for their own rs232 direct configuration to the boards that have "Boot-PROM" as they call them).

http://www.knjn.com/ShopBoards_RS232_Parallel.html (for their store for those boards)

Another alternative (haven't tried it neither) is:

http://www.spansion.com/Support/Application%20Notes/Configuring_Altera_FPGAs_via_SPI_Flash_AN.pdf

I only programmed my boards with the built in EPCQ so I haven't tried any of these methods.

« Last Edit: May 13, 2014, 02:11:54 am by miguelvp »
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Programming external FPGA's using DE1's on-board programmer
« Reply #3 on: May 13, 2014, 02:19:16 am »
Also you can implement JTAG on your DE1

http://www.fpga4fun.com/JTAG.html

On the last page you'll find:

Quote
Do more with JTAG

JTAG can hijack the pins. The JTAG instruction for that is EXTEST ("external test").
JTAG can perform FPGA configuration. See for example this file.
JTAG can be used as debug port - see for example SignalTap and ChipScope.

but unfortunately is for a Xilinx FPGA, but no reason you couldn't use it for an Altera one.
 

Offline gregallenwarnerTopic starter

  • Regular Contributor
  • *
  • Posts: 144
  • Country: us
Re: Programming external FPGA's using DE1's on-board programmer
« Reply #4 on: May 13, 2014, 03:18:54 pm »
Thanks for the tips.

The DE1 uses a Cyclone II, so I figured I'd just stick with that for the time being.

I'll spend some time researching the links you gave me. Thanks again.
 

Offline marshallh

  • Supporter
  • ****
  • Posts: 1462
  • Country: us
    • retroactive
Re: Programming external FPGA's using DE1's on-board programmer
« Reply #5 on: May 14, 2014, 12:36:42 am »
No, you can't use the DE1 easily, without modifying the pcb. Instead buy a clone USB Blaster off ebay for $30.

Cyclone II series use ST nor spi flash. Depending on the bitstream size you may need a EPCS4 or EPCS16.
The ST equivelants are M25P40, M25P80, M25p16. Do not use M25VP**. Anyway these parts are die identical to the rebranded parts and much cheaper. Do not use EPCQ part for cyclone II.
Verilog tips
BGA soldering intro

11:37 <@ktemkin> c4757p: marshall has transcended communications media
11:37 <@ktemkin> He speaks protocols directly.
 

Offline gregallenwarnerTopic starter

  • Regular Contributor
  • *
  • Posts: 144
  • Country: us
Re: Programming external FPGA's using DE1's on-board programmer
« Reply #6 on: May 14, 2014, 02:12:30 pm »
Thanks, marshallh, for the tips.

I was a little hesitant of buying one of the cheap USB Blaster clones off Ebay. How often do people get duds? Is it generally a safe bet to go this route?
 

Offline jahonen

  • Super Contributor
  • ***
  • Posts: 1055
  • Country: fi
Re: Programming external FPGA's using DE1's on-board programmer
« Reply #7 on: May 14, 2014, 08:07:36 pm »
Another (a little bit more expensive, but still cheaper) option is Terasic USB blaster, which is, AFAIK quite similar than the Altera one.

http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=&No=46

Regards,
Janne
 

Offline gregallenwarnerTopic starter

  • Regular Contributor
  • *
  • Posts: 144
  • Country: us
Re: Programming external FPGA's using DE1's on-board programmer
« Reply #8 on: May 14, 2014, 11:59:02 pm »
I've seen the Terasic one, and, though I'd be willing to pay the cost of that one in a pinch, I was just hoping for a reliable, dirt cheap option.

But, for $300 a pop, it seems Altera thinks mighty highly of their USB Blasters, especially considering the product can be cloned and sold on Ebay for <$20. I wonder why such a steep markup? Shouldn't they want their technology to be more affordable, in order to get more people to get onboard with their products?
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Programming external FPGA's using DE1's on-board programmer
« Reply #9 on: May 15, 2014, 12:27:07 am »
I trust these guys:

http://www.ebay.com/itm/USB-Blaster-V2-Download-Cable-ALTERA-FPGA-CPLD-EPCS16-EPC1-4-Programmer-Debugger-/251150460146

Their non ebay site:
http://www.wvshare.com/product/USB-Blaster-V2.htm

But ordering directly via that site is a bit complicated (as in not really automated)

Only way cheaper is to do the same thing as the fpga4fun knjn.com did by rolling their own serial configuration, although their Cyclone II board (pluto-3) is a bit pricey for $79 but comes with the 4Mbit flash.

But then you will have to design your own board.

Also consider these:
http://www.wvshare.com/product/CoreEP2C5.htm
http://www.wvshare.com/product/CoreEP2C8.htm

Combined with their blaster V2 compatible programmer.
If only to know what is the minimum you need for a Cyclone II board.
Edit: because those cyclones II are not the biggest compared to your 2C20 (even the knjn is only a 2C5)




« Last Edit: May 15, 2014, 12:54:29 am by miguelvp »
 

Offline gregallenwarnerTopic starter

  • Regular Contributor
  • *
  • Posts: 144
  • Country: us
Re: Programming external FPGA's using DE1's on-board programmer
« Reply #10 on: May 15, 2014, 12:47:30 am »
Thanks, miguelvp, since you trust them, I went on ahead and ordered their USB Blaster from them. I'll take some time now and study up on how to properly design a board with an FPGA and external configuration memory before I start buying chips.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Programming external FPGA's using DE1's on-board programmer
« Reply #11 on: May 15, 2014, 01:20:40 am »
I ordered directly from their store on May 1st and got my stuff on May 10th, and that included Chinese Labor day which is 3 days long.

https://www.eevblog.com/forum/microcontrollers/xc3s500e-dev-board/msg441844/#msg441844

Sticking with Cyclone II might be too pricey since Cyclone V seems to be the most affordable at the moment.

Just stumbled into this kit:
http://parts.arrow.com/item/detail/arrow-development-tools/bemicrocv

http://download.siliconexpert.com/pdfs/2014/2/11/1/54/10/366/arrowd_/manual/hardware_reference_guide_for_bemicro_cv_1.1.pdf

The good thing is that it has a separate JTAG configuration header on top of the embedded one so you can test the blaster V2 with it. It's also as spartan as it can get, so you might get some good design ideas from it. And it has a similar LE count as yours (well 5K more than yours)

If I didn't have this already I would get it in a second.
https://www.eevblog.com/forum/microcontrollers/terasic-cyclone-v-gx-starter-kit-(c5g)-review
« Last Edit: May 15, 2014, 01:22:53 am by miguelvp »
 

Offline Codemonkey

  • Regular Contributor
  • *
  • Posts: 235
  • Country: gb
Re: Programming external FPGA's using DE1's on-board programmer
« Reply #12 on: May 15, 2014, 06:43:42 am »
I bought one of these:

http://hobbycomponents.com/index.php/dvbd/dvbd-altera/altera-fpga-cpld-usb-programmer-usb-blaster-compatible.html

I also know a couple of other people that did, none had any problems.
 

Offline Scrts

  • Frequent Contributor
  • **
  • Posts: 800
  • Country: lt
Re: Programming external FPGA's using DE1's on-board programmer
« Reply #13 on: May 15, 2014, 01:40:42 pm »
I bought one of these:

http://hobbycomponents.com/index.php/dvbd/dvbd-altera/altera-fpga-cpld-usb-programmer-usb-blaster-compatible.html

I also know a couple of other people that did, none had any problems.

Agreed. This one works fine and I didn't see any differences from the original one. Even the speed is kind of the same.
 

Offline gregallenwarnerTopic starter

  • Regular Contributor
  • *
  • Posts: 144
  • Country: us
Re: Programming external FPGA's using DE1's on-board programmer
« Reply #14 on: May 15, 2014, 02:11:55 pm »
Thanks. So, is the Cyclone V going to be much different from a design standpoint than the Cyclone II? Or I guess what I'm asking, if I prototype a design on my DE1 (cyclone II), will my design translate to a Cyclone V easily, or at least with minimal tweaking?
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Programming external FPGA's using DE1's on-board programmer
« Reply #15 on: May 15, 2014, 02:30:30 pm »
Thanks. So, is the Cyclone V going to be much different from a design standpoint than the Cyclone II? Or I guess what I'm asking, if I prototype a design on my DE1 (cyclone II), will my design translate to a Cyclone V easily, or at least with minimal tweaking?

Quartus II has a device migration, I haven't had problems from Cyclone IV to V but have no direct experience with Cyclone II

my Cyclone IV is a DE0-Nano with around 22K LE, the other is a GX Starter kit with 77K LE.

So other than redoing the pins seems fine, not sure if the Cyclone II offers anything that the Cyclone V doesn't as far as port configuration compatibility, PLLs etc.
 

Offline olsenn

  • Frequent Contributor
  • **
  • Posts: 993
Re: Programming external FPGA's using DE1's on-board programmer
« Reply #16 on: May 15, 2014, 02:56:22 pm »
I would just get an Alterra USB Blaster programmer (clones are cheap). You can even get one that can switch between that and a Xilinx programmer
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf