• 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. Code works a cds6 but not on cds5

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 13344
  • 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

Code works a cds6 but not on cds5

RVERP
RVERP over 12 years ago

 Hi, I have a procedure witch creates a pcell.  This is working in cds 6, but when I try to use it in cds5 it goes wrong.

 First piece of code is :

procedure( icsMatchedArrayUnit(libName cellName mosType l w pcDrainN)

 pcDefinePCell(

    ; Declare cell identifier
    list(ddGetObj(libName) cellName "layout")

    ; Set pcell parameters
    (
    (Unit int 1)
    (l float l)
    (w float w)
    (pcLibName string car(mosType))
    (pcViewName string cadr(mosType))
    (pcViewType string caddr(mosType))
    (pcDrainN int pcDrainN)
    )

 

It goes wrong after the second line, error I get is *WARNING* Invalid cell name - nil

 

Does somebody know what's wrong here?

Thanks
Rik

  • Cancel
  • RVERP
    RVERP over 12 years ago

    Ok, I already found that if I change libName and cellName with another name they both pass.  Are these two restricted names?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RVERP
    RVERP over 12 years ago
    Everything seems to work now, the placement of vias caused the remaining errors
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Effectively the problem is caused by the fact that you are relying on dynamic scoping when the pcell body is evaluated. The pcDefinePCell function is an "nlambda" function, and does not evaluate its arguments before it is called - because it contains code that you want to be evaluated later. As a result of this, certain variables may be being hidden by the code inside the implementation of pcDefinePCell.

    If instead you use the backquote function and then insert the values in the right place with the comma, and use eval() to evaluate the pcDefinePCell, it also works:

    procedure( icsMatchedArrayUnit(libName cellName mosType l w pcDrainN)

     eval(
      `pcDefinePCell(

        ; Declare cell identifier
        list(ddGetObj(,libName) ,cellName "layout")

        ; Set pcell parameters
        (
        (Unit int 1)
        (l float ,l)
        (w float ,w)
        (pcLibName string ,car(mosType))
        (pcViewName string ,cadr(mosType))
        (pcViewType string ,caddr(mosType))
        (pcDrainN int ,pcDrainN)
        )

        ; some dummy bit of code so that Andrew can test it
        let(()
        fprintf(stderr "Unit is %L\n" Unit)
        )
      )
     )
    )

    Andrew

    • 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