sim: accept iterables as generator list
authorSebastien Bourdeauducq <sb@m-labs.hk>
Mon, 19 Oct 2015 11:18:17 +0000 (19:18 +0800)
committerSebastien Bourdeauducq <sb@m-labs.hk>
Mon, 19 Oct 2015 11:18:17 +0000 (19:18 +0800)
migen/sim/core.py

index 4c30c39a656ea801151e747f6bdf759296ffcc25..b036dbe2c70bf933e7b3a6baca010412a189ee42 100644 (file)
@@ -211,8 +211,8 @@ class Simulator:
             generators = {"sys": generators}
         self.generators = dict()
         for k, v in generators.items():
-            if isinstance(v, list):
-                self.generators[k] = v
+            if isinstance(v, collections.Iterable):
+                self.generators[k] = list(v)
             else:
                 self.generators[k] = [v]