Skip to content

Commit ba78ce1

Browse files
committed
connect_same_name is updated for tuple and list.
1 parent f1ec45e commit ba78ce1

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

veriloggen/lib/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@
1414
## Please add import notations here for additional library
1515
from bundle import Bundle
1616
from fsm import FSM
17-
from pipeline import Pipeline
1817
import simulation
1918

veriloggen/module.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,5 +442,10 @@ def __call__(self, false_scope):
442442

443443
#-------------------------------------------------------------------------------
444444
def connect_same_name(*args):
445-
return [ (a.name, a) for a in args ]
446-
445+
ret = []
446+
for arg in args:
447+
if isinstance(arg, (list, tuple)):
448+
ret.extend([ (a.name, a) for a in arg ])
449+
else:
450+
ret.append( (arg.name, arg) )
451+
return ret

0 commit comments

Comments
 (0)