build: io: make oe2 of DDRTristate optional

make oe2 of DDRTristate optional.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
This commit is contained in:
Fin Maaß 2024-09-12 09:48:15 +02:00
parent abc8f9bdf0
commit 37ac79b93e
No known key found for this signature in database
4 changed files with 6 additions and 5 deletions

View File

@ -252,7 +252,7 @@ class EfinixDifferentialInput:
class EfinixDDRTristateImpl(Module):
def __init__(self, platform, io, o1, o2, oe1, oe2, i1, i2, clk):
assert oe1 == oe2
assert oe2 is None
io_name = platform.get_pin_name(io)
io_pad = platform.get_pin_location(io)
io_prop = platform.get_pin_properties(io)

View File

@ -184,12 +184,12 @@ class InferedDDRTristate(Module):
_oe = Signal()
_i = Signal()
self.specials += DDROutput(o1, o2, _o, clk)
self.specials += DDROutput(oe1, oe2, _oe, clk)
self.specials += DDROutput(oe1, oe2, _oe, clk) if oe2 is not None else SDROutput(oe1, _oe, clk)
self.specials += DDRInput(_i, i1, i2, clk)
self.specials += Tristate(io, _o, _oe, _i)
class DDRTristate(Special):
def __init__(self, io, o1, o2, oe1, oe2, i1, i2, clk=ClockSignal()):
def __init__(self, io, o1, o2, oe1, oe2=None, i1=Signal(), i2=Signal(), clk=ClockSignal()):
Special.__init__(self)
self.io = io
self.o1 = o1

View File

@ -305,11 +305,12 @@ class LatticeNXDDROutput:
class LatticeNXDDRTristateImpl(Module):
def __init__(self, io, o1, o2, oe1, oe2, i1, i2, clk):
assert oe2 is None
_o = Signal()
_oe = Signal()
_i = Signal()
self.specials += DDROutput(o1, o2, _o, clk)
self.specials += SDROutput(oe1 | oe2, _oe, clk)
self.specials += SDROutput(oe1, _oe, clk)
self.specials += DDRInput(_i, i1, i2, clk)
self.specials += Tristate(io, _o, _oe, _i)
_oe.attr.add("syn_useioff")

View File

@ -164,7 +164,7 @@ class XilinxDDRTristateImpl(Module):
_oe_n = Signal()
_i = Signal()
self.specials += DDROutput(o1, o2, _o, clk)
self.specials += DDROutput(~oe1, ~oe2, _oe_n, clk)
self.specials += DDROutput(~oe1, ~oe2, _oe_n, clk) if oe2 is not None else SDROutput(~oe1, _oe_n, clk)
self.specials += DDRInput(_i, i1, i2, clk)
self.specials += Instance("IOBUF",
io_IO = io,