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: 
Explorer
Explorer
2,174 Views
Registered: ‎05-14-2015

more readable XDC file

Hello,

There are always very long path name if we want to get a clock or a pin in our design. 

In order to make my .xdc scripts more readable, I made a XDC script as below. 

First, I use an variable "rxoutclk_out_0_1" and "rxoutclk_out_0_2" to replace their long path name.

Then, I can call this variable in the following scripts. In this way, my XDC file is more readable. 

 

set rxoutclk_out_0_1 {-of_objects [get_pins {i_uhdsdi_10gbe_top/i_uhdsdi_10gbe_wrapper/i_uhdsdi_10gbe_ctrl_ch2/g_ch2.i_gth_sdi_x1y13/inst/gen_gtwizard_gthe4_top.gth_sdi_x1y13_gtwizard_gthe4_inst/gen_gtwizard_gthe4.gen_channel_container[27].gen_enabled_channel.gthe4_channel_wrapper_inst/channel_inst/gthe4_channel_gen.gen_gthe4_channel_inst[0].GTHE4_CHANNEL_PRIM_INST/RXOUTCLK}]}
set rxoutclk_out_0_2 {-of_objects [get_pins {i_uhdsdi_10gbe_top/i_uhdsdi_10gbe_wrapper/i_uhdsdi_10gbe_ctrl_support/i_uhdsdi_10gbe_ctrl/g_ch1.i_gth_sdi_x1y12/inst/gen_gtwizard_gthe4_top.gth_sdi_x1y12_gtwizard_gthe4_inst/gen_gtwizard_gthe4.gen_channel_container[27].gen_enabled_channel.gthe4_channel_wrapper_inst/channel_inst/gthe4_channel_gen.gen_gthe4_channel_inst[0].GTHE4_CHANNEL_PRIM_INST/RXOUTCLK}]}

set_clock_groups -asynchronous -group [get_clocks $rxoutclk_out_0_1] \
                               -group [get_clocks $rxoutclk_out_0_2]

 

But, during synthesizing, 2 critical warnings popped out as below:

I checked and can't find why its an "unknown option"?

[Common 17-170] Unknown option '-of_objects [get_pins {i_uhdsdi_10gbe_top/i_uhdsdi_10gbe_wrapper/i_uhdsdi_10gbe_ctrl_support/i_uhdsdi_10gbe_ctrl/g_ch1.i_gth_sdi_x1y12/inst/gen_gtwizard_gthe4_top.gth_sdi_x1y12_gtwizard_gthe4_inst/gen_gtwizard_gthe4.gen_channel_container[27].gen_enabled_channel.gthe4_channel_wrapper_inst/channel_inst/gthe4_channel_gen.gen_gthe4_channel_inst[0].GTHE4_CHANNEL_PRIM_INST/RXOUTCLK}]', please type 'get_clocks -help' for usage info. ["C:/work/bsp/timings.xdc":18]
[Common 17-170] Unknown option '-of_objects [get_pins {i_uhdsdi_10gbe_top/i_uhdsdi_10gbe_wrapper/i_uhdsdi_10gbe_ctrl_ch2/g_ch2.i_gth_sdi_x1y13/inst/gen_gtwizard_gthe4_top.gth_sdi_x1y13_gtwizard_gthe4_inst/gen_gtwizard_gthe4.gen_channel_container[27].gen_enabled_channel.gthe4_channel_wrapper_inst/channel_inst/gthe4_channel_gen.gen_gthe4_channel_inst[0].GTHE4_CHANNEL_PRIM_INST/RXOUTCLK}]', please type 'get_clocks -help' for usage info. ["C:/work/bsp/timings.xdc":24]

 

 

0 Kudos
9 Replies
Voyager
Voyager
2,164 Views
Registered: ‎06-20-2017

Re: more readable XDC file

You could try something like this:

 

set GROUP0 [get_clocks -of_objects [get_ports iCLK0] -include_generated_clocks]]
set GROUP1 [get_clocks -of_objects [get_ports iCLK1] -include_generated_clocks]]
set GROUP2 [get_clocks -of_objects [get_cells {design_1_i/util_ds_buf/U0}] -include_generated_clocks]
set_clock_groups -asynchronous\
-group $GROUP0\
-group $GROUP1\
-group $GROUP2
Mike
0 Kudos
Highlighted
Historian
Historian
2,122 Views
Registered: ‎01-23-2009

Re: more readable XDC file

Tcl commands are a set of strings - the first string is the command, the second string the first option (or sub-command), the third string the next option, etc...

 

In your first command, you set the rxoutclk_out_0_1 to a single string which contains the whole "-of_objects [get_pins..." This is one string. So the get_clocks command sees a single option which is this massive string (with spaces, etc...). This one string is not a valid option.

 

While the first part of the string may be a valid option, you have instructed Tcl to take the whole string as the first option (which is why it fails).

 

This can be fixed with ugly use of the "eval" command (which forces the parser to re-parse the string after the first parsing/substitution phase), but that is not recommended.

 

As others have recommended, what you want is to have the rxoutclk_out_0_1 variable hold the clock object, not a string that you are trying to use as an option to the command

 

set rxoutclk_out_0_1 [get_clocks -of_objects [get_pins {i_uhdsdi_10gbe_top/i_uhdsdi_10gbe_wrapper/i_uhdsdi_10gbe_ctrl_ch2/g_ch2.i_gth_sdi_x1y13/inst/gen_gtwizard_gthe4_top.gth_sdi_x1y13_gtwizard_gthe4_inst/gen_gtwizard_gthe4.gen_channel_container[27].gen_enabled_channel.gthe4_channel_wrapper_inst/channel_inst/gthe4_channel_gen.gen_gthe4_channel_inst[0].GTHE4_CHANNEL_PRIM_INST/RXOUTCLK]

 

Now the variable will have the clock, and you can

 

set_clocks -asynchronous -group $rxcoutclk_out_0_1 -group $rxoutclk_out_0_2

 

Avrum

 

Tags (2)
0 Kudos
Voyager
Voyager
2,095 Views
Registered: ‎06-20-2017

Re: more readable XDC file

Any progress @softwind555?

Mike
0 Kudos
Explorer
Explorer
2,087 Views
Registered: ‎05-14-2015

Re: more readable XDC file

@maps-mpls,I tried, but failed with a new type of error. My .xdc is like this. 

set PLL_CLKOUT0 [get_clocks -of_objects [get_pins i_systempll/inst/mmcme4_adv_inst/CLKOUT0]]
set PLL_CLKOUT1 [get_clocks -of_objects [get_pins i_systempll/inst/mmcme4_adv_inst/CLKOUT1]]
set PLL_CLKOUT2 [get_clocks -of_objects [get_pins i_systempll/inst/mmcme4_adv_inst/CLKOUT2]]
			   
set_clock_groups -asynchronous -group $PLL_CLKOUT0 \
                               -group $PLL_CLKOUT1 \ 
							   -group $PLL_CLKOUT2 

The error is:

[Common 17-1550] Command failed: can't read "PLL_CLKOUT0": no such variable
 ["C:/work/timings.xdc":94]
0 Kudos
Explorer
Explorer
2,012 Views
Registered: ‎05-14-2015

Re: more readable XDC file

@maps-mpls@avrumw,

Do you have some other ideas to try? It's quite strange why Vivado can't handle variable of Tcl very well!

0 Kudos
Historian
Historian
1,964 Views
Registered: ‎01-23-2009

Re: more readable XDC file

Command failed: can't read "PLL_CLKOUT0": no such variable

 

I have no idea why you are getting this error. The commands you are using look valid, and I have used similar structures many many times.

 

So there is nothing inherently wrong with this. The problem must have something to do with something subtle - either where the constraints exist in files (if they are not in the same file, and there is a constraint file ordering issue) or there is some subtle typo like a hidden character difference (a zero that is the letter O or something like that).

 

Again, it is legal and it works to put clock objects in variables for use throughout the rest of your XDC file.

 

Avrum

0 Kudos
Explorer
Explorer
1,950 Views
Registered: ‎05-14-2015

Re: more readable XDC file

@avrumw, You're right. This is legal.  

But, I feel this is something Vivado should improve to suppress this confusing "no such variable" warning in the next version. 

 

I tried the xdc like below:

 

set PLL_CLKOUT0 [get_clocks -of_objects [get_pins i_systempll/inst/mmcme4_adv_inst/CLKOUT0]]
set PLL_CLKOUT1 [get_clocks -of_objects [get_pins i_systempll/inst/mmcme4_adv_inst/CLKOUT1]]		
set_clock_groups -asynchronous -group $PLL_CLKOUT0 \
                               -group $PLL_CLKOUT1

 

 

Then, Vivado will give a critical warning "no such variable" like below. But, this warning is only for Synthesis. 

Once I opened synthesized design, this warning is gone. 

XDC.png

 

Then, I checked Timing Constraints inside Synthesized Design. The constraint is already there: (see picture below). So, I feel Vivado should not pop out this warning. 

XDC.png

0 Kudos
Historian
Historian
1,942 Views
Registered: ‎01-23-2009

Re: more readable XDC file

This is not a "bug" nor something that needs to be suppressed. If the command is failing in synthesis, there is a reason. Most likely the clock doesn't exist during the synthesis pass. Take a look at this posting which describes a condition where clocks don't (yet) exist during synthesis.

 

Avrum

0 Kudos
Explorer
Explorer
1,921 Views
Registered: ‎05-14-2015

Re: more readable XDC file

@avrumw,

I feel this is different case. If the clock does not exist during the synthesis pass, the warning is like below in the green circle:

clock.png

0 Kudos