core/refresher: Add assert on clk_freq/tREFI ratio.

Prevent generating a controller with tREFI too low to accept any transaction.
This commit is contained in:
Florent Kermarrec 2021-11-01 14:58:41 +01:00
parent 5aad6cd3d1
commit 5d7adcfa7c
1 changed files with 2 additions and 0 deletions

View File

@ -230,6 +230,8 @@ class Refresher(Module):
wants_zqcs = Signal()
# Refresh Timer ----------------------------------------------------------------------------
if settings.timing.tREFI < 100: # FIXME: Reduce Margin.
raise ValueError("Clk/tREFI is ratio too low , please increase Clk frequency or disable Refresh.")
timer = RefreshTimer(settings.timing.tREFI)
self.submodules.timer = timer
self.comb += timer.wait.eq(~timer.done)