Commit 247cbe2e authored by Robert Jordens's avatar Robert Jordens
Browse files

Record: pass kwargs to inner Signals

parent d8b55c7f
...@@ -86,7 +86,7 @@ def layout_partial(layout, *elements): ...@@ -86,7 +86,7 @@ def layout_partial(layout, *elements):
class Record: class Record:
def __init__(self, layout, name=None): def __init__(self, layout, name=None, **kwargs):
self.name = get_obj_var_name(name, "") self.name = get_obj_var_name(name, "")
self.layout = layout self.layout = layout
...@@ -100,10 +100,10 @@ class Record: ...@@ -100,10 +100,10 @@ class Record:
fname, fsize, fdirection = f fname, fsize, fdirection = f
else: else:
fname, fsize = f fname, fsize = f
finst = Signal(fsize, name=prefix + fname) finst = Signal(fsize, name=prefix + fname, **kwargs)
elif isinstance(f[1], list): # case 3 elif isinstance(f[1], list): # case 3
fname, fsublayout = f fname, fsublayout = f
finst = Record(fsublayout, prefix + fname) finst = Record(fsublayout, prefix + fname, **kwargs)
else: else:
raise TypeError raise TypeError
setattr(self, fname, finst) setattr(self, fname, finst)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment