Only declare wants_zqcs signal if needed
authorJean THOMAS <git0@pub.jeanthomas.me>
Tue, 23 Jun 2020 19:50:44 +0000 (21:50 +0200)
committerJean THOMAS <git0@pub.jeanthomas.me>
Tue, 23 Jun 2020 19:50:44 +0000 (21:50 +0200)
gram/core/refresher.py

index 9875699037925e656b972dce1ccd853fae8ee824..b34ea277a6728909ddde42981aa590fd1776c81a 100644 (file)
@@ -291,7 +291,6 @@ class Refresher(Elaboratable):
         m = Module()
 
         wants_refresh = Signal()
-        wants_zqcs = Signal()
 
         settings = self._settings
 
@@ -314,6 +313,8 @@ class Refresher(Elaboratable):
         m.submodules.sequencer = sequencer
 
         if settings.timing.tZQCS is not None:
+            wants_zqcs = Signal()
+
             # ZQCS Timer ---------------------------------------------------------------------------
             zqcs_timer = RefreshTimer(int(self._clk_freq/self._zqcs_freq))
             m.submodules.zqcs_timer = zqcs_timer
@@ -369,6 +370,7 @@ class Refresher(Elaboratable):
                         ]
                         m.next = "Idle"
 
+        # Connect sequencer/executer outputs to cmd
         if settings.timing.tZQCS is None:
             m.d.comb += [
                 self.cmd.a.eq(sequencer.a),