# 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 C0)
set_property -dict {LOC BJ43 IOSTANDARD LVDS} [get_ports clk_ddr4_c0_p]
set_property -dict {LOC BJ44 IOSTANDARD LVDS} [get_ports clk_ddr4_c0_n]
#create_clock -period 10.000 -name clk_ddr4_c0 [get_ports clk_ddr4_c0_p]

# DDR4 C0
set_property -dict {LOC BF46 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_adr[0]}]
set_property -dict {LOC BG43 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_adr[1]}]
set_property -dict {LOC BK45 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_adr[2]}]
set_property -dict {LOC BF42 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_adr[3]}]
set_property -dict {LOC BL45 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_adr[4]}]
set_property -dict {LOC BF43 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_adr[5]}]
set_property -dict {LOC BG42 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_adr[6]}]
set_property -dict {LOC BL43 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_adr[7]}]
set_property -dict {LOC BK43 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_adr[8]}]
set_property -dict {LOC BM42 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_adr[9]}]
set_property -dict {LOC BG45 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_adr[10]}]
set_property -dict {LOC BD41 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_adr[11]}]
set_property -dict {LOC BL42 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_adr[12]}]
set_property -dict {LOC BE44 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_adr[13]}]
set_property -dict {LOC BE43 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_adr[14]}]
set_property -dict {LOC BL46 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_adr[15]}]
set_property -dict {LOC BH44 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_adr[16]}]
set_property -dict {LOC BH45 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_ba[0]}]
set_property -dict {LOC BM47 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_ba[1]}]
set_property -dict {LOC BF41 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_bg[0]}]
set_property -dict {LOC BE41 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_bg[1]}]
set_property -dict {LOC BH46 IOSTANDARD DIFF_SSTL12_DCI } [get_ports {ddr4_c0_ck_t}]
set_property -dict {LOC BJ46 IOSTANDARD DIFF_SSTL12_DCI } [get_ports {ddr4_c0_ck_c}]
set_property -dict {LOC BH42 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_cke}]
set_property -dict {LOC BK46 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_cs_n}]
set_property -dict {LOC BH41 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_act_n}]
set_property -dict {LOC BG44 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_odt}]
set_property -dict {LOC BF45 IOSTANDARD SSTL12_DCI      } [get_ports {ddr4_c0_par}]
set_property -dict {LOC BG33 IOSTANDARD LVCMOS12 DRIVE 8} [get_ports {ddr4_c0_reset_n}]

