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 to read/write to dual port ram

Altera_Forum
Honored Contributor II
1,427 Views

I added a dual port ram in on-chip memory named "dpram" to qsys but don't know how to read or write to it in Eclipse.  

Am using Cyclone 10LP and Quartus Prime Lite Edition 17.1. 

 

I tried this simple code : 

IOWC(DPRAM_BASE, 0 , 1); 

int Byte = IORD( DPRAM_BASE, 0 ); // should read back the 1 

 

error msg says: Symbol "DPRAM_BASE" could not be resolved. 

 

Is there any literature describing how to write C code to dprams?
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
165 Views

Is problem solved?

Altera_Forum
Honored Contributor II
165 Views

I assume you are talking about accessing using Nios. If so for starters you have a typo, that should be IOWR and not IOWC. 

 

Your memory probably has _S1 appended to the name. Macros such as these are defined in system.h so make sure to include it and when in doubt what the name is open that file and look for the macro definition.
Reply