Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fhdl: TSTriple

  • Loading branch information...
commit 1b18194b1d83345d0d163fd2446ece84917182e8 1 parent dc93a23
Sébastien Bourdeauducq authored February 19, 2013

Showing 1 changed file with 9 additions and 0 deletions. Show diff stats Hide diff stats

  1. 9  migen/fhdl/structure.py
9  migen/fhdl/structure.py
@@ -236,6 +236,15 @@ def __init__(self, target, o, oe, i=None):
236 236
 		self.oe = oe
237 237
 		self.i = i
238 238
 
  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
+
239 248
 # extras
240 249
 
241 250
 class Instance(HUID):

0 notes on commit 1b18194

Please sign in to comment.
Something went wrong with that request. Please try again.