Skip to content

Commit 247cbe2

Browse files
committedJul 6, 2017
Record: pass kwargs to inner Signals
1 parent d8b55c7 commit 247cbe2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎migen/genlib/record.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def layout_partial(layout, *elements):
8686

8787

8888
class Record:
89-
def __init__(self, layout, name=None):
89+
def __init__(self, layout, name=None, **kwargs):
9090
self.name = get_obj_var_name(name, "")
9191
self.layout = layout
9292

@@ -100,10 +100,10 @@ def __init__(self, layout, name=None):
100100
fname, fsize, fdirection = f
101101
else:
102102
fname, fsize = f
103-
finst = Signal(fsize, name=prefix + fname)
103+
finst = Signal(fsize, name=prefix + fname, **kwargs)
104104
elif isinstance(f[1], list): # case 3
105105
fname, fsublayout = f
106-
finst = Record(fsublayout, prefix + fname)
106+
finst = Record(fsublayout, prefix + fname, **kwargs)
107107
else:
108108
raise TypeError
109109
setattr(self, fname, finst)

0 commit comments

Comments
 (0)
Please sign in to comment.