From: Florent Kermarrec Date: Wed, 25 Feb 2015 16:47:44 +0000 (+0100) Subject: phy/sim: generate sop/eop X-Git-Tag: 24jan2021_ls180~2604^2~1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eef679b6d4a9c66d1e56e5643374c0156dc4e495;p=litex.git phy/sim: generate sop/eop --- diff --git a/liteeth/phy/sim.py b/liteeth/phy/sim.py index 3d9174cb..f7069dd9 100644 --- a/liteeth/phy/sim.py +++ b/liteeth/phy/sim.py @@ -26,11 +26,18 @@ class LiteEthPHYSim(Module, AutoCSR): self.submodules.crg = LiteEthPHYSimCRG() self.sink = sink = Sink(eth_phy_description(8)) self.source = source = Source(eth_phy_description(8)) + self.comb += [ pads.source_stb.eq(self.sink.stb), pads.source_data.eq(self.sink.data), - self.sink.ack.eq(1), + self.sink.ack.eq(1) + ] + self.sync += [ self.source.stb.eq(pads.sink_stb), - self.source.data.eq(pads.sink_data) + self.source.sop.eq(pads.sink_stb & ~self.source.stb), + self.source.data.eq(pads.sink_data), + ] + self.comb += [ + self.source.eop.eq(~pads.sink_stb & self.source.stb), ]