cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
amishmks
Adventurer
Adventurer
5,821 Views
Registered: ‎04-08-2009

using tcl to automate code generation

Hi,

 I am trying to automate code generation.

My TCL script needs to do the following:

1) Locate the file settings64.bat/settings32.bat on the hardrive

 

2) I need to run settings.bat before calling xilperl to run a perl script that parses a file

 

3) Go through setting up a planahead project with all files and generate bitstream.

 

I am stuck at step 1

I use to do it easily in perl by looking at registry entries so I wanted to do the same in tcl.

 

 

I tried to use the registry tcl commands

 

but the tcl script fails at this line:

package require registry

with error

can't find package registry

 

 

Is the package not included in the xilinx 14.4 TCL installation?

 

Thanks,

Amish

0 Kudos
1 Reply
daughtry
Xilinx Employee
Xilinx Employee
5,807 Views
Registered: ‎03-24-2008

Hello Amish,

 

Within a script you can use the general Tcl builtins to query the location of the executable - and you can find the settings batch file or shell script relative to that:

 

set bin [info nameofexecutable]
C:/Xilinx/Vivado/2013.1/bin/unwrapped/win64.o/vivado.exe

 

The settings*.bat file is 3 levels up from there.

 

In addition, you can use some environment variables that we define on your behalf when you invoke the tool to get there direction - this is probably more reliable:

 

array names env
RDI_PREPEND_PATH HOME RDI_PATASK PROCESSOR_IDENTIFIER RDI_BINROOT   .....
puts $env(XILINX)
C:/Xilinx/Vivado/2013.1/ids_lite/ISE
puts $env(HDI_APPROOT)
C:/Xilinx/Vivado/2013.1

 

I would invest in ways to parse your files with Tcl - and not depend upon xilperl being available indefinitely.  Tcl is the future.  ;-)

 

 

Greg Daughtry
Vivado Product Marketing Director, Xilinx, Inc.
0 Kudos