Home > Community > Forums > Custom IC Design > Mapping a 'cv~>prop' array with any other array

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Mapping a 'cv~>prop' array with any other array 

Last post Tue, Aug 27 2013 10:11 AM by Andrew Beckett. 4 replies.
Started by shazzy 14 Aug 2013 06:10 AM. Topic has 4 replies and 370 views
Page 1 of 1 (5 items)
Sort Posts:
  • Wed, Aug 14 2013 6:10 AM

    • shazzy
    • Not Ranked
    • Joined on Tue, Apr 2 2013
    • Bangalore, Karnataka
    • Posts 7
    • Points 155
    Mapping a 'cv~>prop' array with any other array Reply

    A set of selected pin labels are put into a list by doing :-

     

    cv=geGetSelSet()

    cv~>theLabel 

    =>  ("A<0>" "A<1>" "A<2>")

     

    Another array after some operation increments the set of these pin labels by 3, i.e. :-

     

    a = ("A<3>" "A<4>" "A<5>")

     

    If one wants to sequentially substitute every element of array 'a' into the cv~>theLabel array ( in order to change the pin labels in the layout view also ) then how to proceed ?

     

    I tried the following things which arent working :-

    1.A simple assignment operator

    2. foreach mapcar

    3. setof 

     

    There is though one important finding which shows that when one label is selected, then even a simple assignment operator works i.e.

     

    cv~>theLabel   =>    ("A<0>")

    a                     =>   ("A<4>")

    cv~>theLabel=a

    cv~>theLabel   =>    ("A<4>")

     

    but the challenge remains when multiple pin labels are selected

    • Post Points: 20
  • Thu, Aug 15 2013 10:12 AM

    • theopaone
    • Top 100 Contributor
    • Joined on Tue, Feb 12 2013
    • Cedar Park, TX
    • Posts 77
    • Points 1,160
    Re: Mapping a 'cv~>prop' array with any other array Reply

     You have a list of objects which must be processed separately. If you have the text selected, you get all the selected objects using txtObjs = geGetSelectedSet()

    Then process the individual objects in  a foreach loop:

    foreach( obj txtObjs
       when(obj~>objType == "label"
          obj~>theLabel = newLabel ))

    Ted

    • Post Points: 20
  • Thu, Aug 15 2013 10:23 PM

    • shazzy
    • Not Ranked
    • Joined on Tue, Apr 2 2013
    • Bangalore, Karnataka
    • Posts 7
    • Points 155
    Re: Mapping a 'cv~>prop' array with any other array Reply

    Hi Ted

    Thanks for the help  but when I tried ur following code, in that every label in the txtObjs array becomes equal to the newLabel.

     

    I tried this :- 

     

    A set of pins were selected   =>   A<0>  A<1>  A<2> 

    After which I wrote the following code

     

    txtObjs = geGetSelectedSet()            =>     (" a set of cv numbers")

    foreach(obj txtObjs

       when(obj~>objType == "label"
          obj~>theLabel = newLabel ))       =>     ("newLabel" "newLabel" "newLabel")

     

     

    What I want to do is that every element of the cv~theLabel array ( i.e.  ("A<0>" "A<1>" "A<2>" "nil") )  should  be mapped with the element of an array ' a '  (  i.e.  ("A<3>" "A<4>" "A<5>" "nil")  )  such that  finally the  cv~theLabel array becomes equal to  ( ("A<3>" "A<4>" "A<5>" "nil")  and the pin labels in the layout window changes accordingly.

    • Post Points: 35
  • Mon, Aug 19 2013 10:14 AM

    • theopaone
    • Top 100 Contributor
    • Joined on Tue, Feb 12 2013
    • Cedar Park, TX
    • Posts 77
    • Points 1,160
    Re: Mapping a 'cv~>prop' array with any other array Reply

     You supply the algorithm to map the original name to the new name and puts the new value into the variable newLabel inside the loop.

     

    • Post Points: 5
  • Tue, Aug 27 2013 10:11 AM

    Re: Mapping a 'cv~>prop' array with any other array Reply

    foreach((obj labelVal) txtObjs a
      when(obj~>objType=="label"
        obj~>theLabel=labelVal
      )
    )

    This assumes that txtObjs has the same number of entries as the list in variable a. By making the first argument to foreach a list of two variables, it will process both lists in parallel.

    Note: A bit of terminology here - "cv" normally means "cellView" and so it's rather confusing to call a list of objects "cv". These are lists not arrays (arrays are normally random access whereas lists are sequential).

    Regards,

    Andrew.

    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by shazzy at 14 Aug 2013 06:10 AM. Topic has 4 replies.