• 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. Reassign a layout instance with SKILL

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 4945
  • 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

Reassign a layout instance with SKILL

TravisMN
TravisMN over 1 year ago

I am attempting to reassign an instance in a layout with SKILL, but it does not appear to be saving upon reassignment. Here is my code:

procedure(senseAmpBuilder(sourceLib destLib sourceCell csvFile)
     sourceLibId = ddGetObj(sourceLib)
     destLibId = ddGetObj(destLib)

    sourceInst = dbOpenCellViewByType(sourceLibId "diff_000101" "layout" "maskLayout" "a")
    destCvId = dbOpenCellViewByType(destLibId "TG2" "layout" "maskLayout" "a")

    foreach(inst destCvId~>instances
        printf("\t\tFound instance %L\n" inst~>cellName)
        if(inst~>cellName == "base_diff"
        then
            printf("\t\tReplacingbase_diff with %L\n" "diff_000101")
            printf("\nsaveInst~>cellName: %L\tinst~>cellName: %L\n" sourceInst~>cellName inst~>cellName)
            inst = sourceInst
            printf("\nsaveInst~>cellName: %L\tinst~>cellName: %L\n" sourceInst~>cellName inst~>cellName)
            printf("\t\tReplaced lyx_pm_sa_base_diff with %L\n" inst~>cellName)
         )
     )

    dbSave(destCvId)
    dbClose(destCvId)
    printf("\nJob Done!\n")
)

My terminal prints the following:

function senseAmpBuilder redefined
t
        Found instance "base_diff"
        Replacing base_diff with "diff_000101"

saveInst~>cellName: "diff_000101"    inst~>cellName: "base_diff"

saveInst~>cellName: "diff_000101"    inst~>cellName: "diff_000101"
        Replaced base_diff with "diff_000101"
        Found instance "base_latch"
        Found instance "base_diffpu"
        Found instance "nor2_atd"
        Found instance "nor2_atd"

Job Done!
t

I am not getting any errors and since my cellName changes, it appears to be reassigned. But when I check the layout, there are no changes, even though I am saving destCvId at the end. Is there something I do not understand or another way I should be reassigning the layout instances?

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    Your code is not actually replacing anything. The line:

                inst = sourceInst

    does not change anything in the database - it merely assigns the variable inst to be equal to the database object stored in the variable sourceInst. The original instantiation in the database itself remains unchanged. What you need to do is:

                inst~>master = sourceInst

    Note too that your variable names are a bit confusing - sourceInst is not actually an instance - it's a cellView (or a master) - so calling it sourceInst is a bit misleading.

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    Your code is not actually replacing anything. The line:

                inst = sourceInst

    does not change anything in the database - it merely assigns the variable inst to be equal to the database object stored in the variable sourceInst. The original instantiation in the database itself remains unchanged. What you need to do is:

                inst~>master = sourceInst

    Note too that your variable names are a bit confusing - sourceInst is not actually an instance - it's a cellView (or a master) - so calling it sourceInst is a bit misleading.

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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