• 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 5478
  • 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
  • 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
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to Ayushi Nirmal

    No, I'm not going to provide my "gmail" id (or even my Cadence email address) in a public forum. I thought you had some data to run this on yourself? I simply created a bunch of labels on the right layer like this:

    The white labels (in my case) where on layer text/drawing and the blue label on Metal1/drawing (because I didn't have an IP layer in my PDK). I can then put the code above into a file (say  CCFupdateLabels.il) and then do (once):

    load("CCFupdateLabels.il") in the CIW

    After loading, I just do:

    CCFupdateLabels(?layer "text")  ; you could just run CCFupdateLabels() since the layer would be the right layer. 

    Then the white & Technology and & Date_Time labels will get updated. The others are left alone.

    Andrew.

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

    Thank you so much Andrew for the code, it is working perfectly fine. Ok, I will try to understand the code by myself then.

    Regards,

    Ayushi.

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

    Hi Ayushi,

    I thought the comments in the code were clear enough, but let me describe in pseudo-code how it works:

    Date_Time=CompiledPattern("& Date_Time")
    Technology=CompiledPattern("& Technology")
    lpp=searchForLayerPurpose(layer purpose) # find lpp object for the layer-purpose you want
    foreach shape shapes_on_lpp
      when shape is a label
        if(patternMatch(Date_Time theLabel) then
          theLabel=updateDateTimeLabel()
        else if (patternMatch(Technology theLabel) then
          theLabel=updateTechnologyLabel()

    The cond function is a convenient way of doing if-then-else-if-else-if-else branches. If you're not sure about any of the functions used here, I suggest (if using IC617 or later) you can search in cdsFinder for the function and then press "More Info" to see the full documentation.

    Regards,

    Andrew.

    • 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 above explanation. Yes, sure I will take help from cdsFinder for more information. 

    Regards,

    Ayushi.

    • 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