Forum Discussion
Altera_Forum
Honored Contributor
12 years agoTwo x NIOS II boot from EPCQ in Quartus 13.1
Hello,
It seems that there are a bug in Quartus software for programming the EPCQ. The following workaround (http://www.altera.com/support/kdb/solutions/rd11192013_118.html) provided by Altera solve the problem (at least for one NIOS II) In my design I have two NIOS II's implemented in FPGA. To program the FPGA configuration + first CPU + second CPU into the EPCQ, I followed the exact step provided in the above link with slight modifications (in red) as shown below: Step 8. a. sof2flash --input=hw.sof --output=hw.flash --epcq -verbose b. elf2flash --input=sw1.elf --output=sw1.flash --epcs --after=hw.flash -verbose c. elf2flash --input=sw2.elf --output=sw2.flash --epcs --after=sw1.flash -verbose Step 9. a. nios2-flash-programmer --epcs --base=0x4081000 --device=1 --instance=0 hw.flash b. nios2-flash-programmer --epcs --base=0x4081000 --device=1 --instance=0 sw1.flash c. nios2-flash-programmer --epcs --base=0x4081000 --device=1 --instance=0 sw2.flash result: the FPGA configuration is uploaded from EPCQ and FPGA is booted up, BUT both CPU's are not functioning (i am not sure if it is uploaded or not). Any idea or advise? Thanks in advance. hbs22 Replies
- Altera_Forum
Honored Contributor
can you give this example?
" managed to use on chip RAM as a boot up for the second CPU. The on chip RAM is initialized using a .hex file. The first CPU is booting up from EPCQ Results: Both CPU's are functioning well " - Altera_Forum
Honored Contributor
yes, the base address of hex file is the base address of the memory
and you need to add offset to it - Altera_Forum
Honored Contributor
Booting up the FPGA configuration with one CPU is described here
http://www.altera.com/support/kdb/solutions/rd11192013_118.html Then forthe second CPU to be booted from on-chip memory, you need to do the following (of course the FPGA configuration must be loaded at the beginning as described in the above link) 1- Define on-chip memory as "RAM" 2- check "Enable non-default inistialization file" (refer to step 5 for the hex file generation) https://www.alteraforum.com/forum/attachment.php?attachmentid=9176 3- in NIOS II settings, point the reset vector to the on chip memory https://www.alteraforum.com/forum/attachment.php?attachmentid=9177 4- In order to generate the hex file from the elf file generated by Eclipse, the easiest way is shown below https://www.alteraforum.com/forum/attachment.php?attachmentid=9178 5- Double click on "mem_init_generate" and the hex file is generated and saved in a folder inside your app folder - Altera_Forum
Honored Contributor
The fifth step how to operate? A screenshot?
- Altera_Forum
Honored Contributor
I don't know how do generating requisite hex file .because I generated hex file can't run the NIOS II.
Otherwise, My English is very poor so that can not effectively communicate with you, please don't laugh at me. I sincerely hope to get your help. - Altera_Forum
Honored Contributor
where have "mem_init_generate"?
- Altera_Forum
Honored Contributor
I follow the steps you take the action, but also a successful production of the .HEX file I need.However, in the process of compile QII also called the following warning:
" Warning (113015): Width of data items in "ATMC_SYS_RAM2.hex" is greater than the memory width. Wrapping data items to subsequent addresses. Found 512 warnings, reporting 10 Warning (113009): Data at line (2) of memory initialization file "ATMC_SYS_RAM2.hex" is too wide to fit in one memory word. Wrapping data to subsequent addresses. Warning (113009): Data at line (3) of memory initialization file "ATMC_SYS_RAM2.hex" is too wide to fit in one memory word. Wrapping data to subsequent addresses. Warning (113009): Data at line (4) of memory initialization file "ATMC_SYS_RAM2.hex" is too wide to fit in one memory word. Wrapping data to subsequent addresses. Warning (113009): Data at line (5) of memory initialization file "ATMC_SYS_RAM2.hex" is too wide to fit in one memory word. Wrapping data to subsequent addresses. Warning (113009): Data at line (6) of memory initialization file "ATMC_SYS_RAM2.hex" is too wide to fit in one memory word. Wrapping data to subsequent addresses. Warning (113009): Data at line (7) of memory initialization file "ATMC_SYS_RAM2.hex" is too wide to fit in one memory word. Wrapping data to subsequent addresses. Warning (113009): Data at line (8) of memory initialization file "ATMC_SYS_RAM2.hex" is too wide to fit in one memory word. Wrapping data to subsequent addresses. Warning (113009): Data at line (9) of memory initialization file "ATMC_SYS_RAM2.hex" is too wide to fit in one memory word. Wrapping data to subsequent addresses. Warning (113009): Data at line (10) of memory initialization file "ATMC_SYS_RAM2.hex" is too wide to fit in one memory word. Wrapping data to subsequent addresses. Warning (113009): Data at line (11) of memory initialization file "ATMC_SYS_RAM2.hex" is too wide to fit in one memory word. Wrapping data to subsequent addresses. " At the same time,NIOS II can not run. - Altera_Forum
Honored Contributor
- Altera_Forum
Honored Contributor
I successful!!It also needs to join this step after rebuilding project:"updata Memory initialization File" in Processing tools
- Altera_Forum
Honored Contributor
This is ok...just ignore the warning
I forgot to tell you that in Quartus you need to refresh the memory initialization file .........Quartus Menu --> Processing --> Update memory initialization file