Author Topic: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer  (Read 6179 times)

0 Members and 1 Guest are viewing this topic.

Offline soFPGTopic starter

  • Frequent Contributor
  • **
  • Posts: 283
  • Country: de
Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« on: September 21, 2017, 09:06:29 am »
Hello forum,

I am searching for a cheap programmer for the Lattice iCE40LP-Series which can program the internal SRAM via SPI - because I don't want to spend hundreds of dollars for the Diamond Programmer for a 2$ FPGA :(
Are there some cheap china clones out there which work in combination with the iCEcube2 Software?

Best regards
 

Online Marco

  • Super Contributor
  • ***
  • Posts: 6721
  • Country: nl
Re: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« Reply #1 on: September 21, 2017, 10:52:13 am »
Wouldn't the same methods as with the upduino work? (Ice40 ultraplus) He shows how to do it with a raspberri pi and a ft232h.
 

Offline soFPGTopic starter

  • Frequent Contributor
  • **
  • Posts: 283
  • Country: de
Re: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« Reply #2 on: September 21, 2017, 10:56:05 am »
Thanks for your reply Marco,


doing something with a raspberry pi and a FT232h sounds rather complicated - can you link me to the post with more information?

I made a quick search on ebay for "lattice spi programmer" and I found this: http://www.ebay.com/itm/USB-Download-Cable-Jtag-SPI-Programmer-for-LATTICE-FPGA-CPLD-1000-2000-4000-/301286854526?epid=1231746445&hash=item4626188f7e:g:qQQAAMXQlgtStybV

Anyone here who knows if these devices work? It would be way more convenient to have a single device which does the job than to fiddle around with raspberry.
 

Online Marco

  • Super Contributor
  • ***
  • Posts: 6721
  • Country: nl
Re: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« Reply #3 on: September 21, 2017, 03:24:40 pm »
Post with some info on the upduino is just a little lower on the forum, instructions how to use a FT232H are on the upduino page.

I think the Lattice programmer uses a FT2232H with an EEPROM for configuration, it's been discussed multiple times on the forum.
 
The following users thanked this post: soFPG

Offline soFPGTopic starter

  • Frequent Contributor
  • **
  • Posts: 283
  • Country: de
Re: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« Reply #4 on: September 21, 2017, 07:11:54 pm »
I still dream about a single-device solution - I don't really want to mess around with a pi and FTDI chips :(

Would be really helpfull if someone has experiences with the ebay-programmer I posted earlier.
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: gb
Re: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« Reply #5 on: September 21, 2017, 09:34:46 pm »
I'm not sure why one would need a raspberry pi... an FT2232 is supported by lattice diamond (well, ispVM) out of the box.  It does require an external EEPROM but IIRC that is configured using FTDI's app (which enables the JTAG hardware).

Since I started with programmable logic about 15 years ago, download cables have been a source of frustration.  They were either very expensive, or required a parallel port.  About 5-6 years ago both Lattice and Xilinx added support for generic FT2232 dongles. Altera still had the USB blaster, but you can clone that with a 64 MC CPLD and a FT245 - even then its about $10 from fleabay.

Before the FT2232 I ended up writing an SVF player and bitbanged a FT232 for something that supported all three vendors.  It was slow, and annoying but it worked.
 
The following users thanked this post: soFPG

Offline soFPGTopic starter

  • Frequent Contributor
  • **
  • Posts: 283
  • Country: de
Re: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« Reply #6 on: September 22, 2017, 07:14:04 am »
Sorry to ask you that but where can I find such a FT2232 dongle?

Quote
Since I started with programmable logic about 15 years ago, download cables have been a source of frustration.

But maybe this device contains a FT2232 with EEPROM? I don't know. I don't want to mess around with the programming hardware because I would rather invest my time in building the board, I just want something that works without a lot of workarounds.

If I read correctly, the FT2232 is a USB/UART converter (http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT2232D.pdf) - I have a USB/UART converter with a CH340 chip here, would this one also work?

Quote
an FT2232 is supported by lattice diamond

There is a special IDE for the iCE40-Series from Lattice: iCEcube 2
« Last Edit: September 22, 2017, 07:20:08 am by soFPG »
 

Offline soFPGTopic starter

  • Frequent Contributor
  • **
  • Posts: 283
  • Country: de
Re: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« Reply #7 on: September 22, 2017, 08:01:24 am »
Thanks a lot for your answer,

And write its EEPROM to make to mimic a Diamond Programmer, see attached file, rename to .xml.

I am feeling so dumb asking this: but how can I do that?

And how do I know which pins of the board with the FT2232H on it I have to use to program the FPGA?
« Last Edit: September 22, 2017, 08:03:02 am by soFPG »
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13747
  • Country: gb
    • Mike's Electric Stuff
Re: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« Reply #8 on: September 22, 2017, 08:17:48 am »
Thanks a lot for your answer,

