Altera_Forum
Honored Contributor
13 years agousing Dual Port Memory with simple Nios II Qsys system
Hi all,
I created a Qsys system with an internal Onchip memory dual port RAM (internal port s1, and exported port s2) I would like to be able to write data from s2 (my test bench) and read data from s1 (nios). I connected s1 to data master (only). I chose to initialize the RAM from an init_file. I created a C application that run on this system using eclipse. When simulating the design with modelsim, I have the following problems: at 0 ns : the RAM is initialized with init_file (ok) Then a little bit later, event before my first message from the C world ("hellow world") appears, I get write accesses from the nios into the RAM (port s1) I don't understand why. PS. I tried, for test purpose only to make it a ROM under Qsys, after rebuilding the project, eclipse reduced the free stack + heap report: Info: (cpu_sgen.elf) 56 KBytes program size (code + initialized data). Info: 5380 Bytes free for stack + heap. It was Info: (cpu_sgen.elf) 56 KBytes program size (code + initialized data). Info: 59 KBytes free for stack + heap. where size of Dual port RAM = 65536 bytes My questions: Is it correct to use an onchip memory RAM from Qsys to store data other than the program code (.elf)? Why eclipse reduced the free stack + heap parameter ? Any suggestions about the problem I have? Thank you.