NIOS II - Instantiating array on SDRAM

Z

zg

Guest
Hi group,

I am trying to develop a digital camera around the NIOS II using the
Stratix development board.
I need to instantiate a large buffer (2MW) in the SDRAM.
In my code I instantiated my array like this:

alt_u16 Image_Buffer[0x2000000] __attribute__ ((section (".sdram"));

The SOPC builder has an SDRAM of 4MX32bits, so I should have enough
space to instantiae the array.
When I am trying to compile I am getting a messege that my SDRAM is
full unless I am reducing the array size to like 20000.
All of my program and data are stored in different memories (ext sram
and internal sram).
Questions:
1. What is the limitations of the array size?
2. Am I doing the right thing in instantiating the array like this?

I will appreciate any help,
Zohar
 
"zg" <zohargolan@hotmail.com> wrote in message
news:e24ecb44.0408131303.4bd272e2@posting.google.com...
Hi group,

I am trying to develop a digital camera around the NIOS II using the
Stratix development board.
I need to instantiate a large buffer (2MW) in the SDRAM.
In my code I instantiated my array like this:

alt_u16 Image_Buffer[0x2000000] __attribute__ ((section (".sdram"));

The SOPC builder has an SDRAM of 4MX32bits, so I should have enough
space to instantiae the array.
When I am trying to compile I am getting a messege that my SDRAM is
full unless I am reducing the array size to like 20000.
All of my program and data are stored in different memories (ext sram
and internal sram).
Questions:
1. What is the limitations of the array size?
2. Am I doing the right thing in instantiating the array like this?

I will appreciate any help,
Zohar
0x2000000 is 20 megawords; 0x20000 is 2 megawords (4 megabytes,
4*1024*1024). You have one zero too much, that 16 times too much.

Jeroen
 

Welcome to EDABoard.com

Sponsor

Back
Top