Commit 4eca436c authored by whitequark's avatar whitequark
Browse files

fhdl/specials: allow passing name hint to TSTriple.

This makes for significantly more legible PNR reports in cases where
TSTriples are being generated automatically, like in Glasgow.
parent b5d723bb
...@@ -109,10 +109,14 @@ class Tristate(Special): ...@@ -109,10 +109,14 @@ class Tristate(Special):
class TSTriple: class TSTriple:
def __init__(self, bits_sign=None, min=None, max=None, reset_o=0, reset_oe=0, reset_i=0): def __init__(self, bits_sign=None, min=None, max=None, reset_o=0, reset_oe=0, reset_i=0,
self.o = Signal(bits_sign, min=min, max=max, reset=reset_o) name=None):
self.oe = Signal(reset=reset_oe) self.o = Signal(bits_sign, min=min, max=max, reset=reset_o,
self.i = Signal(bits_sign, min=min, max=max, reset=reset_i) name=None if name is None else name + "_o")
self.oe = Signal(reset=reset_oe,
name=None if name is None else name + "_oe")
self.i = Signal(bits_sign, min=min, max=max, reset=reset_i,
name=None if name is None else name + "_i")
def get_tristate(self, target): def get_tristate(self, target):
return Tristate(target, self.o, self.oe, self.i) return Tristate(target, self.o, self.oe, self.i)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment