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/altera/common: added special AsyncResetSynchronizer based on altera_std_synchronizer_nocut #2056

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
20 changes: 19 additions & 1 deletion litex/build/altera/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,24 @@ def lower(dr):
SDRInput: AlteraSDRInput,
}

# Agilex5 AsyncResetSynchronizer -------------------------------------------------------------------

class Agilex5AsyncResetSynchronizerImpl(Module):
def __init__(self, cd, async_reset):
self.specials += Instance("altera_std_synchronizer_nocut", name=f"ars_cd_{cd.name}_ff0",
p_depth = 3,
p_rst_value = 0,
i_clk = cd.clk,
i_reset_n = Constant(1, 1),
i_din = async_reset,
o_dout = cd.rst,
)

class Agilex5AsyncResetSynchronizer:
@staticmethod
def lower(dr):
return Agilex5AsyncResetSynchronizerImpl(dr.cd, dr.async_reset)

# Agilex5 DDROutput --------------------------------------------------------------------------------

class Agilex5DDROutputImpl(Module):
Expand Down Expand Up @@ -237,7 +255,7 @@ def lower(dr):
# Agilex5 Special Overrides ------------------------------------------------------------------------

agilex5_special_overrides = {
AsyncResetSynchronizer: AlteraAsyncResetSynchronizer,
AsyncResetSynchronizer: Agilex5AsyncResetSynchronizer,
DifferentialInput: AlteraDifferentialInput,
DifferentialOutput: AlteraDifferentialOutput,
DDROutput: Agilex5DDROutput,
Expand Down
Loading