from migen.pytholite.reg import *
from migen.pytholite.expr import *
from migen.pytholite import transel
-from migen.pytholite.io import make_io_object, gen_io
+from migen.pytholite.io import Pytholite, gen_io
from migen.pytholite.fsm import *
def _is_name_used(node, name):
raise NotImplementedError
def make_pytholite(func, **ioresources):
- ioo = make_io_object(**ioresources)
+ ioo = Pytholite(**ioresources)
tree = ast.parse(inspect.getsource(func))
symdict = func.__globals__.copy()
import ast
from migen.fhdl.structure import *
-from migen.flow.actor import *
+from migen.uio.ioo import UnifiedIOObject
from migen.actorlib.sim import *
+from migen.bus.transactions import *
from migen.pytholite.fsm import *
from migen.pytholite.expr import ExprCompiler
-class Pytholite:
+class Pytholite(UnifiedIOObject):
def get_fragment(self):
return self.fragment
-class DFPytholite(Pytholite, Actor):
- pass
-
-def make_io_object(dataflow=None):
- if dataflow is None:
- return Pytholite()
- else:
- return DFPytholite(*dataflow)
-
class _TokenPullExprCompiler(ExprCompiler):
def __init__(self, symdict, modelname, ep):
super().__init__(symdict)
--- /dev/null
+from migen.fhdl.structure import *
+from migen.flow.actor import *
+from migen.bus import wishbone
+
+class UnifiedIOObject(Actor):
+ def __init__(self, dataflow=None, buses={}):
+ if dataflow is not None:
+ super().__init__(*dataflow)
+ self.buses = buses