dma_wishbone: small syntax simplification thanks to None statements

This commit is contained in:
Sebastien Bourdeauducq 2012-01-15 17:46:15 +01:00
parent aa8b8da684
commit c3d7b98b43
1 changed files with 2 additions and 3 deletions

View File

@ -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))