From: Jean THOMAS Date: Mon, 27 Jul 2020 17:29:00 +0000 (+0200) Subject: Simplify refresher code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=14a215449ebb42fd8228c1aec3392695ef8abc48;p=gram.git Simplify refresher code --- diff --git a/gram/core/refresher.py b/gram/core/refresher.py index 7c68fec..80cb659 100644 --- a/gram/core/refresher.py +++ b/gram/core/refresher.py @@ -368,34 +368,25 @@ class Refresher(Elaboratable): if settings.timing.tZQCS is None: with m.State("Do-Refresh"): - m.d.comb += self.cmd.valid.eq(1) + m.d.comb += self.cmd.valid.eq(~sequencer.done) with m.If(sequencer.done): - m.d.comb += [ - self.cmd.valid.eq(0), - self.cmd.last.eq(1), - ] + m.d.comb += self.cmd.last.eq(1) m.next = "Idle" else: with m.State("Do-Refresh"): - m.d.comb += self.cmd.valid.eq(1) + m.d.comb += self.cmd.valid.eq(~wants_zqcs) with m.If(sequencer.done): with m.If(wants_zqcs): m.d.comb += zqcs_executer.start.eq(1) m.next = "Do-Zqcs" with m.Else(): - m.d.comb += [ - self.cmd.valid.eq(0), - self.cmd.last.eq(1), - ] + m.d.comb += self.cmd.last.eq(1) m.next = "Idle" with m.State("Do-Zqcs"): - m.d.comb += self.cmd.valid.eq(1) + m.d.comb += self.cmd.valid.eq(~zqcs_executer.done) with m.If(zqcs_executer.done): - m.d.comb += [ - self.cmd.valid.eq(0), - self.cmd.last.eq(1), - ] + m.d.comb += self.cmd.last.eq(1) m.next = "Idle" # Connect sequencer/executer outputs to cmd