2015-09-12 07:34:07 -04:00
|
|
|
from migen import *
|
2013-02-14 18:17:24 -05:00
|
|
|
from migen.fhdl import verilog
|
|
|
|
|
2015-04-13 14:45:35 -04:00
|
|
|
|
2013-03-12 11:45:28 -04:00
|
|
|
class Example(Module):
|
2015-04-13 14:07:07 -04:00
|
|
|
def __init__(self, n=6):
|
|
|
|
self.pad = Signal(n)
|
|
|
|
self.t = TSTriple(n)
|
|
|
|
self.specials += self.t.get_tristate(self.pad)
|
2013-03-12 11:45:28 -04:00
|
|
|
|
2015-09-12 07:34:07 -04:00
|
|
|
if __name__ == "__main__":
|
|
|
|
e = Example()
|
|
|
|
print(verilog.convert(e, ios={e.pad, e.t.o, e.t.oe, e.t.i}))
|