soc/interconnect/stream: Add Delay module.

This commit is contained in:
Florent Kermarrec 2024-09-23 12:23:29 +02:00
parent b2f63b37cc
commit c95a6e041c
1 changed files with 13 additions and 0 deletions

View File

@ -850,6 +850,19 @@ class Buffer(LiteXModule):
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 ---------------------------------------------------------------------------------------------
class Cast(CombinatorialActor):