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

jic file not staying

Altera_Forum
Honored Contributor II
1,648 Views

Hello, 

 

I'm pretty new to Altera products but am having a strange problem. I am using the Cyclone III EP3C5 and using temporary/volatile (as i understand) *.sof files to check my calibrations. Once I am ready to permanently program my FPGA, I convert the *.sof file to the *.jic file which will be programmed (via Altera USB Blaster) onto something referred to as my EPCS16. I believe this is a master or slave situation where upon power up the EPCS16 relays the *.jic's instructions to the FPGA. After converting to the *.jic file and burning it, I retest the calibrations and they are correct. However, after I wait a day or two and go to retest, the calibrations will then be off. I am working with photo diodes and reburning the *.sof or *.jic file will fix dark level calibrations, not light. When I reprogram them in Quartus it says it still has the *.jic file programmed onto it as it should but reburning the same *.sof or *.jic file returns different results. Any ideas?
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
924 Views

 

--- Quote Start ---  

 

I retest the calibrations and they are correct 

 

--- Quote End ---  

 

You missed explaining what these calibrations are :) 

 

If the calibrations are something you store in the RAM of the FPGA, then the EPCS device needs to include data to load the RAM with at power on. The EPCS devices are SPI Flash. When the FPGA powers on it is an SPI master that reads flash and copies the contents into its configuration SRAM, that configuration data is your custom design. Read-only memory (ROM) is still FPGA SRAM, but it has no read ports as far as your logic is concerned. 

 

So what is it that is being "compared" when you check the calibration data? 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
924 Views

Dave, 

 

Thank you for the prompt response. My calibrations are for 9 photo diodes on a specific chip. Each diode reads different light counts out of the factory so I have been calibrating all 9 diodes to initialize around 390k counts in dark and 6 million counts when a uniform, test light strip (basically a night light) is exposed to all 9 simultaneously. By varying multipliers and offsets (y = mx + b since they should all be linear and hopefully very close) in lab view, I then put the corresponding hex values into my VHDL Quartus program. I think the issue may be in the communication at power on between the EPCS and and FPGA. I'm not sure where the calibrations are getting stored. I know that the .sof files get put on the FPGA but the .jic files go to the EPCS instead. I suppose my calibrations would then be getting stored on the EPCS? Then the FPGA should be reading that data and storing the configuration. It isn't my VHDL programming in play and I'm a Matlab guy by nature so maybe I need to spend more time looking through the program. 

 

Thank you, 

Justin
0 Kudos
Altera_Forum
Honored Contributor II
924 Views

Hi Justin, 

 

--- Quote Start ---  

 

Thank you for the prompt response. My calibrations are for 9 photo diodes on a specific chip. Each diode reads different light counts out of the factory so I have been calibrating all 9 diodes to initialize around 390k counts in dark and 6 million counts when a uniform, test light strip (basically a night light) is exposed to all 9 simultaneously. By varying multipliers and offsets (y = mx + b since they should all be linear and hopefully very close) in lab view, I then put the corresponding hex values into my VHDL Quartus program. 

 

--- Quote End ---  

 

How do you put them in your VHDL? 

 

Are you creating hard-coded registers that are effectively read-only, or are you putting them into a RAM image? 

 

Either way, at power-on you should be able to read these read-only registers and confirm they are the calibrated values. 

 

That of course assumes you have created a design where you have some method of reading those registers back - have you? If not, then I recommend using the JTAG-to-Avalon-MM bridge and putting the calibration values in registers that you can read via the JTAG bridge. If what I am saying is complete gibberish to you, then take a look at this tutorial I wrote: 

 

http://www.alterawiki.com/wiki/using_the_usb-blaster_as_an_sopc/qsys_avalon-mm_master_tutorial 

 

Personally I would create a block of registers that have a build time-stamp, a calibration serial number, and the calibration values, and then have those map to some database of calibration values. Ideally the board would have some unique way to identify it too (1-Wire ID, or perhaps the SPI Flash has some one-time-programmable memory or a unique serial ID). 

 

Cheers, 

Dave
0 Kudos
Reply