• 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. CDF data structure 'flattened'

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 144
  • Views 8193
  • 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

CDF data structure 'flattened'

tailsnaf
tailsnaf over 13 years ago

 

I have been writing some skill code to extract information from a cell's cdf - but I see a mismatch between the docs and the way some information is stored in the skill code - it seems the simInfo part has all of it's data 'flattened' into a string, and I cannot access the parameters of simInfo.
 I am using IC 6.1.5-65b
So If I do the following, on the cdf of the vpulse component from analogLib I get:
cdf~>?
(buttonFieldWidth doneProc fieldHeight fieldWidth formInitProc
    id parameters promptWidth simModels type
    paramLabelSet opPointLabelSet opPointLabelSet simInfo paramEvaluate
    paramSimType paramDisplayMode netNameType termSimType termDisplayMode
    instNameType instDisplayMode
)
 
When I look into simInfo, I get a flattened view - as when I do:
cdf~>?simInfo~>? 
I get an error:
*Error* get/getq: first arg must be either symbol, list, defstruct or user type - ""
 
So instead if I just get the value of simInfo, all the information is there as a 'string'
cdf~>simInfo
(nil auLvs (nil propMapping nil namePrefix "") hspiceD (nil netlistProcedure hspiceDCompPrim_vpulse instParameters dc(acm acp v1 v2 td
    tr tf pw per
)
componentName vsrc termOrder (PLUS MINUS) propMapping
(nil) namePrefix "V" source t
termMapping (nil PLUS "" MINUS "(FUNCTION minus(root(\"PLUS\")))") noPortDelimiter t
)
...
...
...
) otherParameters (fundname noisefile FNpairs F1 N1
    F2 N2 F3 N3 F4
    N4 F5 N5 F6 N6
    F7 N7 F8 N8 F9
    N9 F10 N10
)
)
)
 
Is there a way to 'fix' the data structure format, so I cann access the sub-values of simInfo, like:
cdf~>simInfo~>termMapping 
Thanks for any help.

 

  • Cancel
  • berndf
    berndf over 13 years ago

     I guess you can do a
    cdfGetCellCDF( ddGetObj( libName cellName ) )->simInfo->spectre->termMapping
    which returns the term mapping as disembodied property list,
    which you should be able to assign new values to it.
    You have to do this on a netlister base, means for auCdl, auLvs,
    spectre, hspice in a sequence.
    You should be able to find a way to build a loop.
     
    The second possibility for the cell level CDF is simply use the
    SKILL function 'cdfDump'?
    It will return a file with the cell CDF which you can post process.

    Bernd

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

    The fundamental problem was that you were using ~> not -> (the first arrow could have been either, because that goes from the CDF object to the simInfo disembodied property list). Since the simInfo structure is a DPL, you have to use -> not ~> (I won't go into the differences here - but suffice to say, they behave differently when dealing with lists). Then as Bernd points out, you need to pull out the DPL for the simulator - e.g. cdf->simInfo->auCdl or cdf->simInfo->spectre.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tailsnaf
    tailsnaf over 13 years ago

    Thanks Guys, the -> works.

    I did not know that ~> would not work for DPL structures - from the docs I thought that ~> was a 'super set' of the functionality that -> provided, as it works on lists of objects - but after looking now I see the docs do say that -> can be used to access the DPL structure.

     Thanks again! 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tailsnaf
    tailsnaf over 13 years ago

    Actually, I have a quick follow-up.

     If I have a variable called term - set as follows:

    term = "PLUS"

    And I want to read the term-mapping from the CDF of this - by doing:

    cdf->simInfo->spectre->termMapping->PLUS

    it returns:

    \:p

     Which is fine - however if I want to use the variable 'term' - is there a way I can do this directly - or do I have to use sprintf to build the 'access command', and then evalstring to evaluate it, like:

    sprintf(s, "cdf->simInfo->spectre->termMapping->%s" term)

    evalstring(s)

    Thanks 


     

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

    Either:

    term='PLUS
    get(cdf->simInfo->spectre->termMapping term)

    or

    term="PLUS"
    get(cdf->simInfo->spectre->termMapping concat(term))

    The concat converts the string into a symbol. The get() function is similar to -> but it evaluates the argument rather than taking it literally.

    This is definitely better than constructing a string with an expression and using evalstring - which requires run time evaluation, and is completely unnecessary.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tailsnaf
    tailsnaf over 13 years ago
    Excellent, that works nicely!
    • 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