Don't know if this is still relevant, but I have a suggestion I have been using a few times:
###############################################################################
# Module constraint file (.sdc)
###############################################################################
# Get all instances
set inst_list [get_entity_instances -nowarn <module_name>]
# Run for each instance
foreach each_inst $inst_list {
# Add your constraints here using $each_inst in the path
# Eg.: set ref_clk [get_pins -compatibility_mode $each_inst|<pll_inst_name>|*|core_refclk]
}
Kind Regards,
Rasmus