diff --git a/litedram/core/refresher.py b/litedram/core/refresher.py index a7b5428..c35ffde 100644 --- a/litedram/core/refresher.py +++ b/litedram/core/refresher.py @@ -31,17 +31,17 @@ class RefreshGenerator(Module): # Wait start timeline(self.start, [ # Precharge all - (1, [ + (0, [ cmd.ras.eq(1), cmd.we.eq(1) ]), # Wait tRP then Auto Refresh - (1 + trp, [ + (trp, [ cmd.cas.eq(1), cmd.ras.eq(1) ]), # Wait tRFC then done - (1 + trp + trfc, [ + (trp + trfc, [ self.done.eq(1) ]) ]) diff --git a/test/test_refresh.py b/test/test_refresh.py index 4d04adb..59321a7 100644 --- a/test/test_refresh.py +++ b/test/test_refresh.py @@ -36,9 +36,9 @@ class TestRefresh(unittest.TestCase): class Obj: pass cmds = Obj() starts = "_-______________" - cmds.cas = "____-___________" - cmds.ras = "___--___________" - dones = "______-_________" + cmds.cas = "___-____________" + cmds.ras = "__--____________" + dones = "_____-__________" self.refresh_generator_test(trp, trfc, starts, dones, cmds) def refresh_timer_test(self, trefi):