# SPDX-License-Identifier: MIT
#
# Copyright (c) 2025-2026 FPGA Ninja, LLC
#
# Authors:
# - Alex Forencich
#

# XDC constraints for the Xilinx Alveo AU200/AU250/VCU1525
# AU200 part: xcu200-fsgd2104-2-e
# AU250 part: xcu250-figd2104-2-e
# VCU1525 part: xcvu9p-fsgd2104-2L-e

# 300 MHz (DDR C0)
set_property -dict {LOC AY37 IOSTANDARD LVDS} [get_ports clk_ddr4_c0_p]
set_property -dict {LOC AY38 IOSTANDARD LVDS} [get_ports clk_ddr4_c0_n]
#create_clock -period 3.333 -name clk_ddr4_c0 [get_ports clk_ddr4_c0_p]

# DDR4 C0
set_property -dict {LOC AT36 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_adr[0]}]
set_property -dict {LOC AV36 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_adr[1]}]
set_property -dict {LOC AV37 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_adr[2]}]
set_property -dict {LOC AW35 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_adr[3]}]
set_property -dict {LOC AW36 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_adr[4]}]
set_property -dict {LOC AY36 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_adr[5]}]
set_property -dict {LOC AY35 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_adr[6]}]
set_property -dict {LOC BA40 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_adr[7]}]
set_property -dict {LOC BA37 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_adr[8]}]
set_property -dict {LOC BB37 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_adr[9]}]
set_property -dict {LOC AR35 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_adr[10]}]
set_property -dict {LOC BA39 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_adr[11]}]
set_property -dict {LOC BB40 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_adr[12]}]
set_property -dict {LOC AN36 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_adr[13]}]
set_property -dict {LOC AP35 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_adr[14]}]
set_property -dict {LOC AP36 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_adr[15]}]
set_property -dict {LOC AR36 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_adr[16]}]
set_property -dict {LOC AT35 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_ba[0]}]
set_property -dict {LOC AT34 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_ba[1]}]
set_property -dict {LOC BC37 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_bg[0]}]
set_property -dict {LOC BC39 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_bg[1]}]
set_property -dict {LOC AV38 IOSTANDARD DIFF_SSTL12_DCI} [get_ports {ddr4_c0_ck_t[0]}]
set_property -dict {LOC AW38 IOSTANDARD DIFF_SSTL12_DCI} [get_ports {ddr4_c0_ck_c[0]}]
set_property -dict {LOC AU34 IOSTANDARD DIFF_SSTL12_DCI} [get_ports {ddr4_c0_ck_t[1]}]
set_property -dict {LOC AU35 IOSTANDARD DIFF_SSTL12_DCI} [get_ports {ddr4_c0_ck_c[1]}]
set_property -dict {LOC BC38 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_cke[0]}]
set_property -dict {LOC BC40 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_cke[1]}]
set_property -dict {LOC AR33 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_cs_n[0]}]
set_property -dict {LOC AP33 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_cs_n[1]}]
set_property -dict {LOC AN33 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_cs_n[2]}]
set_property -dict {LOC AM34 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_cs_n[3]}]
set_property -dict {LOC BB39 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_act_n}]
set_property -dict {LOC AP34 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_odt[0]}]
set_property -dict {LOC AN34 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_odt[1]}]
set_property -dict {LOC AU36 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c0_par}]
set_property -dict {LOC AU31 IOSTANDARD LVCMOS12       } [get_ports {ddr4_c0_reset_n}]

