cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
290 Views
Registered: ‎01-28-2018

Avoid damage of .xdc Files

Hi,

how can I avoid that VIVADO destroys my .xdc files after doing changes from within implementation??

The case:

I have a large .xdc file (more than 3,000 lines, written by myself).

It contains a large number of identical Modules, for each of which I assigned several pblock properties like this (7 is the module index in this example, 8 its number):

create_pblock pblock_8_ModA
add_cells_to_pblock [get_pblocks pblock_8_ModA] \
[get_cells -quiet [list {Gen_Modules[7].GenRealModules/SubU_32_Inst0} \
{Gen_Modules[7].GenRealModules/CompA_final_Inst0} \
{Gen_Modules[7].GenRealModules/Keccak_1600_final_Inst0/CompB_Cntrl_Inst} \
{Gen_Modules[7].GenRealModules/SubUCar_FF_Inst0} \
{Gen_Modules[7].GenRealModules/SubU_32_Inst1}]]

For a faster test of some changes, I reduced the number of Modules to lets say 5 (in reality, I reduced from 24 to 8).

Then I did some changes in placement in the implementation. When I closed the implementation, I was asked whether to save the changes. I clicked on "yes" and the tool damaged my .xdc file seriously.

In detail, it removed all pblock definitions for those modules that were not present in the test design (temporarily, in the example the modules 5 to 7, in reality the numbers from 8 to 23!). The definitions looked like this afterwards:

create_pblock pblock_N_ModA

(for N from 5 to 7 in this example).

This means that all the pblock definitions were gone, only the "create_pblock" lines remained for several hundred pblocks.

Is this behavoiur indended??

Any suggestions how to avoid this? (Besides saving the .xdc files each time at other locations what might be forgotten?)

Norbert

 

0 Kudos
2 Replies
Highlighted
Teacher
Teacher
256 Views
Registered: ‎07-09-2009

If I remember, you can have multiple xdc files,
and you add as many or as few to your design as you want. they are read in the order on the GUI.

And if in doubt,
some one will say, "you can do it in TCL".

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
Highlighted
233 Views
Registered: ‎01-22-2015

@norbertreifschneider 

Then I did some changes in placement in the implementation. When I closed the implementation, I was asked whether to save the changes. I clicked on "yes" and the tool damaged my .xdc file seriously.

I feel your pain.  The Constraints Wizard (last I checked) will also "damage my .xdc file seriously".

A way to manage this nastiness is to note that Vivado only writes stuff to the .xdc file that is marked as the "target" .xdc file.
target_constraints_file.jpg

So, as drjohnsmith says, you can have multiple .xdc files in your project.  In the above screenshot, constraint1.xdc is the main .xdc file for my project and constraints_temp.xdc is a temporary .xdc file.

On constraints_temp.xdc, I have right-click and selected "Set as Target Constraints File".  Then, after Vivado has written things to constraints_temp.xdc, I manually copy the things I like from constraints_temp.xdc into constraint1.xdc.  Finally, I again right-click constraints_temp.xdc and select "Disable File" so that Vivado does not use its contents during synthesis and implementation.

Mark