Skip to content

Commit 1b18194

Browse files
author
Sebastien Bourdeauducq
committedFeb 19, 2013
fhdl: TSTriple
1 parent dc93a23 commit 1b18194

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎migen/fhdl/structure.py

+9
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,15 @@ def __init__(self, target, o, oe, i=None):
236236
self.oe = oe
237237
self.i = i
238238

239+
class TSTriple:
240+
def __init__(self, bits_sign=None, min=None, max=None, reset_o=0, reset_oe=0):
241+
self.o = Signal(bits_sign, min=min, max=max, reset=reset_o)
242+
self.oe = Signal(reset=reset_oe)
243+
self.i = Signal(bits_sign, min=min, max=max)
244+
245+
def get_tristate(self, target):
246+
return Tristate(target, self.o, self.oe, self.i)
247+
239248
# extras
240249

241250
class Instance(HUID):

0 commit comments

Comments
 (0)
Please sign in to comment.