amaranth/examples/tbuf.py

13 lines
220 B
Python
Raw Normal View History

from nmigen import *
from nmigen.cli import main
pin = Signal()
pin_t = TSTriple()
m = Module()
m.submodules += pin_t.get_tristate(pin)
if __name__ == "__main__":
2019-01-26 09:25:05 -07:00
main(m, ports=[pin, pin_t.oe, pin_t.i, pin_t.o])