set_property -dict {LOC BN32 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[0]}]
set_property -dict {LOC BP32 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[1]}]
set_property -dict {LOC BL30 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[2]}]
set_property -dict {LOC BM30 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[3]}]
set_property -dict {LOC BP29 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[4]}]
set_property -dict {LOC BP28 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[5]}]
set_property -dict {LOC BP31 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[6]}]
set_property -dict {LOC BN31 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[7]}]
set_property -dict {LOC BJ31 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[8]}]
set_property -dict {LOC BH31 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[9]}]
set_property -dict {LOC BF32 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[10]}]
set_property -dict {LOC BF33 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[11]}]
set_property -dict {LOC BH29 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[12]}]
set_property -dict {LOC BH30 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[13]}]
set_property -dict {LOC BF31 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[14]}]
set_property -dict {LOC BG32 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[15]}]
set_property -dict {LOC BK31 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[16]}]
set_property -dict {LOC BL31 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[17]}]
set_property -dict {LOC BK33 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[18]}]
set_property -dict {LOC BL33 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[19]}]
set_property -dict {LOC BL32 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[20]}]
set_property -dict {LOC BM33 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[21]}]
set_property -dict {LOC BN34 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[22]}]
set_property -dict {LOC BP34 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[23]}]
set_property -dict {LOC BH34 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[24]}]
set_property -dict {LOC BH35 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[25]}]
set_property -dict {LOC BF35 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[26]}]
set_property -dict {LOC BF36 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[27]}]
set_property -dict {LOC BJ33 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[28]}]
set_property -dict {LOC BJ34 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[29]}]
set_property -dict {LOC BG34 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[30]}]
set_property -dict {LOC BG35 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[31]}]
set_property -dict {LOC BM52 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[32]}]
set_property -dict {LOC BL53 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[33]}]
set_property -dict {LOC BL52 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[34]}]
set_property -dict {LOC BL51 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[35]}]
set_property -dict {LOC BN50 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[36]}]
set_property -dict {LOC BN51 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[37]}]
set_property -dict {LOC BN49 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[38]}]
set_property -dict {LOC BM48 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[39]}]
set_property -dict {LOC BE50 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[40]}]
set_property -dict {LOC BE49 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[41]}]
set_property -dict {LOC BE51 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[42]}]
set_property -dict {LOC BD51 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[43]}]
set_property -dict {LOC BF52 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[44]}]
set_property -dict {LOC BF51 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[45]}]
set_property -dict {LOC BG50 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[46]}]
set_property -dict {LOC BF50 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[47]}]
set_property -dict {LOC BH50 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[48]}]
set_property -dict {LOC BJ51 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[49]}]
set_property -dict {LOC BH51 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[50]}]
set_property -dict {LOC BH49 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[51]}]
set_property -dict {LOC BK50 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[52]}]
set_property -dict {LOC BK51 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[53]}]
set_property -dict {LOC BJ49 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[54]}]
set_property -dict {LOC BJ48 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[55]}]
set_property -dict {LOC BN44 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[56]}]
set_property -dict {LOC BN45 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[57]}]
set_property -dict {LOC BM44 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[58]}]
set_property -dict {LOC BM45 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[59]}]
set_property -dict {LOC BP43 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[60]}]
set_property -dict {LOC BP44 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[61]}]
set_property -dict {LOC BN47 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[62]}]
set_property -dict {LOC BP47 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[63]}]
set_property -dict {LOC BG54 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[64]}]
set_property -dict {LOC BG53 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[65]}]
set_property -dict {LOC BE53 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[66]}]
set_property -dict {LOC BE54 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[67]}]
set_property -dict {LOC BH52 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[68]}]
set_property -dict {LOC BG52 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[69]}]
set_property -dict {LOC BK54 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[70]}]
set_property -dict {LOC BK53 IOSTANDARD POD12_DCI       } [get_ports {ddr4_c0_dq[71]}]
set_property -dict {LOC BN29 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_t[0]}]
set_property -dict {LOC BN30 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_c[0]}]
set_property -dict {LOC BM28 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_t[1]}]
set_property -dict {LOC BM29 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_c[1]}]
set_property -dict {LOC BJ29 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_t[2]}]
set_property -dict {LOC BK30 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_c[2]}]
set_property -dict {LOC BG29 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_t[3]}]
set_property -dict {LOC BG30 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_c[3]}]
set_property -dict {LOC BL35 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_t[4]}]
set_property -dict {LOC BM35 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_c[4]}]
set_property -dict {LOC BM34 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_t[5]}]
set_property -dict {LOC BN35 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_c[5]}]
set_property -dict {LOC BK34 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_t[6]}]
set_property -dict {LOC BK35 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_c[6]}]
set_property -dict {LOC BH32 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_t[7]}]
set_property -dict {LOC BJ32 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_c[7]}]
set_property -dict {LOC BM49 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_t[8]}]
set_property -dict {LOC BM50 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_c[8]}]
set_property -dict {LOC BP48 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_t[9]}]
set_property -dict {LOC BP49 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_c[9]}]
set_property -dict {LOC BF47 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_t[10]}]
set_property -dict {LOC BF48 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_c[10]}]
set_property -dict {LOC BG48 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_t[11]}]
set_property -dict {LOC BG49 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_c[11]}]
set_property -dict {LOC BH47 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_t[12]}]
set_property -dict {LOC BJ47 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_c[12]}]
set_property -dict {LOC BK48 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_t[13]}]
set_property -dict {LOC BK49 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_c[13]}]
set_property -dict {LOC BN46 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_t[14]}]
set_property -dict {LOC BP46 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_c[14]}]
set_property -dict {LOC BN42 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_t[15]}]
set_property -dict {LOC BP42 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_c[15]}]
set_property -dict {LOC BH54 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_t[16]}]
set_property -dict {LOC BJ54 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_c[16]}]
set_property -dict {LOC BJ52 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_t[17]}]
set_property -dict {LOC BJ53 IOSTANDARD DIFF_POD12_DCI  } [get_ports {ddr4_c0_dqs_c[17]}]
