Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fhdl/autofragment: from_attributes

  • Loading branch information...
commit 63d399b6adbd3feb410127f48a15d9195fcac396 1 parent 7ff61d8
Sébastien Bourdeauducq authored February 11, 2013

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. 7  migen/fhdl/autofragment.py
7  migen/fhdl/autofragment.py
@@ -11,3 +11,10 @@ def from_local():
11 11
 		if hasattr(obj, "get_fragment"):
12 12
 			f += obj.get_fragment()
13 13
 	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 notes on commit 63d399b

Please sign in to comment.
Something went wrong with that request. Please try again.