def add_clock_constraint(self, clock, frequency):
super().add_clock_constraint(clock, frequency)
- # Make sure the net constrained in the SDC file is kept through synthesis; it is redundant
- # after Quartus flattens the hierarchy and will be eliminated if not explicitly kept.
clock.attrs["keep"] = 1
# The altiobuf_* and altddio_* primitives are explained in the following Intel documents:
[ -n "${{platform._toolchain_env_var}}" ] && . "${{platform._toolchain_env_var}}"
{{emit_commands("sh")}}
""",
+ # Vivado doesn't like constructs like (* keep = 32'd1 *), even though they mean the same
+ # thing as (* keep = 1 *); use -decimal to work around that.
"{{name}}.v": r"""
/* {{autogenerated}} */
- {{emit_verilog()}}
+ {{emit_verilog(["-decimal"])}}
""",
"{{name}}.debug.v": r"""
/* {{autogenerated}} */
- {{emit_debug_verilog()}}
+ {{emit_debug_verilog(["-decimal"])}}
""",
"{{name}}.tcl": r"""
# {{autogenerated}}
m.submodules.reset_sync = ResetSynchronizer(rst_i, domain="sync")
return m
+ def add_clock_constraint(self, clock, frequency):
+ super().add_clock_constraint(clock, frequency)
+ clock.attrs["keep"] = 1
+
def _get_xdr_buffer(self, m, pin, *, i_invert=False, o_invert=False):
def get_dff(clk, d, q):
# SDR I/O is performed by packing a flip-flop into the pad IOB.
[ -n "${{platform._toolchain_env_var}}" ] && . "${{platform._toolchain_env_var}}"
{{emit_commands("sh")}}
""",
+ # Vivado doesn't like constructs like (* keep = 32'd1 *), even though they mean the same
+ # thing as (* keep = 1 *); use -decimal to work around that.
"{{name}}.v": r"""
/* {{autogenerated}} */
- {{emit_verilog()}}
+ {{emit_verilog(["-decimal"])}}
""",
"{{name}}.debug.v": r"""
/* {{autogenerated}} */
- {{emit_debug_verilog()}}
+ {{emit_debug_verilog(["-decimal"])}}
""",
"{{name}}.tcl": r"""
# {{autogenerated}}
m.submodules.reset_sync = ResetSynchronizer(rst_i, domain="sync")
return m
+ def add_clock_constraint(self, clock, frequency):
+ super().add_clock_constraint(clock, frequency)
+ clock.attrs["keep"] = 1
+
def _get_xdr_buffer(self, m, pin, *, i_invert=False, o_invert=False):
def get_dff(clk, d, q):
# SDR I/O is performed by packing a flip-flop into the pad IOB.