litex/examples/basic/tristate.py

13 lines
269 B
Python
Raw Normal View History

2013-02-14 18:17:24 -05:00
from migen.fhdl.structure import *
2013-02-22 11:56:35 -05:00
from migen.fhdl.specials import Tristate
2013-02-14 18:17:24 -05:00
from migen.fhdl import verilog
n = 6
pad = Signal(n)
o = Signal(n)
oe = Signal()
i = Signal(n)
2013-02-22 11:56:35 -05:00
f = Fragment(specials={Tristate(pad, o, oe, i)})
2013-02-14 18:17:24 -05:00
print(verilog.convert(f, ios={pad, o, oe, i}))