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

Loading Nios II program on onchip memory.

Altera_Forum
Honored Contributor II
1,567 Views

Hi there, 

 

I have Nios II system with custom peripheral. There is no external flash to store my program. I'm loading and testing my program through JTAG interface. I was wondering if there is any way to load my program on the onchip memory using EPC2 .pof file on the external EEPROM? 

 

I'm using Cyclone EP1C12Q240C8.  

 

Thanks in advance. 

Victor
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
552 Views

If you compile your software first, then compile your firmware using Quartus, the software will automatically be programmed in the the configuration stream. Cyclone I uses M4K blocks which can be initialized during configuration. Just make sure you do things in that order: 

1 - Compile software - this generates a <memory_name>.hex file that is used by the assembler and added into the bitstream. 

2 - Compile your Quartus project - The assembler will configure the RAM to be initialized using the contents of the .hex file. 

 

Also, if you just want to change your software and not recompile the firmware you can just run the Processing->Update Memory Initialization File option. This would also be done automatically if you have the "Smart Compilation" enabled for the project. 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
552 Views

Oh... It's so simple :). Sorry for the stupid topic. 

 

Thanks 

Victor
0 Kudos
Altera_Forum
Honored Contributor II
552 Views

Hi, I'm new to NiosII IDE. I'm trying to use separate memories for Nios Ram and program memory. In my system I have both on-chip memory and SRAM, but I can't select the SRAM as memory program. How can I do? I get memory overlap errors. 

Thank you a lot 

 

rollingringhio
0 Kudos
Altera_Forum
Honored Contributor II
552 Views

Is the SRAM connected to the Nios CPU's instruction master? 

What are exactly the errors you are seeing?
0 Kudos
Altera_Forum
Honored Contributor II
552 Views

First of all thank you for your answer. I solved it by changing the program memory device in the proper system settings menu. 

I have now problems using HAL macros with RS232 peripheral, but I think this is not the right thread :) 

Thank you again 

 

rollingringhio
0 Kudos
Reply