• 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 Design
  3. skill command to get the current library name

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 126
  • Views 17043
  • 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 command to get the current library name

Meny Lea
Meny Lea over 13 years ago

Hi,

 

Im looking for a  skill command that can return the current library name that appear on the library manager

top left field - "Library".

without open any schematic/layout window ...

 

thx

 

meny

 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    Meny,

    There isn't really a concept of the "current library" in the library manager - it's not intended to be used as a browser.

    If you want to have a UI which selects a library, you should use the ddsSyncWithForm() function. Alternatively, you can customize the library manager to add a menu or popup menu which will cause some action to be triggered based on the selected library (or lib/cell/view). This is covered in the Library Manager documentation.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Meny Lea
    Meny Lea over 13 years ago

    Thanks andrew,

    I will take the secound option.

    I wrote a sshort simple GUI that suppose to be open from the lmgr:

     

    ; create a new pull-down menu, to contain the toggle example
    lmgrCreateMenu("RF_Menu" '(("label" "RF")))

     

    ; Add the new pull-down menu into the menu banner
    lmgrAddMenuItems("menuBar" "" '("RF_Menu"))


    lmgrCreateMenuItem("sortutility" "simple"
    '(("label" "sort Gui")
    ("callback" ("sort_by_date"))
    )
    )

    ; Create a pull-down to contain the 1 radio options
    lmgrCreateMenu("RadioPulldown" '(("label" "Sort by date utility")))

    ; Add the radio options to the pull-down. Note that radio options must
    ; be in their own submenu
    lmgrAddMenuItems("RadioPulldown" "" '("sortutility"))
    lmgrAddMenuItems("RF_Menu" "" '("RadioPulldown"))


    procedure( sort_by_date()

    MLsort()

    printf("yes\n")

    hiDisplayForm(ADsort)
    )

    procedure( MLsort()


    ADsort = hiCreateAppForm(
    ?name 'ADsort
    ?formTitle "Sort library cells by date"
    ?buttonLayout '(OKCancelDefApply)
    ?buttonDisabled '(Apply)
    ?dialogStyle 'modeless
    ?initialSize 330:780
    ?minSize 330:780
    ?maxSize 330:550
    ?unmapAfterCB t
    ?dontBlock t
    ?mapCB   "nil";; in start up
    ?callback  list("nil");; in close - OK or apply
    ;?help
    ?fields list(
     


    list( hiCreateStringField(
    ?name 'srcLib
    ?prompt "Library"
    ?defValue "rftc55u__sim_menyl "
    ?callback "ddsUpdateSyncWithForm()" )
    20:20 260:025 80
    ) 

    list( hiCreateButton(
    ?name 'SrcBrowseBtn
    ?buttonText "Browse..."
    ?enabled t
    ?callback "ddsSyncWithForm( ADsort 'browse 'srcLib )"
    ) 20:60 260:025 80 )


    list( hiCreateButton(
    ?name 'Srcsort
    ?buttonText "Sort by date"
    ?enabled t
    ?callback some Awk program that run sortingl"
    ) 20:90 260:025 80 )


    )))

     

    but I keep  getting error  :

     *Error* eval: undefined function - sort_by_date
    <<< Stack Trace >>>
    sort_by_date("sortutility" "" "" "" "" ... )
    (... in ddsiLMCEval ...)
    (... in ddsLMCMenuItem ...)
    ddsLMCMenuItem(1 "sortutility" "sort_by_date" ("" "" "" "" ""))

     

    any ideas?

    thx

     

    meny 

     

     

     

     

     

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

    Hi Meny,

    There are two issues:

    1. The code needs to be loaded in two different places. The lmgr calls (the bit at the top of your code) needs to be in cdsLibMgr.il, whereas the two functions sort_by_date and MLsort need to be loaded from the .cdsinit. This is because the menu customization needs to be in the separate library manager process, whereas the callbacks are called in the main virtuoso process.
    2. The sort_by_date callback function needs to be written to expect 6 arguments - see the examples in the documentation (actually written by me from an application note I wrote on this back in IC441/IC442 timeframe!)

    Here's the modified sort_by_date function - if I did the separation of the code as above, and modified the function this way, it brings up the form and seeds the library based on the selected library:

    procedure( sort_by_date(menuName lib cell view file category)
      MLsort()
      printf("yes\n")
      unless(blankstrp(lib)
        ADsort->srcLib->value=lib
      )
      hiDisplayForm(ADsort)
    )

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ivick
    ivick over 5 years ago

    Hi,

    It seems that ddsGetLibManLCV() could be an option.

    Ivick.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to ivick
    ivick said:
    It seems that ddsGetLibManLCV() could be an option.

    It's still not intended as a browser though (as I said in my original reply), so building tools that use whatever is currently selected in the library manager to inform what you're doing would be a use model different to everything else in Virtuoso. You should use the library browser (by using fields on the form, a browse button and linking them with ddsSyncWithForm)

    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