• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Skill languag(beginner level)

Stats

  • Locked Locked
  • Replies 16
  • Subscribers 143
  • Views 5474
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Skill languag(beginner level)

Ayushi Nirmal
Ayushi Nirmal over 6 years ago

Hello All, 

I am new to skill language and am trying to substitute a label instead of already existing label in a layout design. Can someone please tell me the problem with my code.

cv=dbOpenCellViewByType("ayushi" "pmc_skr_0p8_por_1" "layout" "" "a")
l=cv~>layerPurposePairs
for(i 0 length(l)-1 if(nth(i l)~>layerName=="IP" then sh=nth(i l)~>shapes f=sh~>theLabel subst('abc 'Cell_Id pmc_skr_0p8_por f )))
dbSave(cv)

On loading the particular program into CIW, i am getting this error -

load "/home/nxf51613/random.il"
*Error* eval: unbound variable - pmc_skr_0p8_por
*Error* load: error while loading file - "/home/nxf51613/random.il" at line 3

I dont understand why pmc_skr_0p8_por is showing as an unbound variable whereas it is being listed in the layout when listed.  

Thanks,

Regards, 

Ayushi.

  • Cancel
Parents
  • mbracht
    mbracht over 6 years ago

    Hi Ayushi,

    What do you mean "pmc_skr_0p8_por is being listed in the layout when listed" ? Where is this variable coming from? What do you get when you type it into the CIW input pane?

    Other than that there is a more straight forward way to iterate over all shapes on a given layer - which is what you do in your for loop don't you...
    foreach shape (setof shape cv~>shapes shape~>layerName=="IP")
       ....
    )

    Max

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Ayushi Nirmal
    Ayushi Nirmal over 6 years ago in reply to mbracht

    Hey Max,

    Thanks for the alternative iterative approach. Actually, "pmc_skr_0p8_por" is one of the labels. And, I want to write a script that changes this label with some other name. Thats why i have used subst function over the list.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Ayushi Nirmal
    Ayushi Nirmal over 6 years ago in reply to mbracht

    Hey Max,

    Thanks for the alternative iterative approach. Actually, "pmc_skr_0p8_por" is one of the labels. And, I want to write a script that changes this label with some other name. Thats why i have used subst function over the list.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • mbracht
    mbracht over 6 years ago in reply to Ayushi Nirmal

    Hi Ayushi,

    The subst() function is for one destructive which means it leaves the original list (f in your example) untouched. Other than that it expects three arguments but you call it with fours args.

    I need more info about what you really want to do. You want to change the text of labels correct? Do you want to do this for just one specific or for all labels? If just for one,- which one? If for all - should all labels have the same text or what? Please specify more detailed what you want to do!

    Max

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Ayushi Nirmal
    Ayushi Nirmal over 6 years ago in reply to mbracht

    Ok, Actually i have used 3 arguments above in the subst() function. Yes, i want to change the text of labels in the layout with the help of script. And I want the text of the label to changed which will be user specified and for all the occurences of this label.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to Ayushi Nirmal

    It's really not that clear what you expect your code to do, but as Max said there are several things wrong. You shouldn't use nth in a for loop to loop over a list - you should do:

    foreach(lpp l
      when(l~>layerName=="IP
        ...
      )
    )

    It's complaining about the pmc_skr_0p8 as being a variable because you have it as the 3rd argument to subst. That's expecting a list - and you've given the name of a non-existent variable

    What do the labels look like? What are you expecting them to change to? Please give some examples - and then we can give you more of an idea as to what you should be doing.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Ayushi Nirmal
    Ayushi Nirmal over 6 years ago in reply to Andrew Beckett

    Hi Andrew,

    I have a layout in which i have written some lines of texts. Now I want to change any selected text through the script.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to Ayushi Nirmal
    Ayushi Nirmal said:
    I have a layout in which i have written some lines of texts. Now I want to change any selected text through the script.

    You didn't answer my questions. What you've said is (mostly) the obvious part of what you're trying to do; you still haven't provided the details I asked for in order to give you clearer direction.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Ayushi Nirmal
    Ayushi Nirmal over 6 years ago in reply to Andrew Beckett

    Like in the layout, Suppose I have put labels as its date, time, technology used, company's name, etc. Now I am asked to change these labels through a script such that the date is changed as desired, technology is changed as per our convenience... I want such kind of a change. Without going into the layout design, I can simply run a script over it.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to Ayushi Nirmal

    OK, you still aren't giving enough information. How can you identify which is the label with the date info, time info or technology info? Are these identifiable in some way or do you just have arbitrary labels?

    I don't know how you expect somebody to figure out precisely what you want with such vague descriptions... your requirement was originally (in the first code) to look over all the shapes and find things on a particular layer. Then you are talking about changing the selected labels. Now you're looking for labels with particular information and changing those without saying if there is some way of identifying the labels. How would I know which label contained the date? Which label contained the time? Is it on a specific layer? Does it have a property to indicate it as special? Is there a prefix to the label to allow me to identify it (e.g. if it said "Date: 10 April 2019" or "Time: 10:30am" or "Technology: gpdk045")?

    Clear questions are much more likely to get clear answers (or even an answer at all).

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Ayushi Nirmal
    Ayushi Nirmal over 6 years ago in reply to Andrew Beckett

    Yes, the layer in which the label is specified is the IP layer. It has a prefix of &. Example is "& Date_Time 20190114". I have to find this label and then modify it accordingly.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to Ayushi Nirmal

    Something like this would be a good basis of your code. The Technology label handling is just a suggestion to show what it might look like if you have labels such as "& Technology MyTech180":

    procedure(CCFupdateLabels(@key (cvId geGetEditCellView()) (layer "IP") 
            (purpose "drawing"))
        let((lpp Date_Time Technology currentTime)
            currentTime=timeToTm(stringToTime(getCurrentTime()))
            ;----------------------------------------------------------------
            ; Define any regular expressions needed to identify the labels
            ;----------------------------------------------------------------
            Date_Time=pcreCompile("^& Date_Time")
            Technology=pcreCompile("^& Technology")
            ;----------------------------------------------------------------
            ; Find the right layer purpose
            ;----------------------------------------------------------------
            lpp=car(
                exists(LP cvId~>lpps LP~>layerName==layer && 
                    LP~>purpose==purpose)
            )
            foreach(shape lpp~>shapes
                when(shape~>objType=="label"
                    cond(
                        ;----------------------------------------------------
                        ; Look for date labels - update to current time
                        ;----------------------------------------------------
                        (pcreExecute(Date_Time shape~>theLabel)
                            shape~>theLabel=
                                sprintf(nil "& Date_Time %04d%02d%02d"
                                    currentTime->tm_year+1900
                                    currentTime->tm_mon+1
                                    currentTime->tm_mday
                                )
                        )
                        ;----------------------------------------------------
                        ; Look for technology labels - update to current
                        ; tech lib name
                        ;----------------------------------------------------
                        (pcreExecute(Technology shape~>theLabel)
                            shape~>theLabel=
                                sprintf(nil "& Technology %s"
                                    techGetTechFile(cvId)~>libName
                                )
                        )
                        ;----------------------------------------------------
                        ; Add other condition branches here
                        ;----------------------------------------------------
                    )
                )
            )
            t
        )
    )
     
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Ayushi Nirmal
    Ayushi Nirmal over 6 years ago in reply to Andrew Beckett

    Hi Andrew,

    Thank you so much for the help but I am facing difficulties in understanding the code. Could you please provide me your Gmail Id and we can communicate better there. Also can you provide me a test bench for the above code since I am not able to execute it.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information