Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

variable : on DRAM AND 32-bit align

Hi all,

I have my own DRAM controller named "mydram" in SOPC.

In NIOS IDE project , I create a project named A following "Hello World" template. Then I put code and data of a on onchip memory by specifying in Properties of A_syslib.

In helloworld.c , I declare this to have a variable putting on my DRAM controller :

unsigned int arr __attribute__ ((section (".mydram.rwdata")));

Or this to have its address 32-bit aligned (on onchip memory) :

unsigned int __attribute__((aligned (32))) arr;

What should I do to have arr BOTH on DRAM and 32-bit address aligned ?

I tried this but failed :

unsigned int arr __attribute__((aligned (32))) ((section (".avalon2scb.rwdata")));

Regards,

Quan
No RepliesBe the first to reply