mac/LiteEthMACCoreCrossbar: Simplify.
This commit is contained in:
parent
392414eef8
commit
ca82b03e35
|
@ -159,24 +159,22 @@ class LiteEthMACCoreCrossbar(Module):
|
||||||
self.submodules.tx_arbiter_fsm = fsm = FSM(reset_state="IDLE")
|
self.submodules.tx_arbiter_fsm = fsm = FSM(reset_state="IDLE")
|
||||||
fsm.act("IDLE",
|
fsm.act("IDLE",
|
||||||
If(self.tx_pipe.source.valid,
|
If(self.tx_pipe.source.valid,
|
||||||
self.tx_pipe.source.connect(core.sink),
|
|
||||||
NextState("WISHBONE")
|
NextState("WISHBONE")
|
||||||
).Else(
|
).Else(
|
||||||
If(self.packetizer.source.valid,
|
If(self.packetizer.source.valid,
|
||||||
self.packetizer.source.connect(core.sink),
|
|
||||||
NextState("CROSSBAR")
|
NextState("CROSSBAR")
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
fsm.act("WISHBONE",
|
fsm.act("WISHBONE",
|
||||||
self.tx_pipe.source.connect(core.sink),
|
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")
|
NextState("IDLE")
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
fsm.act("CROSSBAR",
|
fsm.act("CROSSBAR",
|
||||||
self.packetizer.source.connect(core.sink),
|
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")
|
NextState("IDLE")
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue