interconnect/stream/Pipeline: Finalize Pipeline if modules are provided during __init__ (for retro-compatibility).
This commit is contained in:
parent
2a27ca18ea
commit
93b45a687f
|
@ -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 New Issue