Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21324 Discussions

Non-volatile counter (MAXII)?

Altera_Forum
Honored Contributor II
1,314 Views

Hi, 

does anybody knows, if there is a solution to implement a non-volatile counter using am MAXII and the UFM? 

Application is an "operation hour counter". I havent read the appnotes and the manual in detail yet... 

Thanks for help. 

 

Volker
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
590 Views

Hi, 

 

Interesting post. I used max II for 2 years and never needed/realised this flash feature. 

 

I just looked it up. I will first instantiate the flash(choose operation as flash programmer) then will get the interface and connect that to a counter designed normally in vhdl that gets its start value from flash and updates the flash continuosly as it runs. This is just my gut-feeling, haven't tried it yet. 

Thanks for the post, you are truely a PLD Minister
0 Kudos
Altera_Forum
Honored Contributor II
590 Views

It doesn't work that way. As one point, UFM has to be erased before rewriting, as another point, it has a specification of 100 erase/reprogram cycles.  

 

It may work by writing single flash bits from '1' (erased state) to '0', having each bit representing the same amount of time. With 8k bits, this would allow a very coarse resolution only. However, by MAX II specification, only 2 write accesses per word between erases are allowed, rather than 16, as required by the suggested programming scheme. But it may work anyway, you can try. 

 

UFM works well for applications like storing serial numbers or calibration data.
0 Kudos
Altera_Forum
Honored Contributor II
590 Views

In the meantime, Altera has published an application note covering the topic of storing a non-volatile counter in MAX II. See http://www.altera.com/literature/an/an547.pdf 

 

Interestingly, the AN suggests to use part of UFM as bit programmable memory, although this operation isn't permitted according to MAX II device handbook. The respective paragraph can be still found in most recent version of Dec08, as well as the specification of mimimal 100 erase cycles for UFM.  

 

--- Quote Start ---  

You can write to any word up to two times as long as the second programming attempt at that location only adds 0s. 

--- Quote End ---  

 

The obvious question is: Don't Altera application engineers read device manuals or is the said paragraph obsolete?
0 Kudos
Altera_Forum
Honored Contributor II
590 Views

i think that's a cool little appnote. you get 100*240 = 24k "writes" of a 4-bit counter value in the MAX II UFM. i think the appnote should acknowledge the 100 erases specified in the handbook, but from what i can see it would work well.

0 Kudos
Reply