mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
litescope/core/port: fix LiteScopeEdgeDetector (refactoring issues)
This commit is contained in:
parent
f3d68a54d5
commit
fd31e6ae61
1 changed files with 11 additions and 11 deletions
|
@ -77,22 +77,22 @@ class LiteScopeEdgeDetectorUnit(Module):
|
||||||
|
|
||||||
# # #
|
# # #
|
||||||
|
|
||||||
self.buffer = Buffer(self.sink.description)
|
self.submodules.buffer = Buffer(self.sink.description)
|
||||||
self.comb += Record.connect(self.sink, self.buffer.sink)
|
self.comb += Record.connect(self.sink, self.buffer.d)
|
||||||
|
|
||||||
rising = Signal(dw)
|
rising = Signal(dw)
|
||||||
rising.eq(self.rising_mask & sink.data & ~self.buffer.source.data)
|
rising.eq(self.rising_mask & sink.data & ~self.buffer.q.data)
|
||||||
|
|
||||||
falling = Signal(dw)
|
falling = Signal(dw)
|
||||||
falling.eq(self.falling_mask & sink.data & ~self.buffer.source.data)
|
falling.eq(self.falling_mask & ~sink.data & self.buffer.q.data)
|
||||||
|
|
||||||
both = Signal(dw)
|
both = Signal(dw)
|
||||||
both.eq(self.both_mask & sink.data & ~self.buffer.source.data)
|
both.eq(self.both_mask & (rising | falling))
|
||||||
|
|
||||||
self.comb += [
|
self.comb += [
|
||||||
source.stb.eq(sink.stb & self.buffer.source.stb),
|
source.stb.eq(sink.stb & self.buffer.q.stb),
|
||||||
self.buffer.source.ack.eq(source.ack),
|
self.buffer.q.ack.eq(source.ack),
|
||||||
source.hit.eq(rising | falling | both)
|
source.hit.eq((rising | falling | both) != 0)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ class LiteScopeEdgeDetector(LiteScopeEdgeDetectorUnit, AutoCSR):
|
||||||
# # #
|
# # #
|
||||||
|
|
||||||
self.comb += [
|
self.comb += [
|
||||||
self.rising.eq(self._rising.storage),
|
self.rising_mask.eq(self._rising.storage),
|
||||||
self.falling.eq(self._falling.storage),
|
self.falling_mask.eq(self._falling.storage),
|
||||||
self.both.eq(self._both.storage)
|
self.both_mask.eq(self._both.storage)
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue