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: 
Voyager
Voyager
240 Views
Registered: ‎10-12-2016

unmanaged tcl script for constraint set ?

Jump to solution

HI Friends, 

 

In UG903 v2019.1 : page 7, 

mentioned that read_xdc -unmanaged command. Can you please explain below statement more clearly and with small example if possible.

Generate the constraints with an unmanaged Tcl script.      <-----  How ?
To execute the Tcl script, do one of the following:
° Run the source command.
° Use the read_xdc -unmanaged command.          <-----------  This statement is  not clear 
° Add the Tcl script to one of your project constraints sets.   <--------  How to add tcl script to constraint set?

Any help or suggestion is highly appreciated. 

-Sam

-Sampath
0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
228 Views
Registered: ‎11-04-2010

Re: unmanaged tcl script for constraint set ?

Jump to solution

Hi, @ssampath ,

Generate the constraints with an unmanaged Tcl script.      <-----  How ?

TCL script means it's unmanaged. You just need to save the constraint into tcl script file (XX.tcl)
To execute the Tcl script, do one of the following:
° Run the source command.

Ex: source ./XX.tcl
° Use the read_xdc -unmanaged command.          <-----------  This statement is  not clear 

Add the file with the below command in TCL CONSOLE:

read_xdc -unmanaged ./t2.xdc

° Add the Tcl script to one of your project constraints sets.   <--------  How to add tcl script to constraint set?

Add the tcl script into project constraints sets just like adding xdc and you can refer to the attached pic

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
t7.png
0 Kudos
5 Replies
Moderator
Moderator
229 Views
Registered: ‎11-04-2010

Re: unmanaged tcl script for constraint set ?

Jump to solution

Hi, @ssampath ,

Generate the constraints with an unmanaged Tcl script.      <-----  How ?

TCL script means it's unmanaged. You just need to save the constraint into tcl script file (XX.tcl)
To execute the Tcl script, do one of the following:
° Run the source command.

Ex: source ./XX.tcl
° Use the read_xdc -unmanaged command.          <-----------  This statement is  not clear 

Add the file with the below command in TCL CONSOLE:

read_xdc -unmanaged ./t2.xdc

° Add the Tcl script to one of your project constraints sets.   <--------  How to add tcl script to constraint set?

Add the tcl script into project constraints sets just like adding xdc and you can refer to the attached pic

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
t7.png
0 Kudos
Voyager
Voyager
219 Views
Registered: ‎10-12-2016

Re: unmanaged tcl script for constraint set ?

Jump to solution

Thank you  so much @hongh  foyour patience. 

 

anyway we are using xdc file then what is the need to use xdc constraints inside tcl script and sourcing it and adding it to again constraints set ?

Are there any specific cases which are necessary required tcl script for xdc ?

-Sam

 

-Sampath
0 Kudos
Moderator
Moderator
213 Views
Registered: ‎11-04-2010

Re: unmanaged tcl script for constraint set ?

Jump to solution

Hi, @ssampath ,

Only small parts of the tcl commands are supported in the XDC files. 

If you intend to use the tcl commands which is unsuported in XDC, you have to use an unmanaged XDC/TCL.

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Voyager
Voyager
196 Views
Registered: ‎10-12-2016

Re: unmanaged tcl script for constraint set ?

Jump to solution

Thank You @hongh , 

I understood, Can you please provide small example so that it's more clear to me or even any reference also fine. 

-Sam

-Sampath
0 Kudos
Historian
Historian
114 Views
Registered: ‎01-23-2009

Re: unmanaged tcl script for constraint set ?

Jump to solution

I think you may be confusing a number of concepts...

A given constraint is only specified once. However, there are multiple different ways of bringing that constraint into your design, depending on a number of things.

The first thing is that there are two separate modes of Vivado, project mode and non-project mode. The way constraints are brought in are different in the two modes.

In non-project mode, constraint files are read in using either

  • read_xdc <filename>
    • This is a managed XDC file
  • read_xdc -unmanaged <filename>
    • This is an unmanaged constraint file
  • source <filename of file that contains constraints>
    • This is also an unmanaged constraint file

In project mode, a constraint file is added to a constraint set. This is done

  • Using the GUI "Add Sources -> Add or create constraints"
    • If the suffix of the file is .xdc then this is a managed constraint file
    • If the suffix of the file is .tcl then this is an unmanaged constraint file
  • add_files -fileset constrs_1 <filename> or import_files -fileset constrs_1 <filename>
    • If the suffix of the file is .xdc then this is a managed constraint file
    • If the suffix of the file is .tcl then this is an unmanaged constraint file

There are advantages and disadvantages to using managed vs. unmanaged constraints file

  • A managed constraint file allows the constraints to be "managed"
    • Advantatges
      • The constraints will show up in the Constraints window of the GUI
      • The constraints wizard will be aware of them
      • The constraints will be written out in an checkpoint written with write_checkpoint
      • The constraints will be used when the design is encapsulated as an IP
      • (and a bunch of other places)
    • Disadvantages
      • A managed constraint file is only allowed to use a limited subset of the Tcl language
        • Noteably, if, while, for, functions, and other "advanced" Tcl constructs are not allowed in managed XDC files
  • Unmanaged constraint file
    • Advantage
      • Can use the entire Tcl syntax
    • Disadvantage
      • The constraints aren't managed - they are basically invisible to all the things I listed above. They will still affect the design as intended (i.e. they are still constraints on the design), but they will not show up in all those "helper" processes I listed above

In general, you should stay away from unmanaged constraints. There are lots of places that it is assumed that all constraints are managed, and its hard for me to give you a list of cases where it is OK and not OK to use unmanaged constraint files. Furthermore, most of the time that people want to use unmanaged constraints (i.e. to use a syntax that is not allowed in managed constraint files) there is usually a mechanism of accomplishing the same goal using constraints that use only XDC compliant syntax.

Avrum

0 Kudos