set_property -dict {LOC AW28 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[0]}]
set_property -dict {LOC AW29 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[1]}]
set_property -dict {LOC BA28 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[2]}]
set_property -dict {LOC BA27 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[3]}]
set_property -dict {LOC BB29 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[4]}]
set_property -dict {LOC BA29 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[5]}]
set_property -dict {LOC BC27 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[6]}]
set_property -dict {LOC BB27 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[7]}]
set_property -dict {LOC BE28 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[8]}]
set_property -dict {LOC BF28 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[9]}]
set_property -dict {LOC BE30 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[10]}]
set_property -dict {LOC BD30 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[11]}]
set_property -dict {LOC BF27 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[12]}]
set_property -dict {LOC BE27 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[13]}]
set_property -dict {LOC BF30 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[14]}]
set_property -dict {LOC BF29 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[15]}]
set_property -dict {LOC BB31 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[16]}]
set_property -dict {LOC BB32 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[17]}]
set_property -dict {LOC AY32 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[18]}]
set_property -dict {LOC AY33 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[19]}]
set_property -dict {LOC BC32 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[20]}]
set_property -dict {LOC BC33 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[21]}]
set_property -dict {LOC BB34 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[22]}]
set_property -dict {LOC BC34 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[23]}]
set_property -dict {LOC AV31 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[24]}]
set_property -dict {LOC AV32 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[25]}]
set_property -dict {LOC AV34 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[26]}]
set_property -dict {LOC AW34 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[27]}]
set_property -dict {LOC AW31 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[28]}]
set_property -dict {LOC AY31 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[29]}]
set_property -dict {LOC BA35 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[30]}]
set_property -dict {LOC BA34 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[31]}]
set_property -dict {LOC AL30 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[32]}]
set_property -dict {LOC AM30 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[33]}]
set_property -dict {LOC AU32 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[34]}]
set_property -dict {LOC AT32 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[35]}]
set_property -dict {LOC AN31 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[36]}]
set_property -dict {LOC AN32 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[37]}]
set_property -dict {LOC AR32 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[38]}]
set_property -dict {LOC AR31 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[39]}]
set_property -dict {LOC AP29 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[40]}]
set_property -dict {LOC AP28 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[41]}]
set_property -dict {LOC AN27 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[42]}]
set_property -dict {LOC AM27 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[43]}]
set_property -dict {LOC AN29 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[44]}]
set_property -dict {LOC AM29 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[45]}]
set_property -dict {LOC AR27 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[46]}]
set_property -dict {LOC AR28 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[47]}]
set_property -dict {LOC AT28 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[48]}]
set_property -dict {LOC AV27 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[49]}]
set_property -dict {LOC AU27 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[50]}]
set_property -dict {LOC AT27 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[51]}]
set_property -dict {LOC AV29 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[52]}]
set_property -dict {LOC AY30 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[53]}]
set_property -dict {LOC AW30 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[54]}]
set_property -dict {LOC AV28 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[55]}]
set_property -dict {LOC BD34 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[56]}]
set_property -dict {LOC BD33 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[57]}]
set_property -dict {LOC BE33 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[58]}]
set_property -dict {LOC BD35 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[59]}]
set_property -dict {LOC BF32 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[60]}]
set_property -dict {LOC BF33 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[61]}]
set_property -dict {LOC BF34 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[62]}]
set_property -dict {LOC BF35 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[63]}]
set_property -dict {LOC BD40 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[64]}]
set_property -dict {LOC BD39 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[65]}]
set_property -dict {LOC BF43 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[66]}]
set_property -dict {LOC BF42 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[67]}]
set_property -dict {LOC BF37 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[68]}]
set_property -dict {LOC BE37 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[69]}]
set_property -dict {LOC BE40 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[70]}]
set_property -dict {LOC BF41 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c0_dq[71]}]
set_property -dict {LOC BA30 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_t[0]}]
set_property -dict {LOC BB30 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_c[0]}]
set_property -dict {LOC BB26 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_t[1]}]
set_property -dict {LOC BC26 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_c[1]}]
set_property -dict {LOC BD28 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_t[2]}]
set_property -dict {LOC BD29 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_c[2]}]
set_property -dict {LOC BD26 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_t[3]}]
set_property -dict {LOC BE26 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_c[3]}]
set_property -dict {LOC BB35 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_t[4]}]
set_property -dict {LOC BB36 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_c[4]}]
set_property -dict {LOC BC31 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_t[5]}]
set_property -dict {LOC BD31 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_c[5]}]
set_property -dict {LOC AV33 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_t[6]}]
set_property -dict {LOC AW33 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_c[6]}]
set_property -dict {LOC BA32 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_t[7]}]
set_property -dict {LOC BA33 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_c[7]}]
set_property -dict {LOC AM31 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_t[8]}]
set_property -dict {LOC AM32 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_c[8]}]
set_property -dict {LOC AP30 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_t[9]}]
set_property -dict {LOC AP31 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_c[9]}]
set_property -dict {LOC AL28 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_t[10]}]
set_property -dict {LOC AL29 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_c[10]}]
set_property -dict {LOC AR30 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_t[11]}]
set_property -dict {LOC AT30 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_c[11]}]
set_property -dict {LOC AU29 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_t[12]}]
set_property -dict {LOC AU30 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_c[12]}]
set_property -dict {LOC AY27 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_t[13]}]
set_property -dict {LOC AY28 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_c[13]}]
set_property -dict {LOC BE35 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_t[14]}]
set_property -dict {LOC BE36 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_c[14]}]
set_property -dict {LOC BE31 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_t[15]}]
set_property -dict {LOC BE32 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_c[15]}]
set_property -dict {LOC BE38 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_t[16]}]
set_property -dict {LOC BF38 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_c[16]}]
set_property -dict {LOC BF39 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_t[17]}]
set_property -dict {LOC BF40 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c0_dqs_c[17]}]
