Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: efinix: common.py; add SDRInput #2081

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions litex/build/efinix/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,34 @@ class EfinixDDROutput:
def lower(dr):
return EfinixDDROutputImpl(dr.platform, dr.i1, dr.i2, dr.o, dr.clk)

# Efinix SDRInput ----------------------------------------------------------------------------------

class EfinixSDRInputImpl(Module):
def __init__(self, platform, i, o, clk):
io_name = platform.get_pin_name(i)
io_pad = platform.get_pin_location(i)
io_prop = platform.get_pin_properties(i)
io_data = platform.add_iface_io(io_name)
self.comb += o.eq(io_data)
block = {
"type" : "GPIO",
"mode" : "INPUT",
"name" : io_name,
"location" : io_pad,
"properties" : io_prop,
"size" : 1,
"in_reg" : "REG",
"in_clk_pin" : clk.name_override, # FIXME.
"in_clk_inv" : 0
}
platform.toolchain.ifacewriter.blocks.append(block)
platform.toolchain.excluded_ios.append(platform.get_pin(i))

class EfinixSDRInput:
@staticmethod
def lower(dr):
return EfinixSDRInputImpl(dr.platform, dr.i, dr.o, dr.clk)

# Efinix DDRInput ----------------------------------------------------------------------------------

class EfinixDDRInputImpl(Module):
Expand Down Expand Up @@ -447,6 +475,7 @@ def lower(dr):
DifferentialOutput : EfinixDifferentialOutput,
DifferentialInput : EfinixDifferentialInput,
SDROutput : EfinixSDROutput,
SDRInput : EfinixSDRInput,
SDRTristate : EfinixSDRTristate,
DDROutput : EfinixDDROutput,
DDRInput : EfinixDDRInput,
Expand Down
Loading