mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
fhdl: TSTriple
This commit is contained in:
parent
dc93a231c6
commit
1b18194b1d
1 changed files with 9 additions and 0 deletions
|
@ -236,6 +236,15 @@ class Tristate:
|
||||||
self.oe = oe
|
self.oe = oe
|
||||||
self.i = i
|
self.i = i
|
||||||
|
|
||||||
|
class TSTriple:
|
||||||
|
def __init__(self, bits_sign=None, min=None, max=None, reset_o=0, reset_oe=0):
|
||||||
|
self.o = Signal(bits_sign, min=min, max=max, reset=reset_o)
|
||||||
|
self.oe = Signal(reset=reset_oe)
|
||||||
|
self.i = Signal(bits_sign, min=min, max=max)
|
||||||
|
|
||||||
|
def get_tristate(self, target):
|
||||||
|
return Tristate(target, self.o, self.oe, self.i)
|
||||||
|
|
||||||
# extras
|
# extras
|
||||||
|
|
||||||
class Instance(HUID):
|
class Instance(HUID):
|
||||||
|
|
Loading…
Reference in a new issue