Skip to content

Commit

Permalink
com/liteethmini/phy: remove use of FlipFlop in MII
Browse files Browse the repository at this point in the history
enjoy-digital committed Oct 23, 2015
1 parent 9041868 commit 0607e92
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions misoclib/com/liteethmini/phy/mii.py
Original file line number Diff line number Diff line change
@@ -39,8 +39,10 @@ def __init__(self, pads):

# # #

sop = FlipFlop(reset=1)
self.submodules += sop
sop = Signal(reset=1)
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_description(8))
@@ -52,10 +54,12 @@ def __init__(self, pads):
converter.sink.stb.eq(1),
converter.sink.data.eq(pads.rx_data)
]
self.sync += [
sop_set.eq(~pads.dv),
sop_clr.eq(pads.dv)
]
self.comb += [
sop.reset.eq(~pads.dv),
sop.ce.eq(pads.dv),
converter.sink.sop.eq(sop.q),
converter.sink.sop.eq(sop),
converter.sink.eop.eq(~pads.dv)
]
self.comb += Record.connect(converter.source, source)

0 comments on commit 0607e92

Please sign in to comment.