UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
7,148 Views
Registered: ‎05-17-2009

Vivado suggestion

Stop removing comments at the end of .XDC lines.  E.g.,


set_property PACKAGE_PIN C12 [get_ports ADC01_CS]        ;# B28

 

gets turned into


set_property PACKAGE_PIN C12 [get_ports ADC01_CS]  

 

... when I add a false path constraint in a timing report. 

0 Kudos
1 Reply
Historian
Historian
7,142 Views
Registered: ‎01-23-2009

Re: Vivado suggestion

.XDC files are sort of wierd things (at least in project mode) in Vivado.

 

XDC files are written in Tcl, and as such are interpreted (not compiled) by Vivado at various stages of the implementation process. These files are actually executed line by line when they are needed.

 

However, Vivado also has mechanisms within the tool (including the GUI) to modify constraints on an open design. These mechanisms are powerful and helpful - allowing pin locations and properties to be set, pblock manipulation, location constraints on cells within the design and a whole bunch of timing constraints to be manipulated. When you do so, the constraints applied to the design now differ from the ones that were read in from the XDC when the design was opened. 

 

To deal with this, Vivado can "write back" the modified constraints to the XDC files. When it does so, it does its best to preserve the original constraint files, in terms of order, structure, and comments. However, its not perfect - its inherently very hard to do, since Vivado is trying to dump a database of constraints to a file that is inherently a Tcl script that is interpreted. I am surprised that it is removing your comments (its probably not supposed to), but it is understandable that it has.

 

You have some control over this process. First of all, you can always say "No" when the tool tells you that you have unsaved constraints, would you like them saved. I, personally, am not a fan of having Vivado write my constraints - so when I modify them in the GUI (which I do to try things out and make sure they are working properly), I manually copy the constraints that were added in the GUI (they are all visible on the Tcl Console, even if they were created with the helpers in the GUI) into my XDC file, and then say "no" to Vivado when it asks to save them.

 

Another thing you can do is split your constraints into multiple XDC files. You can put all your physical constraints in one XDC file and the timing constraints in another (and add both of them to your project). You can then select the file with the timing constraints as the "Target" XDC file, and, as long as you don't change any of the physical constraints, Vivado should leave the file with the physical constraints alone. That will (at least) prevent the comments in your physical constraint file from being eaten.

 

You can even specify a third, empty, XDC file as the target XDC file. All new constraints will then be written to that file. However, if you modify an existing constraint, Vivado has no choice but to modify the file where the original constraint came from, whether it is or is not the target XDC file.

 

So, its your choice - if you want to take advantage of the powerful mechanisms that the VIvado GUI provides for creating constraints (and then saving them), you will have to put up with the possibility that your constraint file formatting (and comments) can be messed up.

 

Avrum

0 Kudos