Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

NIOS read from SRAM

Altera_Forum
Honored Contributor II
1,239 Views

hey all, 

 

i've been trying to read data from the SRAM on a DE2 development board using a program run in the NIOS II IDE. i'm not sure i'm using the proper calls, because i'm not getting the data that is in the SRAM. the data is a full video frame (to be sent to a console via ethernet), which i can view using the USB app...not only does my IORD call return a bogus pattern, but that then overwrites the SRAM (as discovered when the SRAM is later read from the USB app). not sure if all of this is clear...but the following is a portion of my code. 

 

int i = 0; 

int o = 0; 

int temp = 0; 

for (i; i < 60; i++) { 

for (o; o < 1440; o+=2) { 

temp = IORD(SRAM_0_BASE+(1440*i)+o, 0); 

video[o+42] = temp % 0x100; 

video[o+43] = (temp % 0x10000) >> 8; 

TransmitPacket(video,0x5CA); 

 

any ideas? is IORD the proper way to do this?
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
423 Views

Are You sure that your ssram work propery. Check the conection between fpga and ssram ,current and timing assignments. good luck !. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif

0 Kudos
Reply