Forum Discussion

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

Custom sram memory not usable in NiosII IDE

Hello guys

I just created a toyboard using a CycloneIII (EP3C5), a 2Mbytes 16bits flash memory, a 2Mbytes 16 bits sram memory, a 50Mhz oscillator, some voltage regulators and a couple of connectors. I already started the hardware and it works pretty fine. I instantiated a niosII system with those 2 external memories through an Avalon-MM Tristate Bridge and an onchip memory.

https://www.alteraforum.com/forum/attachment.php?attachmentid=1647

I used Altera CFI flash cotroller to take care of my flash and I created a custom controller based on the Avalon-MM Tristate Bridge Slave to take care of my sram. The problem is that when I'm configuring the parameters that inform to the linker where putting things like .text segment, .rodata segment, .rwdata segment, heap memory and stack memory my sram doen't appears as a choice on the nios2 eds system library properties dropdown list.

https://www.alteraforum.com/forum/attachment.php?attachmentid=1648

I tried to instantiate a sram memory controller provided by Altera and that instance appeas on previously mentioned dropdown list, so I bilieve I missing something when I created my custom controller.

Here are the signals and interfaces I used to create my custom sram controler.

https://www.alteraforum.com/forum/attachment.php?attachmentid=1649

https://www.alteraforum.com/forum/attachment.php?attachmentid=1650

So I really appreciate any suggestions about what I missing when creating my custom sram controller and how to make the instance of my custom sram controller appearing on system library properties of nios2 eds.

Regards,

Marcio

2 Replies

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

    You need to activate a special property to tell that your component is a memory device.

    I assume that you used the component editor and that it created a *hw.tcl file to describe it. Open that file and look for a section describing the avalon interface:
    add_interface s1 * *
    look for a line like this:
    set_interface_property s1 isMemoryDevice false

    and change it to:
    set_interface_property s1 isMemoryDevice true