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

DE5Net + nios2 + linux + DDR3 2GB

Altera_Forum
Honored Contributor II
1,501 Views

Hi, I'm trying to boot linux on nios2 with 2GB of ram having some problem. All the examples I saw are using 128MB of memory which fits in the low 512MB of physical memory region. 2GB of memory can be placed only at low 2GB or high 2GB physical and this is kind of causing problems. 

 

If I use low 2GB space, then it covers the entire low 512MB which I cannot place other peripherals and if I put at high 2GB space then I don't know where to put reset vector and exception vector. Is there anyone who successfully booted linux with more than 1GB of memory?
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
619 Views

Hi, 

 

 

--- Quote Start ---  

I'm trying to boot linux on nios2 with 2GB of ram having some problem. All the examples I saw are using 128MB of memory which fits in the low 512MB of physical memory region. 2GB of memory can be placed only at low 2GB or high 2GB physical and this is kind of causing problems. 

 

If I use low 2GB space, then it covers the entire low 512MB which I cannot place other peripherals and if I put at high 2GB space then I don't know where to put reset vector and exception vector. Is there anyone who successfully booted linux with more than 1GB of memory? 

--- Quote End ---  

 

 

Because of the features of Nios 2's MMU and the current implementation of Linux kernel, the kernel code must be placed lower than the address 0x20000000 of physical memory. Furthermore, the amount of memory that can be used as the main memory for the kernel is further restricted, since the same location must be shared with memory mapped IO. Therefore, trying to use a single 2GB DDR3 memory for this purpose (and coupled with stubborn specifications of Qsys), we must waste most of the memory. Although you can pretend that a single memory has more than one memory space via an appropriate adapter, you have to suffer the additional latency. 

I recommend to use other SRAMs on your DE5Net for the kernel, if possible.  

 

Kazu
0 Kudos
Altera_Forum
Honored Contributor II
619 Views

Thank you for your answer. 

 

Then would it be possible to have two memory modules in non-contiguous physical memory space? For example, can I have a small memory (256MB) for the kernel below 0x20000000 and have one 2GB memory at top physical memory space? I'm not sure if the nios2 linux can fully use both memory modules.
0 Kudos
Altera_Forum
Honored Contributor II
619 Views

Hi, 

 

 

--- Quote Start ---  

 

Then would it be possible to have two memory modules in non-contiguous physical memory space? For example, can I have a small memory (256MB) for the kernel below 0x20000000 and have one 2GB memory at top physical memory space? I'm not sure if the nios2 linux can fully use both memory modules. 

--- Quote End ---  

 

 

Of course it is possible. With MMU, you can also make two non-contiguous memories look like a single contiguous memory. 

 

Kazu
0 Kudos
Altera_Forum
Honored Contributor II
619 Views

I spent sometime struggling with DE5-Net and nios2 and decide to give up this build. I really need to deal with more memory size but in current Linux and nios2 setup it will never be easy. Additionally setting ethernet connection on SFP port with TSE is quite annoying. Thanks for your help so far.

0 Kudos
Reply