Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fhdl: TSTriple
  • Loading branch information
Sebastien Bourdeauducq committed Feb 19, 2013
1 parent dc93a23 commit 1b18194
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions migen/fhdl/structure.py
Expand Up @@ -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):
Expand Down

0 comments on commit 1b18194

Please sign in to comment.