Xilinx 8.2i Life Jacket User Manual


 
Development System Reference Guide www.xilinx.com 99
Example Tcl Scripts
R
# rerun with only out-of-date partitions re-implemented
process run "Implement Design"
# close project
project close
Sample Tcl Script for Advanced Scripting
# create a new project and set device properties
project new watchvhd.ise
project set family virtex2p
project set device xc2VP2
project set package fG25
project get package
project set speed -7
# add the watch vhd files
xfile add dve_ccir_top.v
xfile add stopwatch.vhd statmatch.vhd cnt60.vhd dcm1.vhd decode.vhd
xfile add tenths.vhd hex2led.vhd watchvhd.ucf
# check that no partitions are present yet
set dus [search * -type partition]
# search for all design instances
set dus [search * -type instance]
# display all design instances
collection foreach du $dus {
puts "Name [object name $du], Type [object type $du]"
}
# confine search to the top-level instances only
set dus [search {/[^/]+/[^/]+} -type instance -regexp -exactmatch]
# define partitions for all the toplevel instances in the design (note
that the last partition created is returned)
partition new [search {/[^/]+/[^/]+} -type instance -regexp -
exactmatch]
# check that we created something
search * -type partition