litex/migen/pytholite/io.py

29 lines
569 B
Python
Raw Normal View History

import ast
2012-11-10 15:51:19 -05:00
from migen.flow.actor import *
from migen.actorlib.sim import *
2012-11-10 15:51:19 -05:00
class Pytholite:
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)
def gen_io(compiler, model, to_model, from_model):
print("model: " + str(model))
print("to_model:")
for arg in to_model:
print(ast.dump(arg))
print("from_model:")
for target, expr in from_model:
print(str(target) + " <= " + ast.dump(expr))
return [], []