• 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 PCell - Functions and Global Variables undefined during...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 1615
  • 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 PCell - Functions and Global Variables undefined during Stream Out

kdolan
kdolan over 2 years ago

Hi,

I'm doing some work on PCells and have come across an issue when attempting to stream out a layout view in which a PCell I have created is instantiated. In both examples below, the PCell is created without issue, and I can use it as intended, the only issue is during stream out. I'm also using Cadence 20.1

Any ideas or possible solutions on how to make these errors disappear so I can stream out, whilst maintaining the integrity and proper functionality of the pcell? 

Thanks for any help!

Keelan

Note: The below examples are very minimal and just used for demonstration purposes. 

  • Example 1 (Procedure Error)

    • procedure( myPCellTest()

      pcDefinePCell(
      list(ddGetObj("kd") "myPcell" "layout")
      (
      (w "4u")
      (l "1u")
      )
      let( (nmosBaseInst)

      procedure_test()
      nmosBaseInst = dbCreateParamInstByMasterName( pcCellView "mylib" "mycell" "layout" nil list(0 0) "R0" 1)
      procedure_test()
      )
      )
      )

      procedure( procedure_test()
      prog( ()

      printf("Hello World")

      )
      )

  • Stream out Error: 

  • Example 2 (Global Variable Error)
    • MyExampleGlobalVar = "GLOBAL"

      procedure( myPCellTest()

      pcDefinePCell(
      list(ddGetObj("kd") "myPcell" "layout")
      (
      (w "4u")
      (l "1u")
      )
      let( (nmosBaseInst)

      nmosBaseInst = dbCreateParamInstByMasterName( pcCellView "mylib" "mycell" "layout" nil list(0 0) "R0" 1)
      printf("\nGlobal Value: %s\n" MyExampleGlobalVar)
      )
      ))

  • Stream out Error
  • Cancel
  • p94todorov
    p94todorov over 2 years ago

    Hello,

    the reason for what you are seeing is pretty much the same - SKILL does not recognize your procedure_test and MyExampleGlobalVar during stream-out since they are not available during that time. In order to use external procedures in your pCell code you need to load them in the environment using a context file or link them to the library through the libInit.il file - you can place the function source code there or simply load the file with the source code load("myFunctionsFile.il").

    When streaming-out, Cadence will "forget" about anything you might have loaded in your session through the CIW after starting up the environment. This is valid for the global variables as well, so you have 3 main options:

    1) Add everything in a context file and attach it to the environment if you are doing PDK work.

    2) Link your extra functions through the libInit.il file in your library.

    3) Stream-out from the virtual memory if it is a single-case scenario, but try to avoid this if possible since it's risky.

    Regards,

    Petar

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • kdolan
    kdolan over 2 years ago in reply to p94todorov

    Fantastic, thanks Petar for the quick response! 

    • 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