cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Scholar
Scholar
776 Views
Registered: ‎06-20-2017

Constraints wizard rewrites all constraints

I forgot about this bug, and lost some work as a consequence.

 

When I used the constraint wizard to get the syntax to create a forwarded clock, and hit finish, I expected Vivado to put the additional constraint into the target constraint file.  I have several files in the active constraint set.  It did this, but it did more. 

 

Vivado also decided to rewrite all of my constraints, regardless of the file they were in, even though they were not in the target constraint file.

 

So for example if I had (in a non-target constraint file)

 

set_input_delay -clock $input_clock -max [expr $tco_max + $trce_dly_max] [get_ports $input_ports];

It would rewrite the constraint, and remove all of my readable variable setting, to this:

  

set_input_delay -clock [get_clocks USCLK] -max 0.750 [get_ports {iDATA[*]}]

 

Rewriting constraint files that are not the target is unacceptable:

1.  It makes the constraints less readable, less maintainable.

2.  Vivado never had permission to modify any other constraint file, except the target.

 

I'm baffled as to what sort of thinking went into adding the rewriting of constraints not selected in the constraint wizard in non-target constraint files, without warning, as a feature. 

 

The finish button has the following message:  "To keep the new constraints and perform the selected actions, click Finish.  The new constraints will be automatically saved to your target XDC file.  To discard the constraints, click Cancel."

 

Note that the finish on the constraint wizard does not warn the user that it will rewrite the other constraint files (replacing readable expressions with magic numbers). 

 

This is frustrating to say the least. 

 

Request:  If you cannot fix the constraint wizard, you should change the message above (with tongue in cheek) to:

"To keep the new constraints and preexisting constraints all coverted to use magic numbers, click Finish.  The new constraints will be automatically saved to your target XDC file and existing constraints that are completely unrelated to what you have selected here will be rewritten in other files, whether or not they are in the target constraint file.  To discard the constraints, click Cancel.  You should always select Cancel unless you have no constraints."

 

Then have an "We've detected that you have other constraints.  Although Vivado is database driven, this database functionality doesn't apply to such constraints.  Are you sure you want to nuke your constraints?" request for confirmation.  And then a "really?" request for confirmation.  If the user still decides to do this, an "Okay, we hope you were using revision control on the constraint files.  Don't say we didn't warn you." confirmation.

 

Alternatively, the constraint wizard could do something similar to the write_xdc command (or have the option):  Write out the existing and new constraints to a file specified, but do not make that file part of the project.

Mike
2 Replies
Highlighted
759 Views
Registered: ‎01-22-2015

Re: Constraints wizard rewrites all constraints

I completely agree with @maps-mpls that this behavior of the Vivado Constraints Wizard is "frustrating to say the least".

 

Another frustrating feature of the Constraints Wizard is that is strips off in-line comments.  For example, in the Tcl code below, "comment-1" will remain but "comment-2" will be stripped off - even though the set_property command is not being modified by the wizard.

 

# comment-1
set_property PACKAGE_PIN Y9 [get_ports clkn];  # comment-2
Highlighted
Scholar
Scholar
715 Views
Registered: ‎06-20-2017

Re: Constraints wizard rewrites all constraints

To recap, in the opinion of two users:

 

1.  The constraints wizard should not rewrite constraints, especially if those constraints were not in the target constraint file, and those constraints were not modified in the constraints wizard.  (Note:  The constraint wizard won't offer to create a constraint that already exists anyway, so this is a no brainer.)

2.  The constraints wizard should preserve [expr $a + $b] in constraints, which is just a variation of 1.

3.  The constraints wizard should not remove comments at the end of line in the form of tcl_cmd; # comment 2

 

Gratitude for anybody from Xilinx who acknowledges this feedback and forwards it to the developers. 

Mike