Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12409 Discussions

How can I run program on external SRAM?

Altera_Forum
Honored Contributor II
970 Views

Dear, 

 

 

In my system,there is a 2MByte external SRAM,I have implemented a SRAM interface controller using Qsys, and passed reading and writing test of SRAM from NIOS processor. I want to run the NIOS program in the external SRAM, how can I implement it? Thanks for your help.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
172 Views

Hello, 

You can add an Sram component to your qsys configuration, connect it with the Nios II processor, compile it. 

Then go to quartus, instantiate the verilog/VHDL object generated by qsys in quartus, connect the i/o and that should do it. 

Altera has tuturials that cover the first step in the altera university forum. 

Best Regards, 

Johi
Altera_Forum
Honored Contributor II
172 Views

You need a section of on-chip memory as well. This is where you point your reset vector. You put a code copier in the on-chip ram that copies your code from flash to external memory. There are some tools to help with this. I've seen a tutorial video on doing this, but I don't remember where. It is also explained in the Nios II embedded software development documentation.

Altera_Forum
Honored Contributor II
172 Views

I have made SRAM access successfully. Tips below: 

 

1.SRAM interface shall support byte access. 

2.I make use of Avalon_mm interface directly,do not use tristate-bridge. 

3.make sure the SRAM timing is correct,especially write timing
Reply