Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Honored Contributor I
1,842 Views

Downloading ELF process failed while using the external memory present in the board

Hi, 

 

I'm using the BeMicro Kit and I'm using the external 8MB RAM present in the board. I've added the SDRAM controller in the Qsys along with the NIOS II/e processor and it compiled successfully. When I'm compiling the software in the Eclipse it throws an error " Downloading ELF Process Failed". I tried using the NIOS II command shell to download the elf file but it also gives an error " Verify failed between address 0X0 and 0XFFFF ". I have also attached the error message of the NIOS II command shell and the Qsys screenshot. Can anyone please suggest me where am I going wrong ? 

Note: I've already set the "Reset Vector and Exception Vector to sram"  

 

Thanks, 

Swarnava Pramanik
0 Kudos
9 Replies
Highlighted
Honored Contributor I
271 Views

It looks like your memory isn't working. To confirm this, run a memory test on the external ram. You've covered up the addresses. Make sure they are correct.

0 Kudos
Highlighted
Honored Contributor I
271 Views

 

--- Quote Start ---  

It looks like your memory isn't working. To confirm this, run a memory test on the external ram. You've covered up the addresses. Make sure they are correct. 

--- Quote End ---  

 

Hi Galfonz, 

 

Thanks for your reply. One thing I notice that in QSYS, the external RAM Chip present in the BeMicro board is not being shown. I'm attaching a screenshot of that. Could you please suggest why the RAM Chip is not being shown. Due to this I choose Micron MT48LC4M32B2 7 chip from the list. I think this might also be the reason. 

 

Thanks, 

Swarnava Pramanik
0 Kudos
Highlighted
Honored Contributor I
271 Views

DRAM controllers are black magic to me. I always start with a demo that has a working memory controller and then add or remove the component(s) I need to. I'd suggest starting with a BeMicro demo project that uses the memory controller and editing it to your liking.

0 Kudos
Highlighted
Honored Contributor I
271 Views

 

--- Quote Start ---  

DRAM controllers are black magic to me. I always start with a demo that has a working memory controller and then add or remove the component(s) I need to. I'd suggest starting with a BeMicro demo project that uses the memory controller and editing it to your liking. 

--- Quote End ---  

 

 

Hi Galfonz, 

 

I did the same thing like starting with the demo project. The demo project ran without any error but when I edited the components and added different components, the same error is thrown "Verifying failed at external memory address". Could you please help with your knowledge ? 

 

Thanks, 

Swarnava Pramanik
0 Kudos
Highlighted
Honored Contributor I
271 Views

Have you verified that your FPGA configuration is running. Blink an LED or pulse a GPIO pin. This is just to verify that the FPGA configured properly. You didn't mention if the demo project you started from uses external RAM. If you haven't already, try compiling from source a demo project that uses the external ram and verify that it works. Next, run memory test software on that system to ensure that hardware is working. 

 

Starting from a demo project that you compiled, add and remove components one at a time. Each time run the memory test to verify that memory isn't broken. Save a copy of every step so you can go back if necessary. Keep going until you find a change that breaks external memory. That will give you a starting point for debugging.
0 Kudos
Highlighted
Honored Contributor I
271 Views

 

--- Quote Start ---  

Have you verified that your FPGA configuration is running. Blink an LED or pulse a GPIO pin. This is just to verify that the FPGA configured properly. You didn't mention if the demo project you started from uses external RAM. If you haven't already, try compiling from source a demo project that uses the external ram and verify that it works. Next, run memory test software on that system to ensure that hardware is working. 

 

Starting from a demo project that you compiled, add and remove components one at a time. Each time run the memory test to verify that memory isn't broken. Save a copy of every step so you can go back if necessary. Keep going until you find a change that breaks external memory. That will give you a starting point for debugging. 

--- Quote End ---  

 

 

Hi Galfonz, 

 

Thanks for your reply. The Demo project uses an external RAM. I took the Demo project template of Qsys and added the extra component of my project into it and removed some unnecessary component from the Demo project template like the temperature sensor IP core. You also mentioned about memory test, could you please let me know how to do this memory test ? 

 

Thanks, 

Swarnava Pramanik
0 Kudos
Highlighted
Honored Contributor I
271 Views

Here is a good article on testing memory. The code they show has been around forever. http://www.esacademy.com/en/library/technical-articles-and-documents/miscellaneous/software-based-me...

0 Kudos
Highlighted
Beginner
271 Views

Hi,

 

I found out that I had not moved one of the keys on my MAX 10 board up to the correct position. By moving key 9 to the up position Nios II was able to upload the ELF file without a problem. There was no problem with the card.

 

/James

 

0 Kudos
Highlighted
Beginner
271 Views

Hi,

 

Also make sure you program the board with the sof file through Quartus II. Otherwise you will get an elf error also. In addition to that, when you click run on the NIOS II Eclipse button, make sure you select the NIOS Hardware run option and not the C application run option. If the problem persists, disconnect and reconnect the board from the USB and follow the process again of reprogramming the board.

 

/James

0 Kudos