you should read the application note an517, that you can download from http://www.altera.com/literature/an/an517.pdf
with IORD and IOWR you should be able to write and read to/from the SDRAM... here you have a simple code as example.
void readFromSDRAM(int offset){
unsigned int DDR_read_OFFSET_ADDRESS = offset;
unsigned int read_data;
if ((DDR_read_OFFSET_ADDRESS<0) || (DDR_read_OFFSET_ADDRESS>=(ALTMEMDDR_SPAN/4))){
printf("error");
}else{
read_data=IORD(ALTMEMDDR_BASE,DDR_read_OFFSET_ADDRESS);
printf("Read %08x from address %08x \n",read_data,(ALTMEMDDR_BASE+DDR_read_OFFSET_ADDRESS));
}
}
void writeToSDRAM(int data, int offset){
unsigned int DDR_write_OFFSET_ADDRESS = offset;
if((DDR_write_OFFSET_ADDRESS<0)||(DDR_write_OFFSET_ADDRESS>=(ALTMEMDDR_SPAN/4))){
printf("error");
return;
}
IOWR(ALTMEMDDR_BASE,DDR_write_OFFSET_ADDRESS,data);
if (IORD(ALTMEMDDR_BASE,DDR_write_OFFSET_ADDRESS)==data){
printf("Data: %08x is correctly written to memory offset: %08x \n",data,DDR_write_OFFSET_ADDRESS);
}else{
printf("error");
}
}