Skip to content
Permalink
Browse files
fhdl: TSTriple
  • Loading branch information
Sebastien Bourdeauducq committed Feb 19, 2013
1 parent dc93a23 commit 1b18194b1d83345d0d163fd2446ece84917182e8
Showing with 9 additions and 0 deletions.
  1. +9 −0 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):

0 comments on commit 1b18194

Please sign in to comment.