Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 2 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
View
2  examples/pytholite/uio.py
@@ -3,7 +3,7 @@
from migen.actorlib.sim import Dumper
from migen.bus import wishbone
from migen.bus.transactions import *
-from migen.uio.ioo import UnifiedIOSimulation
+from migen.genlib.ioo import UnifiedIOSimulation
from migen.pytholite.transel import Register
from migen.pytholite.compiler import make_pytholite
from migen.sim.generic import Simulator
View
3  migen/uio/ioo.py → migen/genlib/ioo.py
@@ -5,7 +5,6 @@
from migen.actorlib.sim import TokenExchanger
from migen.bus import wishbone, memory
from migen.bus.transactions import *
-from migen.uio.trampoline import Trampoline
class UnifiedIOObject(Module):
def __init__(self, dataflow=None, buses={}):
@@ -20,7 +19,7 @@ def __init__(self, dataflow=None, buses={}):
class UnifiedIOSimulation(UnifiedIOObject):
def __init__(self, generator, dataflow=None, buses={}):
- self.generator = Trampoline(generator)
+ self.generator = generator
UnifiedIOObject.__init__(self, dataflow, buses)
callers = []
View
2  migen/pytholite/io.py
@@ -3,7 +3,7 @@
from migen.fhdl.structure import *
from migen.fhdl.specials import Memory
-from migen.uio.ioo import UnifiedIOObject
+from migen.genlib.ioo import UnifiedIOObject
from migen.flow.actor import Source, Sink
from migen.flow.transactions import *
from migen.bus import wishbone
View
0  migen/uio/__init__.py
No changes.
View
23 migen/uio/trampoline.py
@@ -1,23 +0,0 @@
-import types
-
-class Trampoline:
- def __init__(self, g):
- self.stack = [g]
-
- def __iter__(self):
- return self
-
- def __next__(self):
- while True:
- while True:
- try:
- r = next(self.stack[-1])
- break
- except StopIteration:
- self.stack.pop()
- if not self.stack:
- raise
- if isinstance(r, types.GeneratorType):
- self.stack.append(r)
- else:
- return r

No commit comments for this range

Something went wrong with that request. Please try again.