weihei 发表于 2012-12-12 17:58:29

用fpga写sdram控制器,用了Northwest的核,关于刷新有点疑问

用fpga写sdram控制器,用了Northwest的核,关于刷新的问题。

想问下各位大大,这个ip核会不会自己在刷新,还是说,需要自己再多写一个刷新计数器,控制其刷新。

谢谢了。

附:Northwest的sdram控制器代码

chenshengyang 发表于 2012-12-19 19:25:32

看了文檔的說明, 主要你的想要找的答案在下:

The control interface module also contains a 16-bit down counter and control circuit that is used to generate periodic
refresh commands to the command module. The 16-bit down counter is loaded with the value from REG2 and counts
down to zero. The REFRESH_REQ output is asserted when the counter reaches zero and remains asserted until the
command module acknowledges the request. The acknowledge from the command module causes the down counter
to be reloaded with REG2 and the process repeats. REG2 is a 16-bit value that represents the period between
REFRESH commands that the SDR SDRAM Controller issues. The value is set by the equation
int(refresh_period/clock_period).

For example, if an SDRAM device that is connected to the SDR SDRAM Controller has a 64-ms, 4096-cycle refresh
requirement, the device must have a REFRESH command issued to it at least every
64 ms/4096 = 15.625 μs.
If the SDRAM and SDR SDRAM Controller are clocked by a 100-MHz clock, the maximum value of REG2 is
15.625 μs/0.01μs = 1562d.

只要你對REG2設定好刷新的數值後, 這個IP會自動幫你產生REFRESH Command.

weihei 发表于 2012-12-19 23:48:20

chenshengyang 发表于 2012-12-19 19:25 static/image/common/back.gif
看了文檔的說明, 主要你的想要找的答案在下:

The control interface module also contains a 16-bit down...

我已经发现了。不过还是谢谢啦。。。看文档太不仔细了。。汗。。。

zhm374923914 发表于 2013-4-17 16:21:23

我已经被这个sdram折腾很久了,O(∩_∩)O谢谢

zhm374923914 发表于 2013-4-17 16:22:51

感激之情无以言表……

chenjm 发表于 2013-4-18 17:08:24

行不行的啊,在裸奔情况下可以直接读写吗?
页: [1]
查看完整版本: 用fpga写sdram控制器,用了Northwest的核,关于刷新有点疑问