Altera_Forum
Honored Contributor
14 years agoSOPC with SDRAM Contoller
Hy everyone, I am new in building SOPC.
Here is my objection : creating SOPC with SDRAM to write a simple Hello world on NIOS II by using DE0 development board. I got an error message from NIOS II on address 0_x100_0000 and 0_x100_D727 (notice that it's 9 bits only). (*attached) My system contains of : 1. CPU (*attached) 2. onchip_memory (not used in this project) 3. sys_timer_clock 4. jtag_uart 5. SDRAM (contoller) (*attached) 6. PLL (*attached) I think the main problem was coming from my SDRAM contoller setting or PLL setting. FYI, For CPU: memory is attached to SDRAM_0 (*pic 1). For PLL : input clock is 50MHz (from DE0). I created 2 output clock with 50MHz.each for CPU (CPU_clk) and SDRAM(SDRAM_clk). After getting the error message, I changed the frequency settings to 130MHz, since I realize that the highest frequency for DE0 SDRAM is at 133Mhz for -7 Mode. I also calculated the phase shift for SDRAM_clk. From user guide, I calculated the phase shift by using below formula : Read Lag = tOH (SDRAM) - tH(FPGA) = 2.7-(-0.28) = 2.98 ns Read Lead = tCO_min(FPGA) - tDH(SDRAM) = 0.85-0.8 = 0.05 ns Phase Shift = (-2.98+0.05)/2 = -1.465ns I got tOH and tDH from IS42S16400 SDRAM Time Spec (*attached). tH and tDH from "TImeQuest Timing Analyzer" after compiling my project (*attached). For SDRAM contoller, I set the Address width with 12 Row , 8 Column , 4 Banks, with 16 bit Data Width. (total = 8MBytes). And I also set some timing spec for this controller. FYI, DE0 has IS42S16400 SDRAM. As i said , I think my main problem came from SDRAM or PLL. Please help :o Any reply will be appreciated. Best regards, Yuyex :o