( ESNUG 360 Item 17 ) -------------------------------------------- [11/02/00]

From: Rajkumar Kadam <rkadam@asic.qntm.com>
Subject: Synopsys Tcl 'Collections' in DC Not Like Tcl 'Lists'!  Why!???

Hi John!

I thought that this may be useful for people using Tcl as their scripting
language for DC.  Synopsys has a new form of list equivalent in Tcl called
'collection'.  I assumed that the 'collection' worked similar to 'list' with
their custom commands, but it did not turn out so.

Following is the example which I thought should have worked logically.

  set in_list [all_inputs]
    foreach_in_collection element [all_clocks] {
        set in_list [remove_from_collection $in_list  $clock_name]
    }

I was trying to remove a collection item from an collection, but it does not
work.  The following was the workaround to make it work, which I achieved
with the help of a Synopsys FAE.

  set in_list [all_inputs]
  foreach_in_collection element [all_clocks] {
     set clock_name [get_port  $element]
     set in_list [remove_from_collection $in_list  $clock_name]
  }

Reasoning: You cannot remove a collection item from a collection which has
a different object class.  When you run all_clocks it returns a collection
which has a object class as clock.  When you run all_inputs it returns a
collection which has a object class as ports.

I understand this logic, but I really do not understand the need for having
such a limitation in Synopsys tools.  I always wanted it to be like Tcl
'list'.  Why not?

    - Rajkumar Kadam
      Quantum Corp.


 Sign up for the DeepChip newsletter.
Email
 Read what EDA tool users really think.


Feedback About Wiretaps ESNUGs SIGN UP! Downloads Trip Reports Advertise

"Relax. This is a discussion. Anything said here is just one engineer's opinion. Email in your dissenting letter and it'll be published, too."
This Web Site Is Modified Every 2-3 Days
Copyright 1991-2024 John Cooley.  All Rights Reserved.
| Contact John Cooley | Webmaster | Legal | Feedback Form |

   !!!     "It's not a BUG,
  /o o\  /  it's a FEATURE!"
 (  >  )
  \ - / 
  _] [_     (jcooley 1991)