Remove_from_collection, Remove_from_collection –116 – Altera SDC and TimeQuest API User Manual

Page 126

Advertising
background image

2–116

Chapter 2: SDC and TimeQuest API Package and Commands

sta

SDC and TimeQuest API Reference Manual

© December 2009

Altera Corporation

remove_from_collection

Usage

remove_from_collection <base_collection> <items_to_remove>

Options

<base_collection>: Collection to remove items from

<items_to_remove>: Items to be removed from base_collection

Description

This command takes two collections and returns a new collection that is the difference of the two,
effectively the second collection subtracted from the first collection. The second collection can be a string,
but the first has to be previously-created collection: either by passing any of the "get_" functions directly, or
by passing a variable that contains a collection (see code examples for this command). If a collection is
used for the second argument, the types in the second collection must be the same as or a subset of the
types in the first collection.

If the first collection consists of keepers, the second collection can only consist of keepers, registers or
ports. If the first collection consists of partitions, the second collection can only consist of partitions or
cells. If the first collection consists of nodes, the second collection can only consist of nodes, keepers,
registers, ports, pins, nets or combinational nodes.

Example

set a_keeprs [get_keepers a*]
set a1_regs [get_registers a1*]

set keeprs_without_a1 [remove_from_collection $a_keeprs $a1_regs]

#or:
set keeprs_without_a1 [remove_from_collection $a_keeprs \
[get_registers a1*]]

#or even:
set keeprs_without_a1 [remove_from_collection $a_keeprs a1*]

# - note that the last statement will actually remove all keepers with
# name a1*
# not only registers! (will remove IOs with name a1*, if any)

# Get the first 100 nodes in the collection.
query_collection $keeprs_without_a1 -limit 100

Advertising