projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37fe6d6
)
flow/hooks/DFGHook: add iterator on hooks
author
Sebastien Bourdeauducq
<sebastien@milkymist.org>
Fri, 3 Aug 2012 16:48:35 +0000
(18:48 +0200)
committer
Sebastien Bourdeauducq
<sebastien@milkymist.org>
Fri, 3 Aug 2012 16:48:35 +0000
(18:48 +0200)
migen/flow/hooks.py
patch
|
blob
|
history
diff --git
a/migen/flow/hooks.py
b/migen/flow/hooks.py
index 9165e641877444ceac6e2804e3828aeb284f1ffb..9272d9be77e9605f3d9dc139c65137cac87cb05b 100644
(file)
--- a/
migen/flow/hooks.py
+++ b/
migen/flow/hooks.py
@@
-37,9
+37,10
@@
class DFGHook:
ep = data["source"]
ep_to_hook[ep] = create(u, ep, v)
- def get_fragment(self):
- frag = Fragment()
+ def hooks_iter(self):
for v1 in self.nodepair_to_ep.values():
for v2 in v1.values():
- frag += v2.get_fragment()
- return frag
+ yield v2
+
+ def get_fragment(self):
+ return sum([h.get_fragment() for h in self.hooks_iter()], Fragment())