EEVblog Electronics Community Forum

Electronics => FPGA => Topic started by: JoeN on June 16, 2014, 12:40:18 am

Title: Does anyone know how many times an Altera MAX II CPLD can be reprogrammed?
Post by: JoeN on June 16, 2014, 12:40:18 am
I read somewhere a while back that these devices are severely limited in their reprogrammability.  I am doing a hobby project now with a EPM240 and I have reprogrammed it probably 30-40 times.  I know there are ways of simulating your design prior to programming, but I am not particularly sophisticated with Quartus.  Additionally, my design is a state machine that does a lookup on an EEPROM and based on the character looked up then does two more lookups on the EEPROM and then sets outputs.  Because this design is sequential in nature and relies on that EEPROM for data, I think simulation would be difficult, so I am just incrementally making changes in my design, programming the IC, and checking results against what I expected.  Since all it does is run an LED display, I am not too worried if there is a one-clock glitch or two in there, no one will ever see it.  Things are going nicely, but I am worried about frying the chip.  How many times is an EPM240 reprogrammable and will it fail silently or with an actual error in Quartus?  I tried to research this on Google but there is too much noise and everything I have found just states that MAX IIs use flash and are reprogrammable, but without saying how many times.  Does anyone have any information to share?  Thank you.
Title: Re: Does anyone know how many times an Altera MAX II CPLD can be reprogrammed?
Post by: free_electron on June 16, 2014, 01:35:40 am
a few hundred times at least.
Title: Re: Does anyone know how many times an Altera MAX II CPLD can be reprogrammed?
Post by: amyk on June 16, 2014, 01:38:29 am
(http://i59.tinypic.com/4t0wuh.png) (http://www.altera.com/literature/hb/max2/max2_mii51005.pdf)
Title: Re: Does anyone know how many times an Altera MAX II CPLD can be reprogrammed?
Post by: JoeN on June 16, 2014, 02:02:19 am
(http://i59.tinypic.com/4t0wuh.png) (http://www.altera.com/literature/hb/max2/max2_mii51005.pdf)

Thank you.  Any idea why Altera would specify a max and not a minimum or typical?  I don't think I have ever seen a value specified that way before.  That seems as if to say "we don't guarantee anything about the device being reprogrammable any particular number of times.  Good luck."  Has anyone had good or bad luck reprogramming them or is what I am doing so out of the ordinary nobody knows?
Title: Re: Does anyone know how many times an Altera MAX II CPLD can be reprogrammed?
Post by: JoeN on June 16, 2014, 02:08:45 am
Interesting, I found a 2005 datasheet with it specified as a minimum:

http://resalpes.grenoble.cnrs.fr/tutorat/vhdl_altera/altera/max2_mii5v1.pdf (http://resalpes.grenoble.cnrs.fr/tutorat/vhdl_altera/altera/max2_mii5v1.pdf)

(https://www.eevblog.com/forum/microcontrollers/does-anyone-know-how-many-times-an-altera-max-ii-cpld-can-be-reprogrammed/?action=dlattach;attach=97847)

I will consider this a minimum.  I think they mean to say "you should consider 100 writes as a maximum though a few more may work out for you if you are lucky."

I think I will have my bugs worked out before I hit 100 and I can always desolder this chip and drop another one on my board if I end up frying the current one.  I got these cheap from a Chinese seller.  They are working well, though.
Title: Re: Does anyone know how many times an Altera MAX II CPLD can be reprogrammed?
Post by: AndyC_772 on June 16, 2014, 06:35:35 am
I have never managed to 'fry' a MAX II during development, and I've used them a lot.

I suspect that if you did manage to cook the flash, it would fail with an error when you program and verify the device. These parts are actually SRAM based with a small flash block off to one side, and they configure themselves at power-on - so provided the flash writes and reads back OK, the device should work.
Title: Re: Does anyone know how many times an Altera MAX II CPLD can be reprogrammed?
Post by: JoeN on June 16, 2014, 06:42:50 am
I have never managed to 'fry' a MAX II during development, and I've used them a lot.

I suspect that if you did manage to cook the flash, it would fail with an error when you program and verify the device. These parts are actually SRAM based with a small flash block off to one side, and they configure themselves at power-on - so provided the flash writes and reads back OK, the device should work.

That is what I was thinking, but it puts the mind at ease knowing that it isn't going to just flake out and make me think that it is my Verilog doing it (the usual case).  I can live with a dead part as long as I know it is dead.  Thank you.
Title: Re: Does anyone know how many times an Altera MAX II CPLD can be reprogrammed?
Post by: AndyC_772 on June 16, 2014, 06:45:14 am
If you're worried, develop your code to the point where it works, then replace the chip anyway.