From c3d7b98b4372cdbee3af4f0e494753c5d17fd14c Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 15 Jan 2012 17:46:15 +0100 Subject: [PATCH] dma_wishbone: small syntax simplification thanks to None statements --- migen/actorlib/dma_wishbone.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/migen/actorlib/dma_wishbone.py b/migen/actorlib/dma_wishbone.py index 3bf3ff8c9..ac6704f04 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))