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++
12590 Discussions

MegaWizard-generated memory with Nios II

Altera_Forum
Honored Contributor II
1,102 Views

I need a MegaWizard-generated on-chip memory to be the main memory for Nios II system.  

How is it possible? How can I get a suitable memory interface in SOPC?
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
223 Views

in your SOPC builder, see Component Library. 

[Library]->[Memories and Memory Controllers]->[On-Chip]->[On-Chip Memory(RAM or ROM)] 

 

and [Add] it. 

 

on chip memory may be small for NiosII in normal use. 

you should remove some functions from system property in NiosII EDS(eclips).
0 Kudos
Altera_Forum
Honored Contributor II
222 Views

@akira: 

 

I know how to add on-chip memory inside SOPC, what I need is to have one outside (in my top-level), as if it was external memory. 

 

The reason is that I need to be able to manipulate with memory data and address outside SOPC.
0 Kudos
Altera_Forum
Honored Contributor II
222 Views

I don't think there is any way of adding memory with its second port signals exposed (this ought to be a standard block! [1]). So you'd have to write your own avalon slave that contains the memory block and exposes its signals. 

The alternative (depending on what you are doing) it to use an avalon master - but that is harder. 

 

[1] Similarly memory blocks that are aliased into avalon address space, and blocks with missing high bits (eg 18 bit memory with the top bits read-zero).
0 Kudos
Altera_Forum
Honored Contributor II
222 Views

I will try to be more specific (maybe this will help to come up with alternative solutions).  

 

I need to make the on-chip memory (the only memory I have) protected with parity check. Say, if the memory is 32 bit then on every write access I want to write 33 bit word consisting of data and parity. And on every read access to calculate parity again and to compare it with the parity bit.  

 

I have easily build the memory I need with MegaWizard, and made some wrapper blocks for parity check on read and write, now I don't know how to make so that my Nios II system use this memory.
0 Kudos
Altera_Forum
Honored Contributor II
223 Views

do you know how to create custom-IP core. 

as dsl told you, you can create that part "inside" of SOPC builder. 

it is able to access from outside of SOPC builder via conduit out port.
0 Kudos
Reply