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

# XDC constraints for the HiTech Global HTG-ZRF8-R2 board
# part: xczu28dr-ffvg1517-2-e
# part: xczu48dr-ffvg1517-2-e

# DDR4 SODIMM
set_property -dict {LOC F11  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_a[0]}]
set_property -dict {LOC C13  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_a[1]}]
set_property -dict {LOC F14  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_a[2]}]
set_property -dict {LOC F10  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_a[3]}]
set_property -dict {LOC E11  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_a[4]}]
set_property -dict {LOC E13  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_a[5]}]
set_property -dict {LOC B13  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_a[6]}]
set_property -dict {LOC E12  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_a[7]}]
set_property -dict {LOC A11  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_a[8]}]
set_property -dict {LOC C12  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_a[9]}]
set_property -dict {LOC K13  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_a[10]}]
set_property -dict {LOC C15  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_a[11]}]
set_property -dict {LOC C11  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_a[12]}]
set_property -dict {LOC K10  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_a[13]}]
set_property -dict {LOC B14  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_a[14]}]
set_property -dict {LOC H12  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_a[15]}]
set_property -dict {LOC K12  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_a[16]}]

set_property -dict {LOC B15  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_act_n}]
set_property -dict {LOC D14  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_alert_n}]

set_property -dict {LOC H13  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_ba[0]}]
set_property -dict {LOC A14  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_ba[1]}]
set_property -dict {LOC B12  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_bg[0]}]
set_property -dict {LOC D11  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_bg[1]}]

set_property -dict {LOC A12  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_cke[0]}]
set_property -dict {LOC A15  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_cke[1]}]
set_property -dict {LOC J11  IOSTANDARD DIFF_SSTL2_DCI} [get_ports {ddr4_ck_t[0]}]
set_property -dict {LOC J10  IOSTANDARD DIFF_SSTL2_DCI} [get_ports {ddr4_ck_c[0]}]
set_property -dict {LOC J14  IOSTANDARD DIFF_SSTL2_DCI} [get_ports {ddr4_ck_t[1]}]
set_property -dict {LOC J13  IOSTANDARD DIFF_SSTL2_DCI} [get_ports {ddr4_ck_c[1]}]
set_property -dict {LOC H10  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_cs_n[0]}]
set_property -dict {LOC E14  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_cs_n[1]}]
set_property -dict {LOC K11  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_cs_n[2]}]
set_property -dict {LOC F12  IOSTANDARD SSTL12_DCI} [get_ports {ddr4_cs_n[3]}]

set_property -dict {LOC J7   IOSTANDARD LVCMOS12} [get_ports {ddr4_odt[0]}]
set_property -dict {LOC H11  IOSTANDARD LVCMOS12} [get_ports {ddr4_odt[1]}]
set_property -dict {LOC D13  IOSTANDARD LVCMOS12} [get_ports {ddr4_rst_n}]
set_property -dict {LOC G10  IOSTANDARD LVCMOS12} [get_ports {ddr4_par}]
set_property -dict {LOC G14  IOSTANDARD LVCMOS12} [get_ports {ddr4_event_n}]

set_property -dict {LOC M12  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[0]}]
set_property -dict {LOC M13  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[1]}]
set_property -dict {LOC N15  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[2]}]
set_property -dict {LOC M17  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[3]}]
set_property -dict {LOC L12  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[4]}]
set_property -dict {LOC N13  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[5]}]
set_property -dict {LOC M15  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[6]}]
set_property -dict {LOC N17  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[7]}]
set_property -dict {LOC K17  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[8]}]
set_property -dict {LOC L17  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[9]}]
set_property -dict {LOC J19  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[10]}]
set_property -dict {LOC H16  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[11]}]
set_property -dict {LOC J16  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[12]}]
set_property -dict {LOC K16  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[13]}]
set_property -dict {LOC H17  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[14]}]
set_property -dict {LOC J18  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[15]}]
set_property -dict {LOC E16  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[16]}]
set_property -dict {LOC F15  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[17]}]
set_property -dict {LOC E17  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[18]}]
set_property -dict {LOC H18  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[19]}]
set_property -dict {LOC F16  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[20]}]
set_property -dict {LOC G15  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[21]}]
set_property -dict {LOC E18  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[22]}]
set_property -dict {LOC G18  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[23]}]
set_property -dict {LOC C16  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[24]}]
set_property -dict {LOC D15  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[25]}]
set_property -dict {LOC C17  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[26]}]
set_property -dict {LOC A19  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[27]}]
set_property -dict {LOC A16  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[28]}]
set_property -dict {LOC D16  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[29]}]
set_property -dict {LOC A17  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[30]}]
set_property -dict {LOC B19  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[31]}]
set_property -dict {LOC H23  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[32]}]
set_property -dict {LOC J21  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[33]}]
set_property -dict {LOC H22  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[34]}]
set_property -dict {LOC K24  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[35]}]
set_property -dict {LOC G23  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[36]}]
set_property -dict {LOC H21  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[37]}]
set_property -dict {LOC G22  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[38]}]
set_property -dict {LOC L24  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[39]}]
set_property -dict {LOC E21  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[40]}]
set_property -dict {LOC F20  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[41]}]
set_property -dict {LOC E23  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[42]}]
set_property -dict {LOC F24  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[43]}]
set_property -dict {LOC D21  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[44]}]
set_property -dict {LOC E22  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[45]}]
set_property -dict {LOC E24  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[46]}]
set_property -dict {LOC G20  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[47]}]
set_property -dict {LOC C20  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[48]}]
set_property -dict {LOC A20  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[49]}]
set_property -dict {LOC B24  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[50]}]
set_property -dict {LOC C21  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[51]}]
set_property -dict {LOC B20  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[52]}]
set_property -dict {LOC A21  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[53]}]
set_property -dict {LOC C22  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[54]}]
set_property -dict {LOC A24  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[55]}]
set_property -dict {LOC L19  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[56]}]
set_property -dict {LOC L21  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[57]}]
set_property -dict {LOC L23  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[58]}]
set_property -dict {LOC N19  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[59]}]
set_property -dict {LOC L20  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[60]}]
set_property -dict {LOC M19  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[61]}]
set_property -dict {LOC L22  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[62]}]
set_property -dict {LOC M20  IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[63]}]
set_property -dict {LOC F9   IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[64]}]
set_property -dict {LOC G7   IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[65]}]
set_property -dict {LOC H6   IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[66]}]
set_property -dict {LOC G6   IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[67]}]
set_property -dict {LOC G9   IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[68]}]
set_property -dict {LOC H7   IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[69]}]
set_property -dict {LOC K9   IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[70]}]
set_property -dict {LOC J9   IOSTANDARD POD12_DCI} [get_ports {ddr4_dq[71]}]

