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

# XDC constraints for the Xilinx Alveo U280 board
# part: xcu280-fsvh2892-2L-e

# 100 MHz (DDR4 C1)
set_property -dict {LOC BH6  IOSTANDARD LVDS} [get_ports clk_ddr4_c1_p]
set_property -dict {LOC BJ6  IOSTANDARD LVDS} [get_ports clk_ddr4_c1_n]
#create_clock -period 10.000 -name clk_ddr4_c1 [get_ports clk_ddr4_c1_p]

# DDR4 C1
set_property -dict {LOC BF7  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_adr[0]}]
set_property -dict {LOC BK1  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_adr[1]}]
set_property -dict {LOC BF6  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_adr[2]}]
set_property -dict {LOC BF5  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_adr[3]}]
set_property -dict {LOC BE3  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_adr[4]}]
set_property -dict {LOC BE6  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_adr[5]}]
set_property -dict {LOC BE5  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_adr[6]}]
set_property -dict {LOC BG7  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_adr[7]}]
set_property -dict {LOC BJ1  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_adr[8]}]
set_property -dict {LOC BG2  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_adr[9]}]
set_property -dict {LOC BJ8  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_adr[10]}]
set_property -dict {LOC BE4  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_adr[11]}]
set_property -dict {LOC BL2  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_adr[12]}]
set_property -dict {LOC BK5  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_adr[13]}]
set_property -dict {LOC BK8  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_adr[14]}]
set_property -dict {LOC BJ4  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_adr[15]}]
set_property -dict {LOC BF8  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_adr[16]}]
set_property -dict {LOC BG8  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_ba[0]}]
set_property -dict {LOC BK4  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_ba[1]}]
set_property -dict {LOC BF3  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_bg[0]}]
set_property -dict {LOC BF2  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_bg[1]}]
set_property -dict {LOC BJ3  IOSTANDARD DIFF_SSTL12_DCI } [get_ports {ddr4_c1_ck_t}]
set_property -dict {LOC BJ2  IOSTANDARD DIFF_SSTL12_DCI } [get_ports {ddr4_c1_ck_c}]
set_property -dict {LOC BE1  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_cke}]
set_property -dict {LOC BL3  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_cs_n}]
set_property -dict {LOC BG3  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_act_n}]
set_property -dict {LOC BH2  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_odt}]
set_property -dict {LOC BH1  IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c1_par}]
set_property -dict {LOC BH12 IOSTANDARD LVCMOS12 DRIVE 8} [get_ports {ddr4_c1_reset_n}]

