core/icmp/LiteEthICMPTX: Move datapath outside of FSM (minor logic optimization).
This commit is contained in:
parent
43a2ea8118
commit
a12d3991e5
|
@ -46,11 +46,14 @@ class LiteEthICMPTX(Module):
|
||||||
NextState("SEND")
|
NextState("SEND")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
fsm.act("SEND",
|
self.comb += [
|
||||||
packetizer.source.connect(source),
|
packetizer.source.connect(source, omit={"valid", "ready"}),
|
||||||
source.length.eq(sink.length + icmp_header.length),
|
source.length.eq(sink.length + icmp_header.length),
|
||||||
source.protocol.eq(icmp_protocol),
|
source.protocol.eq(icmp_protocol),
|
||||||
source.ip_address.eq(sink.ip_address),
|
source.ip_address.eq(sink.ip_address),
|
||||||
|
]
|
||||||
|
fsm.act("SEND",
|
||||||
|
packetizer.source.connect(source, keep={"valid", "ready"}),
|
||||||
If(source.valid & source.last & source.ready,
|
If(source.valid & source.last & source.ready,
|
||||||
NextState("IDLE")
|
NextState("IDLE")
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue