Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fhdl: TSTriple

  • Loading branch information...
commit 1b18194b1d83345d0d163fd2446ece84917182e8 1 parent dc93a23
@sbourdeauducq sbourdeauducq authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 migen/fhdl/structure.py
View
9 migen/fhdl/structure.py
@@ -236,6 +236,15 @@ def __init__(self, target, o, oe, i=None):
self.oe = oe
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
class Instance(HUID):
Please sign in to comment.
Something went wrong with that request. Please try again.