Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 5 files changed
  • 0 comments
  • 1 contributor
2  examples/pytholite/uio.py
@@ -3,7 +3,7 @@
3 3
 from migen.actorlib.sim import Dumper
4 4
 from migen.bus import wishbone
5 5
 from migen.bus.transactions import *
6  
-from migen.uio.ioo import UnifiedIOSimulation
  6
+from migen.genlib.ioo import UnifiedIOSimulation
7 7
 from migen.pytholite.transel import Register
8 8
 from migen.pytholite.compiler import make_pytholite
9 9
 from migen.sim.generic import Simulator
3  migen/uio/ioo.py → migen/genlib/ioo.py
@@ -5,7 +5,6 @@
5 5
 from migen.actorlib.sim import TokenExchanger
6 6
 from migen.bus import wishbone, memory
7 7
 from migen.bus.transactions import *
8  
-from migen.uio.trampoline import Trampoline
9 8
 
10 9
 class UnifiedIOObject(Module):
11 10
 	def __init__(self, dataflow=None, buses={}):
@@ -20,7 +19,7 @@ def __init__(self, dataflow=None, buses={}):
20 19
 
21 20
 class UnifiedIOSimulation(UnifiedIOObject):
22 21
 	def __init__(self, generator, dataflow=None, buses={}):
23  
-		self.generator = Trampoline(generator)
  22
+		self.generator = generator
24 23
 		UnifiedIOObject.__init__(self, dataflow, buses)
25 24
 		
26 25
 		callers = []
2  migen/pytholite/io.py
@@ -3,7 +3,7 @@
3 3
 
4 4
 from migen.fhdl.structure import *
5 5
 from migen.fhdl.specials import Memory
6  
-from migen.uio.ioo import UnifiedIOObject
  6
+from migen.genlib.ioo import UnifiedIOObject
7 7
 from migen.flow.actor import Source, Sink
8 8
 from migen.flow.transactions import *
9 9
 from migen.bus import wishbone
0  migen/uio/__init__.py
No changes.
23  migen/uio/trampoline.py
... ...
@@ -1,23 +0,0 @@
1  
-import types
2  
-
3  
-class Trampoline:
4  
-	def __init__(self, g):
5  
-		self.stack = [g]
6  
-	
7  
-	def __iter__(self):
8  
-		return self
9  
-	
10  
-	def __next__(self):
11  
-		while True:
12  
-			while True:
13  
-				try:
14  
-					r = next(self.stack[-1])
15  
-					break
16  
-				except StopIteration:
17  
-					self.stack.pop()
18  
-					if not self.stack:
19  
-						raise
20  
-			if isinstance(r, types.GeneratorType):
21  
-				self.stack.append(r)
22  
-			else:
23  
-				return r

No commit comments for this range

Something went wrong with that request. Please try again.