mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
interconnect/stream/Pipeline: Finalize Pipeline if modules are provided during __init__ (for retro-compatibility).
This commit is contained in:
parent
2a27ca18ea
commit
93b45a687f
1 changed files with 3 additions and 0 deletions
|
@ -941,8 +941,11 @@ class Pack(Module):
|
|||
class Pipeline(Module):
|
||||
def __init__(self, *modules):
|
||||
self.modules = list(modules)
|
||||
if len(self.modules):
|
||||
self.finalize()
|
||||
|
||||
def add(self, module):
|
||||
assert not self.finalized
|
||||
self.modules.append(module)
|
||||
|
||||
def do_finalize(self):
|
||||
|
|
Loading…
Reference in a new issue