Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib.io: lower to platform-independent tristate buffer.
- Loading branch information
whitequark
committed
Jan 14, 2019
1 parent
011bf22
commit 6f66885
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ | |
from .hdl.xfrm import ResetInserter, CEInserter | ||
|
||
from .lib.cdc import MultiReg | ||
from .lib.io import TSTriple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters