cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
1,328 Views
Registered: ‎02-08-2013

Vavido Automatic Rewriting of Constraint Files

Jump to solution

Something should be done differently with how Vivado handles updating constraint files after editing. This design has 4 constraint files - Pins, Clocks, Misc, and New. New is marked as the target and any new constraints created end up there until I can move them to the correct file. The issue I have is Vivado just rewrote my whole Clocks constraint file which I had nicely organized and commented. I only added a new multicycle constraint and it felt the need to rewrite the complete clocks file. The new multicycle constraint should have only be added to the target file (New) and the Clocks file should not have been touched. Also when editing constraints it removes ones that are altered or deleted, which it needs to, but it does so without warning.

 

I believe the constraint editor should not touch constraints that don't change. It should not delete but comment out constraints that are no longer necessary along with a time-date stamp note that Vivado did the commenting.

And/Or maybe some kind of dialog (perhaps optional) that would inform me of the changes before they are carried out. 

 

It's kind of a issue of ownership. I want own the constraint files not Vivado. I gave it a file to play with (New) and it should not touch the others except when it needs to remove a constraint (then comment out as described above). It's no different if Vivado started modifying the VHDL source files. I don't think people would be happy with that.

 

I'm a hands on designer so this kind of behavior is not helpful. I manually edit the constraints as often as using the editor. And yes I understand I could make copies of the files then compare to see what has changed but I don't feel that is how a tool like this should work. Just a suggestion for the future.

 

Regards, Ray Haynes, Ostendo Technologies, Inc. Carlsbad, CA
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Guide
Guide
1,693 Views
Registered: ‎01-23-2009

Re: Vavido Automatic Rewriting of Constraint Files

Jump to solution

Welcome to the constraint management system of Vivado...

 

The tools try and do their best - and admittedly, the circumstances you describe should have resulted in the new constraint being written to the target XDC file, and not one of the others...

 

But...

 

There are cases where the tools will write to any XDC file when you save your constraints - even ones that aren't your target XDC file. And when it does so, it will mess up your formatting, ordering and comments. There is no way around this - Xilinx is using an interpreted scripting language (XDC, which are implemented in Tcl) for managing a constraint database - these kinds of problems are inherent in the choice (and I believe correct and best choice) for how to implement the constraint management system.

 

So my rule of thumb is NEVER LET THE TOOLS WRITE CONSTRAINTS. The GUI can be incredibly helpful for creating complex constraints. When you use the GUI to create a constraint, it puts the constraint command in the Tcl console. My suggestion is simply cut it from the console, and paste it to the file you want, and then NEVER let the tool save the constraints - when you close the design simply say "No" when it asks you to save the constraints.

 

This way you get to keep control over your constraint files.

 

Avrum

View solution in original post

5 Replies
Highlighted
Moderator
Moderator
1,282 Views
Registered: ‎01-16-2013

Re: Vavido Automatic Rewriting of Constraint Files

Jump to solution
Hi Ray,

I am looking into this post and will update soon.
I have checked using one small test case yesterday but was not able to reproduce the issue. Let me see if with large design if I can able to reproduce this issue.

Thanks,
Yash
P.S. I was using RHEL OS.
0 Kudos
Highlighted
Guide
Guide
1,694 Views
Registered: ‎01-23-2009

Re: Vavido Automatic Rewriting of Constraint Files

Jump to solution

Welcome to the constraint management system of Vivado...

 

The tools try and do their best - and admittedly, the circumstances you describe should have resulted in the new constraint being written to the target XDC file, and not one of the others...

 

But...

 

There are cases where the tools will write to any XDC file when you save your constraints - even ones that aren't your target XDC file. And when it does so, it will mess up your formatting, ordering and comments. There is no way around this - Xilinx is using an interpreted scripting language (XDC, which are implemented in Tcl) for managing a constraint database - these kinds of problems are inherent in the choice (and I believe correct and best choice) for how to implement the constraint management system.

 

So my rule of thumb is NEVER LET THE TOOLS WRITE CONSTRAINTS. The GUI can be incredibly helpful for creating complex constraints. When you use the GUI to create a constraint, it puts the constraint command in the Tcl console. My suggestion is simply cut it from the console, and paste it to the file you want, and then NEVER let the tool save the constraints - when you close the design simply say "No" when it asks you to save the constraints.

 

This way you get to keep control over your constraint files.

 

Avrum

View solution in original post

Highlighted
Explorer
Explorer
1,229 Views
Registered: ‎10-05-2010

Re: Vavido Automatic Rewriting of Constraint Files

Jump to solution

@avrumwwrote:

Welcome to the constraint management system of Vivado...

 

So my rule of thumb is NEVER LET THE TOOLS WRITE CONSTRAINTS.


My second line of defense is to check my constraints files back into revision control as soon as I change them. Then it's easy to revert a Vivado rewrite.

 

---

Joe

Highlighted
Adventurer
Adventurer
1,208 Views
Registered: ‎02-08-2013

Re: Vavido Automatic Rewriting of Constraint Files

Jump to solution
It has only done it once that I noticed and I can't say what triggered it. But if I follow avrumw and josephsamson's suggestions I'll be good.
Regards, Ray Haynes, Ostendo Technologies, Inc. Carlsbad, CA
0 Kudos
Highlighted
Adventurer
Adventurer
1,185 Views
Registered: ‎02-08-2013

Re: Vavido Automatic Rewriting of Constraint Files

Jump to solution
More info. It sometimes happens when I rerun Constraint Wizard. I have a couple of reasons why I might rerun the Wizard first sometimes I'll only accept some of the suggested constraints and then rerun later. Second I make some kind of clock structure change and I'll rerun the Wizard again to pick up any new clocks
Regards, Ray Haynes, Ostendo Technologies, Inc. Carlsbad, CA