Skip to content

Commit

Permalink
interconnect/stream: Fix #1736.
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Aug 28, 2023
1 parent 70e52b7 commit 82602f6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions litex/soc/interconnect/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,8 @@ def do_finalize(self):
class BufferizeEndpoints(ModuleTransformer):
def __init__(self, endpoint_dict, pipe_valid=True, pipe_ready=False):
self.endpoint_dict = endpoint_dict
self.pipe_valid = pipe_valid
self.pipe_ready = pipe_ready

def transform_instance(self, submodule):
for name, direction in self.endpoint_dict.items():
Expand All @@ -995,8 +997,8 @@ def transform_instance(self, submodule):
if direction == DIR_SINK:
buf = Buffer(
layout = endpoint.description,
pipe_valid = pipe_valid,
pipe_ready = pipe_ready,
pipe_valid = self.pipe_valid,
pipe_ready = self.pipe_ready,
)
submodule.submodules += buf
setattr(submodule, name, buf.sink)
Expand All @@ -1005,8 +1007,8 @@ def transform_instance(self, submodule):
elif direction == DIR_SOURCE:
buf = Buffer(
layout = endpoint.description,
pipe_valid = pipe_valid,
pipe_ready = pipe_ready,
pipe_valid = self.pipe_valid,
pipe_ready = self.pipe_ready,
)
submodule.submodules += buf
submodule.comb += endpoint.connect(buf.sink)
Expand Down

0 comments on commit 82602f6

Please sign in to comment.