Skip to content

Commit

Permalink
sim: generators are also iterables...
Browse files Browse the repository at this point in the history
sbourdeauducq committed Oct 19, 2015
1 parent 02d804f commit 1f89900
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion migen/sim/core.py
Original file line number Diff line number Diff line change
@@ -211,7 +211,8 @@ def __init__(self, fragment_or_module, generators, clocks={"sys": 10}, vcd_name=
generators = {"sys": generators}
self.generators = dict()
for k, v in generators.items():
if isinstance(v, collections.Iterable):
if (isinstance(v, collections.Iterable)
and not isinstance(v, collections.Generator)):
self.generators[k] = list(v)
else:
self.generators[k] = [v]

0 comments on commit 1f89900

Please sign in to comment.