Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

Loading Nios II program on onchip memory.

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

5 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

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

    What are exactly the errors you are seeing?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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