And write its EEPROM to make to mimic a Diamond Programmer, see attached file, rename to .xml.

I am feeling so dumb asking this: but how can I do that?

FTDI's FT-PROG utility
http://www.ftdichip.com/Support/Utilities.htm#FT_PROG
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 
The following users thanked this post: soFPG

Offline ale500

  • Frequent Contributor
  • **
  • Posts: 415
Re: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« Reply #9 on: September 22, 2017, 11:05:02 am »
That module costs a bit less via mouser.de.

http://www.mouser.de/ProductDetail/FTDI/FT2232H-MINI-MODULE/?qs=sGAEpiMZZMvOu2nvEqRMlAhGRrWaSCdm

http://www.mouser.de/ProductDetail/FTDI/FT2232H-56Q-MINI-MDL/?qs=sGAEpiMZZMsNqjna29dfSqaZ5MDQ5%252bjEyn%252bi%2f9ep87Y%3d

Well, there are two of them.

If you buy via aliexpress:

https://de.aliexpress.com/item/FT2232HL-new-development-board-FT2232H-MINI-Development-Board/32738553869.html?ws_ab_test=searchweb0_0,searchweb201602_1_10152_10065_10151_10068_10344_10342_10343_10340_10341_10193_10194_10304_10307_10137_10060_10302_10155_10154_10056_10055_10054_10059_10532_100031_10099_10338_10339_10103_10102_440_10052_10053_10107_10050_10142_10051_10320_10321_10322_10326_10084_10083_10080_10082_10081_10177_10110_10111_10112_10113_10114_143_10180_10312_10313_10314_10184_10319_10078_10079_10073_10186,searchweb201603_30,ppcSwitch_5&btsid=adda0b0d-a05f-4d9d-b1bc-73f874ba4e88&algo_expid=96d76880-2072-48a6-b2cb-b62cf4c11704-0&algo_pvid=96d76880-2072-48a6-b2cb-b62cf4c11704

Like 14 €.

No idea how reliable it may be but so far I haven't had issues with what I got from aliexpress, but the delivery time you get by mouser is unbeatable: Pay on Monday and on Wed. is in south-west Germany :)

Ok, I just bought one of the aliexpress modules for 13,10 €. Delivery time doesn't bother me, I have to get the QFN48 package soldered first, something I already tried twice. I think my hot air soldering iron is garbage. Maybe the nozzle a'm using is too thin.

I'll tell you in so three weeks when (if) arrives :).

Another option (could be) a MachXO2 breakout board, it seems to be supported as it is, at least is that much written in this document: ProgrammingCableUsersGuide.pdf (UG48 Ver 25.0).
I wanted to try that but I couldn't solder this package :(, even at 305 °C if I believe what the display says (AOYUE 852).
« Last Edit: September 22, 2017, 11:15:15 am by ale500 »
 
The following users thanked this post: soFPG

Offline soFPGTopic starter

  • Frequent Contributor
  • **
  • Posts: 283
  • Country: de
Re: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« Reply #10 on: September 22, 2017, 11:50:06 am »
Thanks a lot for your answer ale500,

Quote
Ok, I just bought one of the aliexpress modules for 13,10 €. Delivery time doesn't bother me, I have to get the QFN48 package soldered first, something I already tried twice.

Sounds very similiar to what I have planned - I also want to use QFN48 FPGA, creating the schematic, routing the PCB and getting the actual PCBs back from the manufacturer will take some time so I don't really care about delivery times from aliexpress.

Do you know which pins of the FT2232-Module I have to use to get the FPGA programmed, is there a pinout description for it?
 

Offline ale500

  • Frequent Contributor
  • **
  • Posts: 415
Re: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« Reply #11 on: September 22, 2017, 02:50:24 pm »
I'll try this:

http://www.latticesemi.com/view_document?document_id=51987

iCE40 UltraPlus Breakout Board User Guide, Schematic on page 25 shows that the ADBUS is being used. I'll try that, after I configured my device with the given file and ftdi's utility also mentioned here.

I bought QFN48-breakout boards from aliexpress too, they are already here.

I'm looking for some low power (lower than the MachXO2) FPGAs, let's see if it works :)
« Last Edit: September 22, 2017, 02:54:11 pm by ale500 »
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: gb
Re: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« Reply #12 on: September 23, 2017, 04:21:20 pm »
Sorry to ask you that but where can I find such a FT2232 dongle?

But maybe this device contains a FT2232 with EEPROM? I don't know. I don't want to mess around with the programming hardware because I would rather invest my time in building the board, I just want something that works without a lot of workarounds.

You don't need to "manually" program the EEPROM, the memory is just there to store VID/PID and configuration parameters for the chip itself, to set its modes... ie: UART, FIFO, SPI, I2C, JTAG emulators etc..
FTDI's FTDIprog utility provides a nice GUI to set it up.

