NIOS II - Instantiating array on SDRAM

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

Reply to
Loading thread data ...

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


Reply to

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.