• 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. Which instance model parameters does Spectre save?

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 125
  • Views 8372
  • 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

Which instance model parameters does Spectre save?

Brad RFeng
Brad RFeng over 2 years ago

Hi,

It seems the psf database contains model parameters for a single instance when there are multiple instances in the schematic that use the same model. For example my design contains 8 transistor instances I1-I8 that are identical and thus have the same model parameters. After simulating, I only find model parameters for instance I8 in the database. I suppose this is done to save disc space. How does Spectre decide which specific instance to write to the database? Why did it save I8 model parameters instead of I1? The reason this is important is that one must know the specific instance name to use command pv() when retrieving a model parameter.

Regards,
Brad

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 2 years ago

    Hi Brad,

    This normally only happens when you have models defined within a subckt - otherwise they aren't associated with an instance at all. If (say) you have some parameterised model that alters the model based on instance parameters, then it does indeed smartly share them between instances, because models take up a fair bit of memory; it's not done to save disk space, but more to do with saving memory.

    If you use the MP function, that knows how to look up the appropriate model - for example MP("/M1" "vtho") will get the vtho parameter for the model associated with instance M1 even if it's actually named M2.something. You can also use the: ocnGetInstancesModelName("/M1") to get the mapping between instance name and model name - or ocnGetInstancesModelName() which will get the mapping for all instances.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 2 years ago

    Hi Brad,

    This normally only happens when you have models defined within a subckt - otherwise they aren't associated with an instance at all. If (say) you have some parameterised model that alters the model based on instance parameters, then it does indeed smartly share them between instances, because models take up a fair bit of memory; it's not done to save disk space, but more to do with saving memory.

    If you use the MP function, that knows how to look up the appropriate model - for example MP("/M1" "vtho") will get the vtho parameter for the model associated with instance M1 even if it's actually named M2.something. You can also use the: ocnGetInstancesModelName("/M1") to get the mapping between instance name and model name - or ocnGetInstancesModelName() which will get the mapping for all instances.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Brad RFeng
    Brad RFeng over 2 years ago in reply to Andrew Beckett

    Hi Andrew,

    Thanks again for the valuable information. Here's what I found -

    After running a single point dc simulation the following commands were used in the CIW.

    ocnGetInstancesModelName()
    (("I0.I0_QCC.Q1_2.q" "I0.I0_QCC.Q2_4.qmod")
    ("I0.I0_QCC.Q1_1.q" "I0.I0_QCC.Q2_4.qmod")
    ("I0.I0_QCC.Q1_3.q" "I0.I0_QCC.Q2_4.qmod")
    ("I0.I0_QCC.Q1_4.q" "I0.I0_QCC.Q2_4.qmod")
    ("I0.I0_QCC.Q2_2.q" "I0.I0_QCC.Q2_4.qmod")
    ("I0.I0_QCC.Q2_1.q" "I0.I0_QCC.Q2_4.qmod")
    ("I0.I0_QCC.Q2_3.q" "I0.I0_QCC.Q2_4.qmod")
    ("I0.I0_QCC.Q2_4.q" "I0.I0_QCC.Q2_4.qmod")
    ("I0.Qim.q" "I0.Qim.qmod")
    ("I0.I0_IMN.R0.rmb" "bsource_2f99b9")
    ("I0.I0_IMN.R0.rma" "bsource_2f99b9")
    ("/I0/I0_OMN/I15/I1/cc_1" "capacitor")
    ("/I0/I0_OMN/I15/I1/cc_2" "capacitor")
    ("/I0/I0_OMN/I15/I1/cc_3" "capacitor")


    So it seems all of my transistor instances use model I0.I0_QCC_Q2_4.qmod which is what I see in the psf database browser window.

    btw - Why do some items use dots in the instance name and others use "/"?

    Browser window model folder shows instance I0.I0_QCC.Q2_4

    ocnGetInstancesModelName("/I0/I0_QCC/Q2_4/q")
    ("/I0/I0_QCC/Q2_4/q" "I0.I0_QCC.Q2_4.qmod")

    ocnGetInstancesModelName("I0.I0_QCC.Q2_4.q")
    ("I0.I0_QCC.Q2_4.q" "I0.I0_QCC.Q2_4.qmod")

    This shows that Q2_1 is using same model as Q2_4
    ocnGetInstancesModelName("/I0/I0_QCC/Q2_1/q")
    ("/I0/I0_QCC/Q2_1/q" "I0.I0_QCC.Q2_4.qmod")


    Doesn't work
    MP("I0.I0_QCC.Q2_4.qmod" "rth")
    nil

    MP("/I0/I0_QCC/Q2_4/qmod" "rth")
    nil

    This works
    leafValue(MP("/I0/I0_QCC/Q2_4","rth") "temperature" 65)
    1833.88

    This works even though Q2_1 does not show up in the results model folder (as Andrew said).
    leafValue(MP("/I0/I0_QCC/Q2_1","rth") "temperature" 65)
    1833.88

    leafValue(pv("I0.I0_QCC.Q2_4.qmod" "rth" ?result "model") "temperature" 65)
    1833.88

    So far so good. Now let's try hb simulation.

    openResults("/zzz/psf/HB_HPA/psf")
    "/zzz/psf/HB_HPA/psf"

    results()
    (hb_fi hb_fd hb_td model output
    designParamVals primitives subckts variables

    ocnGetInstancesModelName()
    WARNING (OCN-6038): Results instance are not available for zzz/psf/HB_HPA/psf. Use results() for a list of available results.
    WARNING (OCN-6034): You need to specify what results you want to look at before using this command.
    You can do this with the openResults() command. For more information type,
    ocnHelp('openResults) in the Command Interface Window (CIW).
    WARNING (OCN-6082): No valid output signals available.

    ocnGetInstancesModelName("/I0/I0_QCC/Q2_4/q")
    WARNING (OCN-6038): Results instance are not available for /zzz/psf/HB_HPA/psf. Use results() for a list of available results.
    ("/I0/I0_QCC/Q2_4/q" nil)

    leafValue(MP("/I0/I0_QCC/Q2_1","rth") "temperature" 65)
    nil

    leafValue(pv("I0.I0_QCC.Q2_4.qmod" "rth" ?result "model") "temperature" 65)
    1833.88

    Note that the results browser model folder looks the same for dc and hb simulations so the information is in the hb database. The output from results() looks correct (the model folder is there and populated) but ocnGet...() functions don't work and MP() doesn't work.

    Fortunately pv() works but I need to supply the specific instance name from database but I can't get it with ocnGet...()

    This seems like a bug or an unfortunate limitation related to the hb database?

    Regards,

    Brad

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to Brad RFeng
    Brad RFeng said:
    btw - Why do some items use dots in the instance name and others use "/"?

    Names which begin with "/" and use "/" as the hierarchy separator are "schematic names". Those with dots as hierarchy separator are simulator names. What happens (for many databases) is that the simulator writes all names using netlist/simulator names, and ADE tries to map these into schematic names where possible - this however depends on the object corresponding to something in the schematic (or OA database at least) hierarchy; if the instance or net (for other kinds of data) is something inside a subckt model, then there's no schematic equivalent and so the name remains unmapped. Note that even if the schematic name is shown, you can always use the netlist names too. In my simple non-hierarchical example:

    outputs(?result 'instance)
    ("/M0" "/M1" "/M2" "/M3" "/M4"
      "/R0" "/R1" "/R2" "/R3" "/R4"
      "/V0" "/V1"
    )
    outputs(?result 'instance ?map nil)
    ("M0" "M1" "M2" "M3" "M4"
      "R0" "R1" "R2" "R3" "R4"
      "V0" "V1"
    )

    Brad RFeng said:

    This works even though Q2_1 does not show up in the results model folder (as Andrew said).
    leafValue(MP("/I0/I0_QCC/Q2_1","rth") "temperature" 65)
    1833.88

    leafValue(pv("I0.I0_QCC.Q2_4.qmod" "rth" ?result "model") "temperature" 65)
    1833.88

    I'm assuming there's some sweep here, hence the need for leafValue. The MP() function deals with mapping instance names to models, which is why you need the instance name, not the model name - as you've seen.

    Brad RFeng said:

    So far so good. Now let's try hb simulation.

    openResults("/zzz/psf/HB_HPA/psf")
    "/zzz/psf/HB_HPA/psf"

    results()
    (hb_fi hb_fd hb_td model output
    designParamVals primitives subckts variables

    The problem here is nothing to do with the fact that you've used hb analysis. The ocnGetInstancesModelName() and MP() functions need two databases:

    1. The instance database (an info analysis) - enabled via the Outputs→Save All form - it's the row with name element and What=inst.
    2. The model database (an info analysis) - enabled via the Outputs→Save All form - it's the row with name modelParameter and What=models.

    In your simulation above, you have the model database present, but not the instance database. The other analyses are irrelevant - the hb, dc, tran analyses etc play no part in this information.

    All you need to do is re-enable the element row in the Outputs→Save All form.

    It's the instance database that holds the mapping between instances (elements) and models used.

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Brad RFeng
    Brad RFeng over 2 years ago in reply to Andrew Beckett

    I didn't realize the Save All form is test dependent. I had the element inst line enabled for my DC test but not HB test. After enabling that line on the HB test Save All form I reran the HB test. ocnGetInstancesModelName() works but returns nil for all model names,

    results()
    (hb_fi hb_fd hb_td model instance
    output designParamVals primitives subckts variables

    ocnGetInstancesModelName()
    (("I0.I0_QCC.Q1_2.q" nil)
    ("I0.I0_QCC.Q1_1.q" nil)
    ("I0.I0_QCC.Q1_3.q" nil)
    ("I0.I0_QCC.Q1_4.q" nil)
    ("I0.I0_QCC.Q2_2.q" nil)
    ("I0.I0_QCC.Q2_1.q" nil)
    ("I0.I0_QCC.Q2_3.q" nil)
    ("I0.I0_QCC.Q2_4.q" nil)
    ("I0.Qim.q" nil)

    What did I miss?

    Regards,

    Brad

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to Brad RFeng

    Brad,

    That's a little odd. It should be retrieving certain property information from the instance database. 

    I'd like to be able to see the psf result data. Maybe you can either attach a gzipped tar file here, or if not, create a case via support.cadence.com and reference this post and say that it should be assigned to me (you can use my post as evidence that I'm happy to take it).

    Thanks,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Brad RFeng
    Brad RFeng over 2 years ago in reply to Andrew Beckett

    Hi Andrew,

    If I open the database using the following,

    openResults("/zzz/maestro/results/maestro/Interactive.8/1/HB_HPA/psf") 

    then ocnGetInstancesModelName() will work as expected.

    If I open database using,

    openResults("zzz/maestro/results/maestro/Interactive.8/psf/HB_HPA/psf")

    then ocnGetInstancesModelName() returns nil as shown above.

    I determined the full path to the database by using rmb>Results Browser after selecting the Interactive.8 history displayed in the data view and noting the path shown in the CIW.

    Previously the path was showing like this,

    "zzz/maestro/results/maestro/Interactive.8/psf/HB_HPA/psf"

    but for some reason during one of my attempts the path was displayed as, 

    "/zzz/maestro/results/maestro/Interactive.8/1/HB_HPA/psf"

    which works with ocnGetInstancesModelName().

    I'm only running one point test sweep and one corner and I see .../Interactive.8/1 when I inspect the file system folder.

    I need to start again with a clean session and carefully watch what happens to the database and which is opened. If it doesn't become clear to me after that I will reach out again possibly next week or later.

    Thanks for your help!

    Regards,

    Brad

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to Brad RFeng

    Hi Brad,

    I meant to reply to this at the time, and just catching up a bit I noticed I'd not done so.

    The issue you've seen in your last append is that the ocnGetInstancesModelName() only works if you are pointing at the data from a single simulation run. If you point at the Interactive.N/psf dir rather than Interactive.N/M dir (where M is the point number), then it cannot work. The reason it's can't work is that the information would then be a family - it potentially could be a different model in each point - for example, if you have corners being swept, or you have binned models, the same instance could map to different model names.

    Hope that clear this up!

    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