set_property -dict {LOC A11  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[0]}]
set_property -dict {LOC A10  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[1]}]
set_property -dict {LOC A9   IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[2]}]
set_property -dict {LOC A8   IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[3]}]
set_property -dict {LOC B12  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[4]}]
set_property -dict {LOC B10  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[5]}]
set_property -dict {LOC C12  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[6]}]
set_property -dict {LOC B11  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[7]}]
set_property -dict {LOC E11  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[8]}]
set_property -dict {LOC D11  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[9]}]
set_property -dict {LOC E12  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[10]}]
set_property -dict {LOC F11  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[11]}]
set_property -dict {LOC F10  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[12]}]
set_property -dict {LOC E9   IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[13]}]
set_property -dict {LOC F9   IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[14]}]
set_property -dict {LOC G11  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[15]}]
set_property -dict {LOC H12  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[16]}]
set_property -dict {LOC G13  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[17]}]
set_property -dict {LOC H13  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[18]}]
set_property -dict {LOC H14  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[19]}]
set_property -dict {LOC J11  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[20]}]
set_property -dict {LOC J12  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[21]}]
set_property -dict {LOC J15  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[22]}]
set_property -dict {LOC J14  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[23]}]
set_property -dict {LOC A14  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[24]}]
set_property -dict {LOC C15  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[25]}]
set_property -dict {LOC A15  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[26]}]
set_property -dict {LOC B15  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[27]}]
set_property -dict {LOC F15  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[28]}]
set_property -dict {LOC E14  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[29]}]
set_property -dict {LOC F14  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[30]}]
set_property -dict {LOC F13  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[31]}]
set_property -dict {LOC BM3  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[32]}]
set_property -dict {LOC BM4  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[33]}]
set_property -dict {LOC BM5  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[34]}]
set_property -dict {LOC BL6  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[35]}]
set_property -dict {LOC BN4  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[36]}]
set_property -dict {LOC BN5  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[37]}]
set_property -dict {LOC BN6  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[38]}]
set_property -dict {LOC BN7  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[39]}]
set_property -dict {LOC BJ9  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[40]}]
set_property -dict {LOC BK9  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[41]}]
set_property -dict {LOC BK10 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[42]}]
set_property -dict {LOC BL10 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[43]}]
set_property -dict {LOC BM9  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[44]}]
set_property -dict {LOC BN9  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[45]}]
set_property -dict {LOC BN10 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[46]}]
set_property -dict {LOC BM10 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[47]}]
set_property -dict {LOC BM15 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[48]}]
set_property -dict {LOC BM14 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[49]}]
set_property -dict {LOC BL15 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[50]}]
set_property -dict {LOC BM13 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[51]}]
set_property -dict {LOC BN12 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[52]}]
set_property -dict {LOC BM12 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[53]}]
set_property -dict {LOC BP13 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[54]}]
set_property -dict {LOC BP14 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[55]}]
set_property -dict {LOC BJ13 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[56]}]
set_property -dict {LOC BJ12 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[57]}]
set_property -dict {LOC BH15 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[58]}]
set_property -dict {LOC BH14 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[59]}]
set_property -dict {LOC BK14 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[60]}]
set_property -dict {LOC BK15 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[61]}]
set_property -dict {LOC BL12 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[62]}]
set_property -dict {LOC BL13 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[63]}]
set_property -dict {LOC BE9  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[64]}]
set_property -dict {LOC BE10 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[65]}]
set_property -dict {LOC BF10 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[66]}]
set_property -dict {LOC BE11 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[67]}]
set_property -dict {LOC BG13 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[68]}]
set_property -dict {LOC BG12 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[69]}]
set_property -dict {LOC BG9  IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[70]}]
set_property -dict {LOC BG10 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c1_dq[71]}]
set_property -dict {LOC B13  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_t[0]}]
set_property -dict {LOC A13  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_c[0]}]
set_property -dict {LOC C10  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_t[1]}]
set_property -dict {LOC C9   IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_c[1]}]
set_property -dict {LOC D10  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_t[2]}]
set_property -dict {LOC D9   IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_c[2]}]
set_property -dict {LOC H10  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_t[3]}]
set_property -dict {LOC G10  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_c[3]}]
set_property -dict {LOC H15  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_t[4]}]
set_property -dict {LOC G15  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_c[4]}]
set_property -dict {LOC K14  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_t[5]}]
set_property -dict {LOC K13  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_c[5]}]
set_property -dict {LOC D15  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_t[6]}]
set_property -dict {LOC D14  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_c[6]}]
set_property -dict {LOC E13  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_t[7]}]
set_property -dict {LOC D12  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_c[7]}]
set_property -dict {LOC BL7  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_t[8]}]
set_property -dict {LOC BM7  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_c[8]}]
set_property -dict {LOC BP7  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_t[9]}]
set_property -dict {LOC BP6  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_c[9]}]
set_property -dict {LOC BL8  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_t[10]}]
set_property -dict {LOC BM8  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_c[10]}]
set_property -dict {LOC BP9  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_t[11]}]
set_property -dict {LOC BP8  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_c[11]}]
set_property -dict {LOC BN15 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_t[12]}]
set_property -dict {LOC BN14 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_c[12]}]
set_property -dict {LOC BP12 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_t[13]}]
set_property -dict {LOC BP11 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_c[13]}]
set_property -dict {LOC BJ14 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_t[14]}]
set_property -dict {LOC BK13 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_c[14]}]
set_property -dict {LOC BJ11 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_t[15]}]
set_property -dict {LOC BK11 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_c[15]}]
set_property -dict {LOC BF12 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_t[16]}]
set_property -dict {LOC BF11 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_c[16]}]
set_property -dict {LOC BH10 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_t[17]}]
set_property -dict {LOC BH9  IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c1_dqs_c[17]}]
