# 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 C1)
set_property -dict {LOC AW20 IOSTANDARD LVDS} [get_ports clk_ddr4_c1_p]
set_property -dict {LOC AW19 IOSTANDARD LVDS} [get_ports clk_ddr4_c1_n]
#create_clock -period 3.333 -name clk_ddr4_c1 [get_ports clk_ddr4_c1_p]

# DDR4 C1
set_property -dict {LOC AN24 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_adr[0]}]
set_property -dict {LOC AT24 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_adr[1]}]
set_property -dict {LOC AW24 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_adr[2]}]
set_property -dict {LOC AN26 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_adr[3]}]
set_property -dict {LOC AY22 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_adr[4]}]
set_property -dict {LOC AY23 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_adr[5]}]
set_property -dict {LOC AV24 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_adr[6]}]
set_property -dict {LOC BA22 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_adr[7]}]
set_property -dict {LOC AY25 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_adr[8]}]
set_property -dict {LOC BA23 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_adr[9]}]
set_property -dict {LOC AM26 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_adr[10]}]
set_property -dict {LOC BA25 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_adr[11]}]
set_property -dict {LOC BB22 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_adr[12]}]
set_property -dict {LOC AL24 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_adr[13]}]
set_property -dict {LOC AL25 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_adr[14]}]
set_property -dict {LOC AM25 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_adr[15]}]
set_property -dict {LOC AN23 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_adr[16]}]
set_property -dict {LOC AU24 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_ba[0]}]
set_property -dict {LOC AP26 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_ba[1]}]
set_property -dict {LOC BC22 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_bg[0]}]
set_property -dict {LOC AW26 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_bg[1]}]
set_property -dict {LOC AT25 IOSTANDARD DIFF_SSTL12_DCI} [get_ports {ddr4_c1_ck_t[0]}]
set_property -dict {LOC AU25 IOSTANDARD DIFF_SSTL12_DCI} [get_ports {ddr4_c1_ck_c[0]}]
set_property -dict {LOC AU26 IOSTANDARD DIFF_SSTL12_DCI} [get_ports {ddr4_c1_ck_t[1]}]
set_property -dict {LOC AV26 IOSTANDARD DIFF_SSTL12_DCI} [get_ports {ddr4_c1_ck_c[1]}]
set_property -dict {LOC BB25 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_cke[0]}]
set_property -dict {LOC BB24 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_cke[1]}]
set_property -dict {LOC AV23 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_cs_n[0]}]
set_property -dict {LOC AP25 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_cs_n[1]}]
set_property -dict {LOC AR23 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_cs_n[2]}]
set_property -dict {LOC AP23 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_cs_n[3]}]
set_property -dict {LOC AW25 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_act_n}]
set_property -dict {LOC AW23 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_odt[0]}]
set_property -dict {LOC AP24 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_odt[1]}]
set_property -dict {LOC AT23 IOSTANDARD SSTL12_DCI     } [get_ports {ddr4_c1_par}]
set_property -dict {LOC AR17 IOSTANDARD LVCMOS12       } [get_ports {ddr4_c1_reset_n}]

set_property -dict {LOC BD9  IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[0]}]
set_property -dict {LOC BD7  IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[1]}]
set_property -dict {LOC BC7  IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[2]}]
set_property -dict {LOC BD8  IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[3]}]
set_property -dict {LOC BD10 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[4]}]
set_property -dict {LOC BE10 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[5]}]
set_property -dict {LOC BE7  IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[6]}]
set_property -dict {LOC BF7  IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[7]}]
set_property -dict {LOC AU13 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[8]}]
set_property -dict {LOC AV13 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[9]}]
set_property -dict {LOC AW13 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[10]}]
set_property -dict {LOC AW14 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[11]}]
set_property -dict {LOC AU14 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[12]}]
set_property -dict {LOC AY11 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[13]}]
set_property -dict {LOC AV14 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[14]}]
set_property -dict {LOC BA11 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[15]}]
set_property -dict {LOC BA12 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[16]}]
set_property -dict {LOC BB12 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[17]}]
set_property -dict {LOC BA13 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[18]}]
set_property -dict {LOC BA14 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[19]}]
set_property -dict {LOC BC9  IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[20]}]
set_property -dict {LOC BB9  IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[21]}]
set_property -dict {LOC BA7  IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[22]}]
set_property -dict {LOC BA8  IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[23]}]
set_property -dict {LOC AN13 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[24]}]
set_property -dict {LOC AR13 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[25]}]
set_property -dict {LOC AM13 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[26]}]
set_property -dict {LOC AP13 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[27]}]
set_property -dict {LOC AM14 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[28]}]
set_property -dict {LOC AR15 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[29]}]
set_property -dict {LOC AL14 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[30]}]
set_property -dict {LOC AT15 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[31]}]
set_property -dict {LOC BE13 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[32]}]
set_property -dict {LOC BD14 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[33]}]
set_property -dict {LOC BF12 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[34]}]
set_property -dict {LOC BD13 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[35]}]
set_property -dict {LOC BD15 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[36]}]
set_property -dict {LOC BD16 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[37]}]
set_property -dict {LOC BF14 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[38]}]
set_property -dict {LOC BF13 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[39]}]
set_property -dict {LOC AY17 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[40]}]
set_property -dict {LOC BA17 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[41]}]
set_property -dict {LOC AY18 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[42]}]
set_property -dict {LOC BA18 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[43]}]
set_property -dict {LOC BA15 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[44]}]
set_property -dict {LOC BB15 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[45]}]
set_property -dict {LOC BC11 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[46]}]
set_property -dict {LOC BD11 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[47]}]
set_property -dict {LOC AV16 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[48]}]
set_property -dict {LOC AV17 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[49]}]
set_property -dict {LOC AU16 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[50]}]
set_property -dict {LOC AU17 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[51]}]
set_property -dict {LOC BB17 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[52]}]
set_property -dict {LOC BB16 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[53]}]
set_property -dict {LOC AT18 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[54]}]
set_property -dict {LOC AT17 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[55]}]
set_property -dict {LOC AM15 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[56]}]
set_property -dict {LOC AL15 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[57]}]
set_property -dict {LOC AN17 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[58]}]
set_property -dict {LOC AN16 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[59]}]
set_property -dict {LOC AR18 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[60]}]
set_property -dict {LOC AP18 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[61]}]
set_property -dict {LOC AL17 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[62]}]
set_property -dict {LOC AL16 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[63]}]
set_property -dict {LOC BF25 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[64]}]
set_property -dict {LOC BF24 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[65]}]
set_property -dict {LOC BD25 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[66]}]
set_property -dict {LOC BE25 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[67]}]
set_property -dict {LOC BD23 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[68]}]
set_property -dict {LOC BC23 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[69]}]
set_property -dict {LOC BF23 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[70]}]
set_property -dict {LOC BE23 IOSTANDARD POD12_DCI      } [get_ports {ddr4_c1_dq[71]}]
set_property -dict {LOC BF10 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_t[0]}]
set_property -dict {LOC BF9  IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_c[0]}]
set_property -dict {LOC BE8  IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_t[1]}]
set_property -dict {LOC BF8  IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_c[1]}]
set_property -dict {LOC AW15 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_t[2]}]
set_property -dict {LOC AY15 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_c[2]}]
set_property -dict {LOC AY13 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_t[3]}]
set_property -dict {LOC AY12 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_c[3]}]
set_property -dict {LOC BB11 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_t[4]}]
set_property -dict {LOC BB10 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_c[4]}]
set_property -dict {LOC BA10 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_t[5]}]
set_property -dict {LOC BA9  IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_c[5]}]
set_property -dict {LOC AT14 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_t[6]}]
set_property -dict {LOC AT13 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_c[6]}]
set_property -dict {LOC AN14 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_t[7]}]
set_property -dict {LOC AP14 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_c[7]}]
set_property -dict {LOC BE12 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_t[8]}]
set_property -dict {LOC BE11 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_c[8]}]
set_property -dict {LOC BE15 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_t[9]}]
set_property -dict {LOC BF15 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_c[9]}]
set_property -dict {LOC BC13 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_t[10]}]
set_property -dict {LOC BC12 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_c[10]}]
set_property -dict {LOC BB14 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_t[11]}]
set_property -dict {LOC BC14 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_c[11]}]
set_property -dict {LOC AV18 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_t[12]}]
set_property -dict {LOC AW18 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_c[12]}]
set_property -dict {LOC AW16 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_t[13]}]
set_property -dict {LOC AY16 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_c[13]}]
set_property -dict {LOC AP16 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_t[14]}]
set_property -dict {LOC AR16 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_c[14]}]
set_property -dict {LOC AM17 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_t[15]}]
set_property -dict {LOC AM16 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_c[15]}]
set_property -dict {LOC BC24 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_t[16]}]
set_property -dict {LOC BD24 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_c[16]}]
set_property -dict {LOC BE22 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_t[17]}]
set_property -dict {LOC BF22 IOSTANDARD DIFF_POD12_DCI } [get_ports {ddr4_c1_dqs_c[17]}]
