lib.io: lower to platform-independent tristate buffer.
This commit is contained in:
parent
011bf2258e
commit
6f66885c09
3 changed files with 37 additions and 1 deletions
12
examples/tbuf.py
Normal file
12
examples/tbuf.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
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__":
|
||||
main(m.lower(platform=None), ports=[pin, pin_t.oe, pin_t.i, pin_t.o])
|
||||
Loading…
Add table
Add a link
Reference in a new issue