If I read correctly, the FT2232 is a USB/UART converter (http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT2232D.pdf) - I have a USB/UART converter with a CH340 chip here, would this one also work?

The FT2232 is  dual UART/FIFO USB bridge, where each channel can be UART, FIFO, and one of them has hardware support for SPI and JTAG.  With standard USB-UART bridges, the only way to do JTAG would be to bit bang (possible with the FT232) but it is much slower and of course you have to write the code for the API. I'm unsure if the CH340 has bit banging capability.


Quote
There is a special IDE for the iCE40-Series from Lattice: iCEcube 2

I've been on about JTAG but the FT2232C also does SPI, and is a common choice on a number of FPGA boards (for either JTAG, SPI for flash, or both).  I have also seen it on a few 'iCE' dev boards so I can only assume it is supported by iCEcube 2.  Example:

http://www.latticesemi.com/icestick

As to the availability of the FT2232C, I haven't really kept up on FTDI's range, it could be no longer supported for all I know - I just remember knocking up a cheap dev board for it and have been using it to config Lattice and Xilinx devices ever since.
 
The following users thanked this post: soFPG

Offline soFPGTopic starter

  • Frequent Contributor
  • **
  • Posts: 283
  • Country: de
Re: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« Reply #13 on: September 24, 2017, 07:40:50 am »
Thanks a lot for your help guys,

I will buy one of those FT2232H boards from aliexpress with EPROM, I hope they will work. But I still don't know which pins of the chip I have to connect to the SPI-Programming pins of my iCE40-FPGA?

https://www.aliexpress.com/item-img/FT2232HL-new-development-board-FT2232H-MINI-Development-Board/32738553869.html?spm=a2g0x.10010108.1000017.2.599a1d78OBnEc#
 

Offline ale500

  • Frequent Contributor
  • **
  • Posts: 415
Re: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« Reply #14 on: October 10, 2017, 11:36:08 am »
As I mentioned before, I bought one of these FT2232H boards from AliExpress. I just arrived !. In its current form, it is detected as a double UART.
The FTProg utility recognizes the chip and applying the template I get:Product Desc: "Lattice HW-USBN-2B Ch".

Lattice diamond programmer recognizes it as a HW-USBN-2B.
« Last Edit: October 10, 2017, 12:01:24 pm by ale500 »
 

Offline soFPGTopic starter

  • Frequent Contributor
  • **
  • Posts: 283
  • Country: de
Re: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« Reply #15 on: April 28, 2018, 01:46:42 pm »
I am finally at a point where I would like to program my own little FPGA board with a FT232H. Unfortunately windows claims the FT232H as a COM-Device as soon as I plug it in. FT-Prog tells me, that it has detected an FTDI device but is unable to detect its type.

How can I fix that?

Edit: Somehow it worked on another PC (notebook with windows 10 as well). I just changed the type from FT2232H to FT232H in the xml-Template file. Is that correct?
« Last Edit: April 28, 2018, 06:34:51 pm by soFPG »
 

Offline ale500

  • Frequent Contributor
  • **
  • Posts: 415
Re: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« Reply #16 on: April 29, 2018, 07:18:04 am »
I assume that you have some drivers that are being loaded and confuse ftprog.
Do not change the type of chip just use the template to reprogram the ft2232h, you have a FT2232H don't you ?

Can you post a  picture of the window of ftprog showing what was detected for your FT2232H board ? and a picture of it too..
« Last Edit: April 29, 2018, 07:21:21 am by ale500 »
 

Offline soFPGTopic starter

  • Frequent Contributor
  • **
  • Posts: 283
  • Country: de
Re: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« Reply #17 on: April 29, 2018, 07:32:11 am »
Quote
you have a FT2232H don't you ?

with a FT232H
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: gb
Re: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« Reply #18 on: April 29, 2018, 03:30:52 pm »
I don't have any experience with the ft232h - although I see it has the MPSSE engine for JTAG - but with the FT2232C I vaguely remember having to use FTprog to configure the JTAG or SPI port and to tell it to use the D2xx driver rather than the VCP used as default.  I am assuming its the same deal for configuring the connected EEPROM on the newer FT232H.
« Last Edit: April 29, 2018, 03:33:07 pm by Buriedcode »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4784
  • Country: pm
  • It's important to try new things..
Re: Searching for a cheap FPGA Lattice iCE40LP SPI SRAM Programmer
« Reply #19 on: April 29, 2018, 05:41:59 pm »
The OP has got the FT232H board which works with Diamond Programmer (ice40) and Reveal Analyzer (JTAG).
The FT232H is compatible with FTxxxx (only one channel, however). FTDI developed the FT232H to offer a cheaper and smaller package version of the expensive FTxxxx.
No need to mess with FTprog (you must have an eeprom attached to the FT to reprogram some settings, btw).
The OP is elaborating it with Mach chips (JTAG) at this time.
« Last Edit: April 29, 2018, 05:45:07 pm by imo »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf