Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kestrel Collaboration
Kestrel LiteX
migen
Commits
247cbe2e
Commit
247cbe2e
authored
7 years ago
by
Robert Jordens
Browse files
Options
Download
Email Patches
Plain Diff
Record: pass kwargs to inner Signals
parent
d8b55c7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
migen/genlib/record.py
migen/genlib/record.py
+3
-3
No files found.
migen/genlib/record.py
View file @
247cbe2e
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment