Altera_Forum
Honored Contributor
15 years agoURGENT: IOWR problem
hello, i have a problem writing data into sdram on de2 board. when i generate 10 numbers (0-9) and write into sdram, it works fine. if i generate 100 numbers (0-99), it has a problem. here is my code:
# include <stdio.h># include <stdlib.h> # include <unistd.h># include "altera_avalon_pio_regs.h"# include "system.h"# include "alt_types.h" int main() { int i, x; printf("##### Performance Analysis# ####\n\n"); for(x = 0;x < 100; x++){ IOWR(SDRAM_BASE, x, x); } printf("Data in MEM1\n"); for(i = 0; i < 100; i++){ printf("%X\n",IORD(SDRAM_BASE, i)); } return 0; } if i generate 100 numbers, at the console, it only prints out: ##### performance analysis# #### then, after that all is blank. it works fine if only 10 numbers are used. please assist me! thanks!