Forum Discussion
Altera_Forum
Honored Contributor
13 years ago --- Quote Start --- 1) Yes, I can program my custom HW using JTAG --- Quote End --- Great. That eliminates one potential issue :) --- Quote Start --- 2) Now, this is where it gets interesting, the restore.sh programs 2 factory restore files, previously created, restore_0 and restore_1. The two are different, one is HW the other is SW and a collection of other bits an pieces. You can't just program them anywhere you wish interchangeably. restore_0 has to go at base 0x0800_0000 (offset=0x20000) and restore_1 has to go at 0x0A00_0000. This is because restore_0 has the NIOS II which needs to boot SW from a specific location. I can individually program restore_0 and restore_1 to the expected bases (0x0800_0000 and 0x0A00_0000) correctly but if I try to program the USER HW at any base (0x0800_0000 or 0x0A00_0000) with any offset, it does not configure the FPGA. Could it be that I am missing something in creating the user.sof ? I figured that if I can download it with JTAG and it works then it is good to use for programming into FLASH, no? --- Quote End --- It won't be the .sof that's missing something, it'll be in the conversion from .sof to SREC (.flash). Look at the Flash memory map in the user guide (Appendix A): http://www.altera.com/literature/ug/ug_sivgx_fpga_dev_kit.pdf Add 800_0000h to all these addresses to get the flash memory map as viewed by the NIOS II processor (since it maps the flash to this address). Now look at the offsets you are using when creating the .flash files. They should correspond to the offset to the factory hardware image, user hardware image, or software images respectively. The fact that you are using both 800_0000h and A00_0000h implies that your board has the dual-die flash - is that correct? (Mine does). There is a --dual-die option to one of the programs that creates the flash images. I suspect this is required to correctly issue flash programming sequences or sector erase sequences, since the dual-die version has to be treated as two separate flash devices. If these comments don't result in an "Ah-ha!" moment for you, let me know, and I'll go back and look at how to do it on my boards. Cheers, Dave