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++
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.
12410 Discussions

Using Large RAM device with uClinux and NIOSII with MMU

Honored Contributor II

I have a question for the gurus here. 



I'm using the DE4 wich comes with a nice big 1GB of RAM. As far I could tell from the datasheets and reading the forum and wiki, it would not be possible to use the entire 1GB with uClinux and the NIOSII with an MMU for the following reasons: 



When the MMU is added to the design it is always enabled. With MMU the memory is divided into partitions, and the low 512MB must be shared between kernel partition and io partition to bypass the TLB of the MMU (Nios II Processor Reference Handbook, Table 3-2). These two partions are in the top 1GB of address space (starting 0xc0000000 and 0xe000000 respectively) but both map to low memory (0x00000000 - 0x1fffffff). The issue is that when you have 1GB of RAM it must be addressed at either 0x00000000, 0x40000000, 0x80000000... Since you must have RAM in the low address space for the Kernel mem partition, this then leaves you without any address space for I/O & peripheral registers. So either a smaller memory device is required to run the kernel in, or the RAM needs to be shrunk. My workaround was to reduce the addressed RAM to 256MB and then use half of the low I/O region for RAM and other half for peripherals. 



My question is whether the above info is correct or not? Is it possible to have only one big RAM device in a NIOSII with MMU and uClinux? The system we are designing currently does not require that much memory, so this is more for curiosity and future reference if a high memory requirement does come along. 




0 Kudos
1 Reply
Honored Contributor II

just to be a bit clearer, when I refered to a smaller memory device to run the kernel in, I meant that it would be a second memory device which can reside in the low memory, and then have the 1GB ram device in High memory (to use for user space apps)