Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
699 Views

Using Large RAM device with uClinux and NIOSII with MMU

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. 

 

 

Cheers 

Antonie
0 Kudos
1 Reply
Altera_Forum
Honored Contributor I
35 Views

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)

Reply