liteeth/phy/mii: use same code than liteeth_mini
This commit is contained in:
parent
57b671692d
commit
a6415c08b4
|
@ -39,8 +39,10 @@ class LiteEthPHYMIIRX(Module):
|
||||||
|
|
||||||
# # #
|
# # #
|
||||||
|
|
||||||
sop = FlipFlop(reset=1)
|
sop = Signal(reset=1)
|
||||||
self.submodules += sop
|
sop_set = Signal()
|
||||||
|
sop_clr = Signal()
|
||||||
|
self.sync += If(sop_set, sop.eq(1)).Elif(sop_clr, sop.eq(0))
|
||||||
|
|
||||||
converter = Converter(converter_description(4),
|
converter = Converter(converter_description(4),
|
||||||
converter_description(8))
|
converter_description(8))
|
||||||
|
@ -52,10 +54,12 @@ class LiteEthPHYMIIRX(Module):
|
||||||
converter.sink.stb.eq(1),
|
converter.sink.stb.eq(1),
|
||||||
converter.sink.data.eq(pads.rx_data)
|
converter.sink.data.eq(pads.rx_data)
|
||||||
]
|
]
|
||||||
|
self.sync += [
|
||||||
|
sop_set.eq(~pads.dv),
|
||||||
|
sop_clr.eq(pads.dv)
|
||||||
|
]
|
||||||
self.comb += [
|
self.comb += [
|
||||||
sop.reset.eq(~pads.dv),
|
converter.sink.sop.eq(sop),
|
||||||
sop.ce.eq(pads.dv),
|
|
||||||
converter.sink.sop.eq(sop.q),
|
|
||||||
converter.sink.eop.eq(~pads.dv)
|
converter.sink.eop.eq(~pads.dv)
|
||||||
]
|
]
|
||||||
self.comb += Record.connect(converter.source, source)
|
self.comb += Record.connect(converter.source, source)
|
||||||
|
|
Loading…
Reference in New Issue