Skip to content

Commit 63d399b

Browse files
author
Sebastien Bourdeauducq
committedFeb 11, 2013
fhdl/autofragment: from_attributes
1 parent 7ff61d8 commit 63d399b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎migen/fhdl/autofragment.py

+7
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,10 @@ def from_local():
1111
if hasattr(obj, "get_fragment"):
1212
f += obj.get_fragment()
1313
return f
14+
15+
def from_attributes(obj):
16+
f = Fragment()
17+
for x in obj.__dict__.values():
18+
if hasattr(x, "get_fragment"):
19+
f += x.get_fragment()
20+
return f

0 commit comments

Comments
 (0)
Please sign in to comment.