• 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. save currents in a spectre netlist, run the netlist in batch...

Stats

  • Locked Locked
  • Replies 10
  • Subscribers 126
  • Views 5938
  • 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

save currents in a spectre netlist, run the netlist in batch mode and the currents is saved as instance_name:number

ckseok
ckseok over 15 years ago

To save current into port "A" of instance "IDRIVER", I add the following line in the spectre netlist.

save IDRIVER:A

Then, I run the netlist in batch mode.

After simulation is finished, the result browser shows IDRIVER:2 instead of IDRIVER:A.

How can I make the simulator save current as Instance_name:port_name instead of instance_name:number?

Thank you.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    You need the option (see "spectre -h options" useterms=name. For example, add:

     saveOpts options useterms=name

    to your netlist. The first word is just an "instance" name for the options statement - you could instead add useterms=name onto an existing options statement.

    Regards,

    Andrew.

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

    This doesn't seem to fix the nets that are listed under the 'save' statement apparently, if the nets are chosen individually from within the ADE Output Select form.  Any ideas for fixing that alogrithm?   The save statement still lists the pin currents as numbers, even though, in the results browser and database, they are listed by name.  Does this mean that I have to save 'all' currents, since I can't save an individual current by name apparently?

    regards,  - Paul.

     

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

    Hi Paul,

    This requires changes to the spectre formatter. The ADE netlisting system has only relatively recently been altered to allow terminal currents to be specified by name - and the spectre formatter does not yet provide a built-in way of doing this - partly this is because of the issue of legacy - you need to be consisent about it everywhere otherwise you might be able to save the signals, but when you plot them it still looks for the name with a position rather than name. Similarly there  may be PDK compatibilty issues too.

    Anyway, here's some code I used to test the enhancement (tidied up a little) - I will point out that I have not thoroughly tested this, so it comes at your own risk. One issue I should point out is that this requires both useterm=names to be set and the change in the formatter. If you do only one of the two, you probably won't be able to plot any currents from ADE (e.g. Outputs->To be  plotted). Loading an ADE state will wipe out the default additionalOptions value set in the code - it's only set for new ADE sessions.

     

    /* abSpectreTermByName.ils

    Author A.D.Beckett
    Group Custom IC (UK), Cadence Design Systems Ltd.
    Language SKILL
    Date Jan 04, 2011
    Modified
    By

    Registers a new formatter to allow currents to be output
    by name from ADE, for subckt pins:

    abRegisterSpectreTermByNameFormatter()

    May need to watch out if useterms=name is used and you are
    using subckt models - in this case the CDF termMapping for the
    devices would need to be adjusted.

    The code sets useterms=name in the additional options for
    Simulation->Options->Analog - however, if you load an existing
    state, this will be overwritten.

    Uses enhancement implemented under CCR 435837 - which appeared
    in IC5141 5.10.41.500.6.137 and IC613 6.1.3.500.13

    ***************************************************

    SCCS Info: @(#) abSpectreTermByName.ils 01/04/11.13:46:23 1.1

    */


    ;------------------------------------------------------------------------
    ; Need to have these contexts loaded - in the right order - so
    ; that the spectreFormatter class can be extended
    ;------------------------------------------------------------------------
    (asiGetTool 'spectre)
    (foreach context '("spectreinl")
    (unless (isContextLoaded context)
    (loadContext
    (prependInstallPath (strcat "etc/context/" context ".cxt")))
    (callInitProc context)
    )
    )

    ;------------------------------------------------------------------------
    ; Define the class for the formatter.
    ;------------------------------------------------------------------------
    (defclass abSpectreTermByNameFormatter (spectreFormatter)
    ()
    )

    /***************************************************************
    * *
    * (abRegisterSpectreTermByNameFormatter) *
    * *
    * Register the formatter with Artist *
    * *
    ***************************************************************/


    (defun abRegisterSpectreTermByNameFormatter ()
    (let (tool)
    (setq tool (asiGetTool 'spectre))
    (asiSetNetlistFormatterClass tool 'abSpectreTermByNameFormatter)
    ;-----------------------------------------------------------------
    ; tell spectre to use terminals by name - note this is only
    ; for new ADE sessions - may have to fill this in by hand if loading
    ; existing states
    ;-----------------------------------------------------------------
    (envSetVal "spectre.opts" "additionalArgs" 'string "useterms=name")
    )
    )

    /****************************************************************
    * *
    * Overload the nlInitialize method for the revised formatter to *
    * turn off the differentFrom parameters for the netlister - *
    * having initialized the standard spectre formatter first. *
    * *
    ****************************************************************/


    (defmethod nlInitialize ((formatter abSpectreTermByNameFormatter))
    (callNextMethod)
    (let ((obj (nlGetNetlister formatter)))
    (nlSetOption obj 'preserveSubcktTermNamesInOrder t)
    )
    formatter
    )

    Best Regards,

    Andrew.

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

     Andrew,
       Thanks for your reply.  Looking into this a bit further, the goal for a particular circuit was to set a cellview type (i.e. schematic_extract, or even symbol) as a stop view in the heiarchy editor (so that the subcircuit definition is not defined in the netlist), include the model file for that cell at the beginning of the netlist (in the model files section of ADE), and then save the pin currents on the symbol in the test bench schematic.

    However, I noticed that if the cellview type IS NOT listed as a stop view, the SAVE statement will appear such as:
     ->     save I0.I0:2
    whereas if the cellview type IS listed as a stop view, the SAVE statment appears such as:
     ->     save I0.I0vplus
    where it appears as a netlist error, since there is no colon between the instance and the pin name anymore.  Is this a bug?  Do I have to fix something in the CDF parameters for the cell to prevent this?

    So, useterms=name works when the cellview IS NOT listed as a stop view, but how can I save these currents when defining the cellview type as a stop view instead?   Thoroughly confused,
    - Paul.

     

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

    Hi Paul,

    You need to specify the termMapping in the CDF in this case. This tells it how to map a named terminal on the the symbol into a named (or numbered) terminal in the netlist. Given that the netlist names may not be the same as the names on the symbol, this is useful. You already need to set the termOrder property in the CDF so that it netlists the instance in the right order, so it's just one more thing...

    Regards,

    Andrew.

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

     Thanks for the reply, Andrew.  I had copied the termOrder list (each pin within quotes) into the termMapping field, under the spectre simulator information field.  Additionally, I deleted the saved pins in the outputs, exited the simulator, and removed the results directory.  Restarted virtuoso, loaded the state, resaved the pins in the output section.  The cellview "schematic_spf" is an empty schematic listed as a stop view, with an include statement for the .spf file.  The voltage waveforms look fine, but no luck, however, for saving the currents.  The data isn't present in the results directory.  Anything else I might be missing?  Did I enter the termMapping field incorrectly?  Should the format match the termOrder list?

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

     Just as an FYI, I forgot to mention that under the Save Options, I also have "all" voltage signals, "all" power signals, and "all" currents saved, with nothing entered in to the subcktprobelvl.

     

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

    Ah, that explains why it didn't work (copying the termOrder is definitely NOT the right thing to do). Something like this is needed:

     nil inp \:inp outn \:outn NVCM \:NVCM ibias \:ibias inn \:inn outp \:outp

    You need nil at the beginning then pairs of symbol pin name, followed by what it gets mapped to in the netlist.

    Regards,

    Andrew.

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

     Hi Andrew,
      Things seem to work now, thanks.  The only other issue is that by using an 'include' statement for the model (and the cellview type set as a stop view), of course, all instances of the same cell have to use that model file, otherwise the netlist will be broken trying to redefine the cellview.  While it seems that I can accomplish the same thing by pointing every instance to the 'source file', I still can't have a source file ONLY for selected instances, while using 'schematic' views for others.  Any ideas on how to do that?  I can't 'rename' the model file since it has to match the cellname, it appears...  Regards, - Paul.

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

    Hi Paul,

    In the CDF for the component, change the component name (in the spectre simInfo) to be (for example) "cellName_netlist" (and also change it in the included subckt definition).

    Then use the hierarchy editor to create a config, and you can specify the view to use on some instances to be your stopping view, whilst other instances remain the schematic view. Those with the schematic view will get netlisted as "cellName", and those using the stopping view will get netlisted as "cellName_netlist" (i.e. using the componentName in the CDF).

    I just checked this and it worked correctly.

    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