Forum Discussion
Altera_Forum
Honored Contributor
13 years agoDownload configuration and data to EPCS
Hi everybody
i am using EP3C25U with EPCS16. I want too download FPGA configuration (with NIOS2) to EPCS through jtag. In addition to that i want to add some initial/setup data. The idea is that on start up nios will read some on-power initialization parameters form my firmware. How would i do that. Regards mirza7 Replies
- Altera_Forum
Honored Contributor
You want the EPCS controller.
See Chapter 5 of this document: http://www.altera.com/literature/ug/ug_embedded_ip.pdf - Altera_Forum
Honored Contributor
Hi
thank you. This describes the configuration download. What i have is like this FPGA config => EPCS NIOS software => EPCS Init data => EPCS this "init data" has to be written to EPCS only once and it will stay constant. I could use a ram block on fpga, but i am really short on fpga on-chip memory. So i am thinking if it is possible during the programming procedure to download "init data" with FPGA config or with NIOS software when i write it to EPCS? Regards Mirza - Altera_Forum
Honored Contributor
Yes, you can do that.
You just do the same things you would do with the NIOS firmware in that case, but put the "init data" at a different address (e.g. at the tail end of the EPCS logical address space). - Altera_Forum
Honored Contributor
Hi
thank you very much. Do i have to write this "init data" in raw binary, text ... What is the prodecure to append this data and how do i specify where to write it to? Is there any tutorial on this? Regards Mirza - Altera_Forum
Honored Contributor
How are you currently handling the NIOS code? Just do the same thing, but with a different address.
If you're doing this with a .JIC file, just create another .hex file with your "init data" in it, and add another section to your .JIC configuration. Following these instructions, http://www.altera.com/support/kdb/solutions/rd10132010_126.html you simply repeat step# 11 except maybe use Absolute addressing to keep your "init data" at fixed location. If you're not doing this with a .JIC file, the instructions are roughly the same: just do whatever you're doing with the NIOS firmware, but at a different address. - Altera_Forum
Honored Contributor
Thank you very much for this.
How do i generate a hex file with "init data". ??? Is that a purely binary file written in any text editor or is there a procedure to do it in Quartus Regards Mirza - Altera_Forum
Honored Contributor
You can use the objcopy command, the same as you are currently already doing for the NIOS firmware probably. You just need to tell it that the input file is a binary (instead of S-Record or ELF).
Or you can use whatever other utility you like. No, I don't believe this is something Quartus has a builtin function for.