From ca82b03e35ca6c66850badb285e4c5965677b2fb Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 27 Apr 2021 18:04:06 +0200 Subject: [PATCH] mac/LiteEthMACCoreCrossbar: Simplify. --- liteeth/mac/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/liteeth/mac/__init__.py b/liteeth/mac/__init__.py index d408d1e..42cc993 100644 --- a/liteeth/mac/__init__.py +++ b/liteeth/mac/__init__.py @@ -159,24 +159,22 @@ class LiteEthMACCoreCrossbar(Module): self.submodules.tx_arbiter_fsm = fsm = FSM(reset_state="IDLE") fsm.act("IDLE", If(self.tx_pipe.source.valid, - self.tx_pipe.source.connect(core.sink), NextState("WISHBONE") ).Else( If(self.packetizer.source.valid, - self.packetizer.source.connect(core.sink), NextState("CROSSBAR") ) ), ) fsm.act("WISHBONE", self.tx_pipe.source.connect(core.sink), - If(self.tx_pipe.source.valid & core.sink.ready & self.tx_pipe.source.last, + If(core.sink.valid & core.sink.ready & core.sink.last, NextState("IDLE") ), ) fsm.act("CROSSBAR", self.packetizer.source.connect(core.sink), - If(self.packetizer.source.valid & core.sink.ready & self.packetizer.source.last, + If(core.sink.valid & core.sink.ready & core.sink.last, NextState("IDLE") ), )