Xilinx 8.2i manual Foreach iterate over elements in a collection, Get get collection property

Models: 8.2i

1 422
Download 422 pages 26.35 Kb
Page 85
Image 85

R

Tcl Commands for Advanced Scripting

foreach (iterate over elements in a collection)

The collection foreach command iterates over each object in a collection through an iterator variable. The iterator variable specifies the collection to interate over and the set of commands or script to apply at each iteration.

%collection foreach <iterator_variable> <collection_variable> {body}

collection is the name of the Xilinx Tcl command. foreach is the name of the collection subcommand. iterator_variable specifies the name of the iterator variable.

collection_variable specifies the name of the collection to iterate through. body specifies a set of commands or script to execute at each iteration.

Example:

% set colVar [search * -type instance]

 

% collection foreach itr $colVar {

 

puts [object name $itr]}

 

 

Description:

In this example, the set command is used in the first line to assign a

 

collection of instances to the colVar collection variable.

 

In the second line, the collection foreach command is used to iterate

 

over each object in the colVar collection.

 

itr is the name of the iterator variable.

 

Curly braces { } enclose the body, which is the script that executes at

 

each iteration. Note that the object name command is nested in the

 

body to return the value of the iterator variable, which is an instance

 

in this case.

 

 

Tcl Return:

An integer return of the number of times the script was executed.

 

 

Caution! You cannot use the standard Tcl-supplied foreach command to iterate over collections. You must use the Xilinx-specific collection foreach command. Using the Tcl-supplied foreach command may cause the collection to be deleted.

get (get collection property)

The collection get command returns the value of the specified collection property. Collection properties and values are assigned with the collection set command.

collection get <property_name>

collection is the name of the Xilinx Tcl command.

get is the name of the collection subcommand.

property_name specifies the name of the property you wish to get the value of. Valid property names for the collection get command are display_line_limit and display_type.

Example:

% collection get display_type

 

 

Description:

In this example, the collection get command is used to get the current

 

setting of the display_type property.

Tcl Return:

The set value of the specified property.

Development System Reference Guide

www.xilinx.com

85

Page 85
Image 85
Xilinx 8.2i manual Foreach iterate over elements in a collection, Get get collection property

8.2i specifications

Xilinx 8.2i is a significant version of the Xilinx ISE (Integrated Software Environment) that emerged in the early 2000s, marking an important milestone in the world of FPGA (Field-Programmable Gate Array) development. This version introduced a slew of advanced features, technologies, and characteristics that made it an indispensable tool for engineers and developers in designing, simulating, and implementing digital circuits.

One of the standout features of Xilinx 8.2i is its enhanced design entry capabilities. This version supports multiple design entry methods, including schematic entry, VHDL, and Verilog HDL, giving engineers the flexibility to choose their preferred approach. The integrated environment provides user-friendly graphical interfaces, making it accessible for both novice and experienced users.

Xilinx 8.2i's synthesis tools have been improved to enable more efficient design compilation and optimization. The new algorithms used in this version facilitate faster synthesis times while reducing power consumption and improving performance. Furthermore, it features support for advanced FPGA architectures, which allows for the implementation of more complex designs with greater efficiency.

The implementation tools in Xilinx 8.2i include advanced place and route capabilities, utilizing state-of-the-art algorithms for optimized resource usage. These tools enable designers to make better use of FPGA resources, ensuring that designs fit within the constraints of the target device while maximizing performance.

Another key characteristic of Xilinx 8.2i is its extensive support for various Xilinx devices such as the Spartan, Virtex, and CoolRunner series. This compatibility ensures that developers can leverage the powerful features of these FPGA families, including high-speed transceivers and DSP slices.

Xilinx 8.2i also places a strong emphasis on simulation and verification. The version integrates with various simulation tools, allowing for thorough testing of the designs before implementation. This reduces the risk of errors and ensures that the final product meets specifications.

In addition, this version includes support for design constraints, enabling engineers to specify timing, area, and other critical design parameters. By accommodating constraints, Xilinx 8.2i helps in achieving reliable and efficient designs tailored to project needs.

In summary, Xilinx 8.2i is a robust software development tool that enhances the design process for FPGAs. Its comprehensive features, including multiple design entry options, advanced synthesis and implementation tools, extensive device support, and strong simulation capabilities, make it a valuable resource for engineers and developers striving for innovation in digital design.