From: Sebastien Bourdeauducq Date: Sun, 15 Jan 2012 16:46:15 +0000 (+0100) Subject: dma_wishbone: small syntax simplification thanks to None statements X-Git-Tag: 24jan2021_ls180~2099^2~1076 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c3d7b98b4372cdbee3af4f0e494753c5d17fd14c;p=litex.git dma_wishbone: small syntax simplification thanks to None statements --- diff --git a/migen/actorlib/dma_wishbone.py b/migen/actorlib/dma_wishbone.py index 3bf3ff8c..ac6704f0 100644 --- a/migen/actorlib/dma_wishbone.py +++ b/migen/actorlib/dma_wishbone.py @@ -70,11 +70,10 @@ class Reader(Actor): self.bus.stb_o.eq(1), ob_stbs[w].eq(1), If(self.bus.ack_i, - fsm.next_state(next_state) + fsm.next_state(next_state), + ag_inc.eq(1) if nwords > 1 else None ) ) - if nwords > 1: - fsm.act(state, If(self.bus.ack_i, ag_inc.eq(1))) fsm.act(fsm.STROBE, self.endpoints["data"].stb.eq(1), If(self.endpoints["data"].ack, fsm.next_state(fsm.IDLE))