• 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. How to use procedure inside pcDefinePCell??

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 142
  • Views 8813
  • 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

How to use procedure inside pcDefinePCell??

FormerMember
FormerMember over 14 years ago

Hi ,

  Is it possible to create a pcell based on runnig of procedure?? I meant if the procedure has many conditions inside it, it should be able to produce pcell for each condition.

If calling a procedure inside a pcDefinePCell is not effective,then how can i link two codes.I meant i make a code using procedure(xyz(....))

in a code named myCode.il and in another code named myPCell.il i create pcells based on conditions given in myCode.il??

Can this be done??

Thanks,

C10

 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    Hi Carlton,

    Yes, you can do this. For example, here's an excerpt from a pcell definition done this way:

    /*************************************************************************
    * *
    * Function: *
    * AGDEdefinePC *
    * *
    * Arguments: *
    * [libName] *
    * *
    * Return Value: *
    * t *
    * *
    * Description: *
    * Create the pcell 'fingerCap'. *
    * By default the pcell will be placed in devlib library. *
    * If an other library is needed you only have to pass the new *
    * library name as parameter (it is optional). *
    * all pcell parameter are set to their default value. *
    * this code call the main function AGDEfingerCap which draw the *
    * entire fingerCap cell. *
    * *
    * Usage: *
    * AGDEdefinePC([libName]) *
    * *
    * *
    *************************************************************************/


    procedure( AGDEdefinePC( @optional ( libName "devLib" ) )

    ;; open the library ID
    libId = ddGetObj( libName )

    if(libName then

    ;; pcell Id setUp.
    cvId = pcDefinePCell( list( ddGetObj( libName ) "fingerCap" "layout")

    ;; default parameters setup.
    (
    (startLayer "M1")
    (stopLayer "M2")
    (fingers "2")
    (fingerLength "10")
    (topBarWidth "")
    (calcTopBarWidth boolean "TRUE")
    (botBarWidth "")
    (calcBotBarWidth boolean "TRUE")
    (addPlate "none")
    (fingerSpacing "")
    (calcFingerSpacing boolean "TRUE")
    (fingerEndSpacing "")
    (calcFingerEndSpacing boolean "TRUE")
    (stretchMode "fixed")
    )


    ;; Call the main function which the full Pcell.

    AGDEfingerCap(
    ?startLayer startLayer
    ?stopLayer stopLayer
    ?fingers fingers
    ?fingerLength fingerLength
    ?topBarWidth topBarWidth
    ?calcTopBarWidth calcTopBarWidth
    ?botBarWidth botBarWidth
    ?calcBotBarWidth calcBotBarWidth
    ?addPlate addPlate
    ?fingerSpacing fingerSpacing
    ?calcFingerSpacing calcFingerSpacing
    ?fingerEndSpacing fingerEndSpacing
    ?calcFingerEndSpacing calcFingerEndSpacing
    ?stretchMode stretchMode
    ?cvId pcCellView
    ) ; end AGDEfingerCap

    ) ; end pcDefinePCell
    dbSave( cvId )

    else
    ; lib dosn't exist, so wanr designer.
    warn( "Could not find library %s\n" libName )
    ) ; end if libName
    t

    ) ; end proc AGDEdefinePC

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • FormerMember
    FormerMember over 14 years ago

    Hai ,

        Thanks for the help.

    I also want to know if i could write codes in two separate files and then link them.I meant if i create a code

     example: procedure( myProc(....... ) and save as myProc.il and based on the conditions in myProc.il can i create pcells in another code? Example: i make pcells using pcDefinePCell( ......) and save in myPcell.il.

    Is it possible to link myProc.il and myPcell.il such that pcell in myPcell.il is created based on conditions in myProc.il? If its possible how to run these in separate files and link,if this is not pssible,please ignore my post.

    Thanks,

     C10

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    Hi Carlton,

    You can put whatever functions in whatever files you like. SKILL doesn't care - you need to load the files to use them though (e.g. using the load() function). Note it is possible to set up an autoload property so the source for a function is auto-loaded the first time you want to use it (search for autoload in the SKILL documentation). You don't need to "link" (whatever that means) the two files.

    So you can define a function in myProc.il and refer to it in myPcell.il - provided that the code has been loaded. One point I should make is that if you have your pcell code (within the pcDefinePCell macro) call auxilliary functions, those need to be defined (i.e. loaded) whenever the pcell is used. In the example I posted, I call a function AGDEfingerCap which was defined in a separate file; I just needed to ensure that all those auxilliary functions were loaded from the pcell library's libInit.il file (note you don't need to call the pcDefinePCell from the libInit.il file though, as the code for the pcell is stored within the pcell cellView once it has been created).

    Regards,

    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