soc/interconnect/stream: Add Delay module.
This commit is contained in:
parent
b2f63b37cc
commit
c95a6e041c
|
@ -850,6 +850,19 @@ class Buffer(LiteXModule):
|
||||||
source
|
source
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Delay --------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class Delay(LiteXModule):
|
||||||
|
def __init__(self, layout, n):
|
||||||
|
self.sink = sink = Endpoint(layout)
|
||||||
|
self.source = source = Endpoint(layout)
|
||||||
|
|
||||||
|
# # #
|
||||||
|
|
||||||
|
buffers = [Buffer(layout, pipe_valid=True, pipe_ready=False) for _ in range(n)]
|
||||||
|
self.submodules += buffers
|
||||||
|
self.submodules += Pipeline(sink, *buffers, source)
|
||||||
|
|
||||||
# Cast ---------------------------------------------------------------------------------------------
|
# Cast ---------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
class Cast(CombinatorialActor):
|
class Cast(CombinatorialActor):
|
||||||
|
|
Loading…
Reference in New Issue