set_property -dict {LOC L15  IOSTANDARD DIFF_POD12} [get_ports {ddr4_dqs_t[0]}]
set_property -dict {LOC L14  IOSTANDARD DIFF_POD12} [get_ports {ddr4_dqs_c[0]}]
set_property -dict {LOC K19  IOSTANDARD DIFF_POD12} [get_ports {ddr4_dqs_t[1]}]
set_property -dict {LOC K18  IOSTANDARD DIFF_POD12} [get_ports {ddr4_dqs_c[1]}]
set_property -dict {LOC G19  IOSTANDARD DIFF_POD12} [get_ports {ddr4_dqs_t[2]}]
set_property -dict {LOC F19  IOSTANDARD DIFF_POD12} [get_ports {ddr4_dqs_c[2]}]
set_property -dict {LOC B18  IOSTANDARD DIFF_POD12} [get_ports {ddr4_dqs_t[3]}]
set_property -dict {LOC B17  IOSTANDARD DIFF_POD12} [get_ports {ddr4_dqs_c[3]}]
set_property -dict {LOC J20  IOSTANDARD DIFF_POD12} [get_ports {ddr4_dqs_t[4]}]
set_property -dict {LOC H20  IOSTANDARD DIFF_POD12} [get_ports {ddr4_dqs_c[4]}]
set_property -dict {LOC D23  IOSTANDARD DIFF_POD12} [get_ports {ddr4_dqs_t[5]}]
set_property -dict {LOC D24  IOSTANDARD DIFF_POD12} [get_ports {ddr4_dqs_c[5]}]
set_property -dict {LOC B22  IOSTANDARD DIFF_POD12} [get_ports {ddr4_dqs_t[6]}]
set_property -dict {LOC A22  IOSTANDARD DIFF_POD12} [get_ports {ddr4_dqs_c[6]}]
set_property -dict {LOC K21  IOSTANDARD DIFF_POD12} [get_ports {ddr4_dqs_t[7]}]
set_property -dict {LOC K22  IOSTANDARD DIFF_POD12} [get_ports {ddr4_dqs_c[7]}]
set_property -dict {LOC H8   IOSTANDARD DIFF_POD12} [get_ports {ddr4_dqs_t[8]}]
set_property -dict {LOC G8   IOSTANDARD DIFF_POD12} [get_ports {ddr4_dqs_c[8]}]

set_property -dict {LOC N14  IOSTANDARD POD12_DCI} [get_ports {ddr4_dm_dbi_n[0]}]
set_property -dict {LOC J15  IOSTANDARD POD12_DCI} [get_ports {ddr4_dm_dbi_n[1]}]
set_property -dict {LOC G17  IOSTANDARD POD12_DCI} [get_ports {ddr4_dm_dbi_n[2]}]
set_property -dict {LOC D18  IOSTANDARD POD12_DCI} [get_ports {ddr4_dm_dbi_n[3]}]
set_property -dict {LOC J23  IOSTANDARD POD12_DCI} [get_ports {ddr4_dm_dbi_n[4]}]
set_property -dict {LOC F21  IOSTANDARD POD12_DCI} [get_ports {ddr4_dm_dbi_n[5]}]
set_property -dict {LOC C23  IOSTANDARD POD12_DCI} [get_ports {ddr4_dm_dbi_n[6]}]
set_property -dict {LOC N20  IOSTANDARD POD12_DCI} [get_ports {ddr4_dm_dbi_n[7]}]
set_property -dict {LOC J8   IOSTANDARD POD12_DCI} [get_ports {ddr4_dm_dbi_n[8]}]
