Altera_Forum
Honored Contributor
14 years agoInterfacing Controller for SDR SDRAM Memory with FPGA Centric Approach
Sorry i'm not native english speaker. I'm a begginer in I/Os constraints on Quartus but i've done my best by reading the TimeQuest Timing Analyzer Handbook, other threads , TimeQuest Timing Analyzer User Guide on alterawiki, free online courses... but i still have some difficulties to resolve my problem.
I want to interface my controller with an SDR SDRAM with FPGA centric approach. I'm currently trying to use center aligned data for input and output as described in the " Source Synchronous Interfaces and the TimeQuest Timing analyzer" free online course. My input clock is for the design and is connected to a pll. The output of the pll is connected to the clock of the external device. So according to the course I performed some report_timing for both slow and fast corners to get the slack values for setup and hold times. report_timing -from input_clock -to output clock -setup -npaths 1 I found : Slow Corner : su slack: 12,132 hold slack: 4,168 Fast Corner : su slack: 13,214 hold slack: 1,87 According to this values, the equation the phase shift to apply to balance hold and setup times, in order to be center aligned, would be (4,168-13,214)/2 ie -81°. But it doesn't work, I can't read anything from my memory. Something strange, I tried some shift delays ( with or without any constraints) and with +50° I meet the timings and I can read something but not the exact expected value. I'm on this problem for weeks, i'm very desperate. If someone have any clue or advice please don't hesitate. Thanks a lot *************************DATASHEET******************************** My FPGA is a EP1S10F780C6. External device datasheet ( MT48LC4M32B2 speedgrade 7) : Data-in, Address, CS#, RAS#, CAS#, WE#, CKE, DQM setup time : 2ns Data-in, Address, CS#, RAS#, CAS#, WE#, CKE, DQM setup time : 1ns Data-out hold time : 2,5 ns (min) ************************* SDC FILE********************************** set period 20.000 create_clock -name input_clock -period $period [get_ports {H}] create_clock -name virtual_clock -period $period create_generated_clock -name pll_clock -source {inst_sdram_pll|altpll_component|pll|inclk[0]} {inst_sdram_pll|altpll_component|pll|extclk[0]} create_generated_clock -name output_clock -source {inst_sdram_pll|altpll_component|pll|extclk[0]} -phase -81 [get_ports H_sdram] # init : reset , start : always equals to '1' set_false_path -from [get_ports {init start}] set_false_path -to [get_ports {H_sdram}] set_false_path -to [get_ports {led[*]}] set_output_delay -add_delay -clock output_clock -max 2 [get_ports {Data_in_out[*] Address[*] CS CKE CAS BA[*] DQM[*] RAS We}] set_output_delay -add_delay -clock output_clock -min 1 [get_ports {Data_in_out[*] Address[*] CS CKE CAS BA[*] DQM[*] RAS We}] # I'm not sure about input delays, i tried some different values, so i put# set_input_delay -add_delay -clock virtual_clock -max# [get_ports {Data_in_out[*]}] set_input_delay -add_delay -clock virtual_clock -min# [get_ports {Data_in_out[*]}] *******************************************************************