Save current design's constraints as a new set of constraints files
save_constraints_as [‑dir <arg>] [‑target_constrs_file <arg>] [‑quiet]
|Directory to save constraints to
|Target constraints file for the new fileset
|Ignore command errors
|Suspend message limits during command execution
|Name of the new constraints fileset
Copies the active constraints set to create a new constraints set, with local copies of any constraints files that are part of the constraints set. You can also specify a new constraints file to use as the target for the copied constraints set.
save_constraints_as command will not be active in the design, although it will be referenced by the design. To make the constraints set active you must set the constrset property to point to the new constraints set for specific runs. See the example below.
-dir <arg> - (Optional) The directory into which constraints files are saved. If the directory is not specified, the new constraints set is located in the project sources directory. The constraints files from the active constraints set are copied into the specified directory.
-target_constrs_file <arg> - (Optional) Specifies a new target constraints file for the new constraints fileset. If a path is not specified as part of the file name, the file will be created in the fileset directory.
.xdc file extension, or the command will report a warning that the filetype is invalid, and cannot be set to the target constraint set. In this case, the existing target constraints file will be used as the target.
-quiet - (Optional) Execute the command quietly, returning no messages from the command. The command also returns TCL_OK regardless of any errors encountered during execution.
-verbose - (Optional) Temporarily override any message limits and return all messages from this command.
<name> - (Required) The name of the constraints set to write.
save_constraints_as -dir C:/Data/con1 \
-target_constrs_file rev1.xdc constrs_2
set_property CONSTRSET newCon2 [get_runs synth_1]
set_property CONSTRSET newCon2 [get_runs impl_1]