Skip to content

Commit

Permalink
soc/interconnect/stream: Add Delay module.
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Sep 23, 2024
1 parent b2f63b3 commit c95a6e0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions litex/soc/interconnect/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,19 @@ def __init__(self, layout, pipe_valid=True, pipe_ready=False):
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):
Expand Down

0 comments on commit c95a6e0

Please sign in to comment.