• 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. Getting variable names from schematic view

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 17709
  • 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

Getting variable names from schematic view

trdastidar
trdastidar over 14 years ago

 Hi,

I am trying to integrate a third party tool into the Cadence environment, and have some questions on the APIs available for the task. I am not new to programming in general, but definitely new to SKILL. If someone can help me identify the SKILL APIs that can do the jobs that I mention next, it will be immensely helpful.

What I need are:

1. SKILL function to get all variable names from a cell view.
    Input: lib, cell, view name.
    Output: List of variables, and their values, if any.

2. SKILL function to set values to variables in a cell view.

Both of them are possible to do from Artist. Some of the Artist specific SKILL APIs can do this (sevCopyCellViewVariables and sevCopyVariablesToCellView.) However, they require the Artist window to be open. What I need is a function which can be invoked in the background, and can do the job without the corresponding Artist or Schematic window being open.

Thanks in advance

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    artGetDesignVarList(cvId) will return a list of design variable-value pairs. This is actually the value of the "designVarList" on the cell (i.e. ddGetObj("libName" "cellName")~>designVarList ). There's no public API to set it, but it's just a matter of setting this property yourself.

    Andrew.

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

    Andrew Beckett said:

    artGetDesignVarList(cvId) will return a list of design variable-value pairs. This is actually the value of the "designVarList" on the cell (i.e. ddGetObj("libName" "cellName")~>designVarList ). There's no public API to set it, but it's just a matter of setting this property yourself.

    Andrew.

     

     Hi Andrew,

    Thanks for your help. However, it doesn't seem to work for me. Here are the outputs of the two things:

    ddGetObj("mylib" "mycell")~>designVarList

    nil

     

    (although this cell has around 18 variables defined, which show up in Artist when I copy them from the cell view)
    cv = asiGetCurrentSession()

     

    stdobj@0x19a14024

    artGetDesignVarList(cv)

    *Error* eval: undefined function - artGetDesignVarList

     

     

    Then I looked up the manual, and it seems that the correct function name is artGetCellViewDesignVarList

    But even then it doesn't work.

     
    cvid = asiGetTopCellView(cv)

    db:0x15aae292

    artGetCellViewDesignVarList(cvid)

    nil

     

    Am I doing something wrong?

     

     

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

    trdastidar said:
     cv = asiGetCurrentSession()

     

    stdobj@0x19a14024

    artGetDesignVarList(cv)

    *Error* eval: undefined function - artGetDesignVarList

     

     

    Then I looked up the manual, and it seems that the correct function name is artGetCellViewDesignVarList

    But even then it doesn't work.

     
    cvid = asiGetTopCellView(cv)

    db:0x15aae292

    artGetCellViewDesignVarList(cvid)

    nil

     

    Am I doing something wrong?

     

     

     

     

    Sorry, I jumped the gun here. This sequence of commands does seem to work.

     sv = (sevStartSession ?design nil ?lib "mylib" ?cell "mycell" ?view "schematic")
    cv = asiGetCurrentSession()
    sevCopyCellViewVariables(sv)
    asiGetDesignVarList(cv)

    However, the ddGetObj()->designVarList still doesn't seem to work, though that will be the preferred method to go.

     

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

    Sorry, typo in my previous reply - it should have been artGetCellViewDesignVarList(). This is getting the variable names and values that have been saved back to the cellView with "Copy to cellView" (it actually copies them to the cell, rather than the cellView).

    The sevCopyCellViewVariables will traverse the hierarchy and add those variables into an ADE session. artGetCellViewDesignVarList does not do any hierarchy traversal - there's no public API (as I said) which will do that other than sevCopyCellViewVariables. Presumably when it collects them, they do not have any values - the only values will be found by virtue of the value having been stored in the designVarList property on the cell object previously.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Mephistopheles
    Mephistopheles over 5 years ago in reply to Andrew Beckett

    Hey Andrew,
    is there any way to select and read variables used in a schematic view thus I would not need to open an ADE window and/or have copied the design variables into the CDF file?

    I do understand that I will not get values of the design variables but would like to use the design variable names to compile a stimuli/config file.

    If there is no way to get design variable names from schematic directly I would be interested if there is a way to close the ADE window w/o the pop-up asking if I want to save it?

    Thanks and best regards

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to Mephistopheles

    Unfortunately the function to search the hierarchy to find any design variables used in expressions is private. There is the artGetCellViewDesignVarList which gets all the variables which have a value in the cell property bag, but that’s not going to find any that haven’t been “saved to cellView” before (it doesn’t really save to cellView; it saves to the cell).

    Opening up an ADE session and then closing it again is going to be a bit hacky (and hard to get right).

    I would suggest that you contact customer support asking for a public function to be made available. I’m not sure the current function is quite in the right state to be made public (the interface is a bit awkward), but it seems a reasonable request to have a public way of doing this.

    That said, I can think of a non-graphical way of doing this using ADE Explorer/Assembler “mae” APIs:

    ; create a new maestro view
    sess=maeOpenSetup("mylib" "ampTest" "maestroSearch")
    ; specify a fixed test name test1 and specify the lib/cell/view to search
    maeCreateTest("test1" ?lib "mylib" ?cell "ampTest" ?view "config" ?simulator "spectre")
    sdb=axlGetMainSetupDB(sess)
    sevSess=axlGetToolSession(sess "test1")
    ; this is the public function normally used to populate the variables from the cellView
    sevCopyCellViewVariables(sevSess)
    test=axlGetTest(sdb "test1")
    varNames=cadr(axlGetVars(test))
    ; could use maeGetVar to get the value of each variable if there is one?
    varNamesValues=foreach(mapcar varName varNames list(varName maeGetVar(varName ?typeName "test" ?typeValue "test1")))
    maeCloseSession()
    ; delete the temporary maestro view
    ddDeleteObj(ddGetObj("mylib" "ampTest" "maestroSearch"))

    It’s a little complicated, but it seems to work pretty well in my case - varNamesValues is then a list of lists of variable names and values (might only be an empty string if it’s never been set in ADE and saved to cellView).

    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