Reply by jjplaw March 25, 20102010-03-25
Paul: 
Actually the exe is a part of another software. I cant control how it calls
the tcl script. I can only modify the tcl script.

Alan:
If i open a tclsh shell and ran 'source $env(XILINX)/bin/xilinx-init.tcl',
i'll get the same 2 error that you got.

I did raise this question in the Xilinx forum. A Xilinx employee gave me
the following solution:

[1] Create a second tcl script (second.tcl) that contains all the xilinx
tcl commands that i want to use.
[2] Include the following command in the first tcl script (first.tcl)
exec xtclsh second.tcl

So when the exe calls first.tcl, it'll in turn pass second.tcl to a xtclsh
shell to be evaluated.

It seems to be a bit of a workaround but it works.	   
					
---------------------------------------		
Posted through http://www.FPGARelated.com
Reply by Alan Fitch March 24, 20102010-03-24
On 23/03/10 12:23, jjplaw wrote:
> Newbie here. I'm running a program that invokes a tcl file. I'm trying to > execute the xilinx tcl commands from that tcl script. > > In the tcl script, i only have the following code. > > source $env(XILINX)/bin/xilinx-init.tcl > > But i received the following error when the script gets invoked: > > error reading package index file C:/Xilinx/10.1/ISE/bin/pkgIndex.tcl: load: > Cannot match with any static package. > Try "load_unsupported" to load dynamic packages into statically wrapped > applications. > error reading package index file C:/Xilinx/10.1/ISE/bin/pkgIndex.tcl: load: > Cannot match with any static package. > Try "load_unsupported" to load dynamic packages into statically wrapped > applications. > can't find package xilinx > while executing > "package require xilinx" > (file "C:\Xilinx\10.1\ISE/bin/xilinx-init.tcl" line 30) > invoked from within > "source $env(XILINX)/bin/xilinx-init.tcl" > ........... > .... >
OK, now I understand. I tried this on Linux (Fedora 12 with Xilinx 11.1) and it appeared to work. So I suggest you raise the issue with Xilinx, regards Alan P.S. This is what I did. The first 2 errors don't seem to have caused a problem. [apf@apfitch2 ~]$ tclsh % source $env(XILINX)/bin/xilinx-init.tcl ERROR:Scripting:2 - While trying to add a wrapper for TCL type int, an error occured: 1. This probably means that the TCL type has already been registered. ERROR:Scripting:2 - While trying to add a wrapper for TCL type int, an error occured: 1. This probably means that the TCL type has already been registered. % help project Tcl command: project (create and manage projects) The project command creates and manages ISE projects. A project contains all files and data related to a design. You can create a project to manage all of the design files and to enable different processes to work on the design. Syntax: % project <subcommand> Project subcommands: archive (archive all files belonging to the current ISE project) clean (remove system-generated project files) close (close the ISE project) get (get project properties) get_processes (get project processes) new (create a new ISE project) open (open an ISE project) properties (list project properties) save_as (save project as another ISE project) set (set project properties, values, and options) set device (set device) set family (set device family) set package (set device package) set speed (set device speed) set top (set the top-level module or entity) For help on a particular subcommand, type: % help project <subcommand> % -- Alan Fitch
Reply by Paul March 24, 20102010-03-24
> I intend to run most the xilinx tcl commands from project creation to > bitstream creation. But the script is being invoked from an exe file. When > the script gets invoked, it's evaluated in a Tcl regular shell causing all > the xilinx tcl commands to be undefined/no recognized.
Is there a reason why you are running your script with tclsh from your exe, rather than using xtclsh? xtclsh understands the xilinx tcl commands.
Reply by jjplaw March 23, 20102010-03-23
>What command are you using to execute the tcl? With Xilinx, I would >expect you to be using xtclsh, > >regards >Alan > >-- >Alan Fitch >
Probably i'm asking the wrong question. I intend to run most the xilinx tcl commands from project creation to bitstream creation. But the script is being invoked from an exe file. When the script gets invoked, it's evaluated in a Tcl regular shell causing all the xilinx tcl commands to be undefined/no recognized. How do i load/initialize the xilinx tcl libraries into that script so that i can use the xilinx tcl commands. I tried using "source $env(XILINX)/bin/xilinx-init.tcl" which was taken from the Xilinx Development System Reference Guide document(Chapter 3, page 54) but i received the error above. Please advise. --------------------------------------- Posted through http://www.FPGARelated.com
Reply by Alan Fitch March 23, 20102010-03-23
On 23/03/10 12:23, jjplaw wrote:
> Newbie here. I'm running a program that invokes a tcl file. I'm trying to > execute the xilinx tcl commands from that tcl script. > > In the tcl script, i only have the following code. > > source $env(XILINX)/bin/xilinx-init.tcl > > But i received the following error when the script gets invoked: > > error reading package index file C:/Xilinx/10.1/ISE/bin/pkgIndex.tcl: load: > Cannot match with any static package. > Try "load_unsupported" to load dynamic packages into statically wrapped > applications. > error reading package index file C:/Xilinx/10.1/ISE/bin/pkgIndex.tcl: load: > Cannot match with any static package. > Try "load_unsupported" to load dynamic packages into statically wrapped > applications. > can't find package xilinx > while executing > "package require xilinx" > (file "C:\Xilinx\10.1\ISE/bin/xilinx-init.tcl" line 30) > invoked from within > "source $env(XILINX)/bin/xilinx-init.tcl" > ........... > .... > > Anyone here with experience dealing with xilinx tcl commands? > Any idea how to solve this? Please advise.... >
What command are you using to execute the tcl? With Xilinx, I would expect you to be using xtclsh, regards Alan -- Alan Fitch
Reply by jjplaw March 23, 20102010-03-23
Newbie here. I'm running a program that invokes a tcl file. I'm trying to
execute the xilinx tcl commands from that tcl script.

In the tcl script, i only have the following code.

source $env(XILINX)/bin/xilinx-init.tcl

But i received the following error when the script gets invoked:

error reading package index file C:/Xilinx/10.1/ISE/bin/pkgIndex.tcl: load:
Cannot match with any static package. 
Try "load_unsupported" to load dynamic packages into statically wrapped
applications. 
error reading package index file C:/Xilinx/10.1/ISE/bin/pkgIndex.tcl: load:
Cannot match with any static package. 
Try "load_unsupported" to load dynamic packages into statically wrapped
applications. 
can't find package xilinx 
while executing 
"package require xilinx" 
(file "C:\Xilinx\10.1\ISE/bin/xilinx-init.tcl" line 30) 
invoked from within 
"source $env(XILINX)/bin/xilinx-init.tcl"
...........
....

Anyone here with experience dealing with xilinx tcl commands?
Any idea how to solve this? Please advise....

	   
					
---------------------------------------		
Posted through http://www.FPGARelated.com