Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fhdl/autofragment: from_attributes

  • Loading branch information...
commit 63d399b6adbd3feb410127f48a15d9195fcac396 1 parent 7ff61d8
@sbourdeauducq sbourdeauducq authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 migen/fhdl/autofragment.py
View
7 migen/fhdl/autofragment.py
@@ -11,3 +11,10 @@ def from_local():
if hasattr(obj, "get_fragment"):
f += obj.get_fragment()
return f
+
+def from_attributes(obj):
+ f = Fragment()
+ for x in obj.__dict__.values():
+ if hasattr(x, "get_fragment"):
+ f += x.get_fragment()
+ return f
Please sign in to comment.
Something went wrong with that request. Please try again.