• 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. Generate netlist with subckt statement for top level

Stats

  • Locked Locked
  • Replies 12
  • Subscribers 127
  • Views 18980
  • 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

Generate netlist with subckt statement for top level

Octavian
Octavian over 11 years ago

I'm generating a netlist from CIW using:

simulator('spectre)
design("libName" "cellName" "viewName")
createNetlist()

This works fine but I would like to enclose the top level cell in .subckt/ends statements, similar to other cells in the hierarchy. Is that possible using the skill/ocean interface?

 

Thanks,

--Tavi

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

    Hi Tavi,

    How about the code below. Note that if you want to switch it back in the same session, you'd have to do:

    asiSetNetlistFormatterClass(asiGetTool('spectre) 'spectreFormatter)

    Look at the comments at the top to see the function to initialize the alternative formatter which includes the header for the subckt. The IC616 solution that I mentioned below also incorporates the changes needed (with a recent enough MMSIM version) so that the netlist can still be simulated, using a new switch for spectre to tell it the top subckt to simulate, which the solution below doesn't implement. But if you only want it to produce a netlist, this solution should be sufficient.

    Regards,

    Andrew.

    /* abSpectreTopSubckt.ils
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       May 16, 2006 
    Modified   
    By         
    
    Defines a new formatter, which adds subckt definition around
    top level circuit.
    
    Does this by extending the spectreFormatter. Note we could directly
    define methods for the spectreFormatter, since it doesn't define
    them itself, but then there is the risk that a future release
    might define methods for spectreFormatter - so better to extend
    rather than make that assumption.
    
    To install, call (abRegisterSpectreTopCVFormatter)
    
    ***************************************************
    
    SCCS Info: @(#) abSpectreTopSubckt.ils 05/16/06.18:06:00 1.1
    
    */
    
    ;------------------------------------------------------------------------
    ; Need to have these contexts loaded - in the right order - so
    ; that the spectreFormatter class can be extended
    ;------------------------------------------------------------------------
    (foreach context '("oasis" "asimenv" "analog" "spectrei" "spectreinl")
      (unless (isContextLoaded context)
              (loadContext 
               (prependInstallPath (strcat "etc/context/" context ".cxt")))
              (callInitProc context)
              )
      )
    
    ;------------------------------------------------------------------------
    ; Define the class for the formatter. 
    ;------------------------------------------------------------------------
    (defclass abSpectreTopCVFormatter (spectreFormatter)
      ()
      )
    
    /***************************************************************
    *                                                              *
    *              (abRegisterSpectreTopCVFormatter)               *
    *                                                              *
    *              Register the formatter with Artist              *
    *                                                              *
    ***************************************************************/
    
    (defun abRegisterSpectreTopCVFormatter ()
      (let (tool)
           (setq tool (asiGetTool 'spectre))
           (asiSetNetlistFormatterClass tool 'abSpectreTopCVFormatter)
           )
      )
    
    
    /***********************************************************************
    *                                                                      *
    * (nlPrintTopCellHeader ((formatter abSpectreTopCVFormatter) cellView) *
    *                                                                      *
    *    Method for top level header - call the standard subckt header     *
    *                                                                      *
    ***********************************************************************/
    
    (defmethod nlPrintTopCellHeader ((formatter abSpectreTopCVFormatter) cellView)
      (nlPrintSubcktHeader formatter cellView)
      ;----------------------------------------------------------------------
      ; don't want comments twice, so don't call the standard formatter?
      ;----------------------------------------------------------------------
      ; (when (nextMethodp) (callNextMethod))
      )
    
    /***********************************************************************
    *                                                                      *
    * (nlPrintTopCellFooter ((formatter abSpectreTopCVFormatter) cellView) *
    *                                                                      *
    *    Method for top level footer - call the standard subckt footer     *
    *                                                                      *
    ***********************************************************************/
    
    (defmethod nlPrintTopCellFooter ((formatter abSpectreTopCVFormatter) cellView)
      (nlPrintSubcktFooter formatter cellView)
      (when (nextMethodp) (callNextMethod))
      )
    

     

     

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

    Hi Tavi,

    How about the code below. Note that if you want to switch it back in the same session, you'd have to do:

    asiSetNetlistFormatterClass(asiGetTool('spectre) 'spectreFormatter)

    Look at the comments at the top to see the function to initialize the alternative formatter which includes the header for the subckt. The IC616 solution that I mentioned below also incorporates the changes needed (with a recent enough MMSIM version) so that the netlist can still be simulated, using a new switch for spectre to tell it the top subckt to simulate, which the solution below doesn't implement. But if you only want it to produce a netlist, this solution should be sufficient.

    Regards,

    Andrew.

    /* abSpectreTopSubckt.ils
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       May 16, 2006 
    Modified   
    By         
    
    Defines a new formatter, which adds subckt definition around
    top level circuit.
    
    Does this by extending the spectreFormatter. Note we could directly
    define methods for the spectreFormatter, since it doesn't define
    them itself, but then there is the risk that a future release
    might define methods for spectreFormatter - so better to extend
    rather than make that assumption.
    
    To install, call (abRegisterSpectreTopCVFormatter)
    
    ***************************************************
    
    SCCS Info: @(#) abSpectreTopSubckt.ils 05/16/06.18:06:00 1.1
    
    */
    
    ;------------------------------------------------------------------------
    ; Need to have these contexts loaded - in the right order - so
    ; that the spectreFormatter class can be extended
    ;------------------------------------------------------------------------
    (foreach context '("oasis" "asimenv" "analog" "spectrei" "spectreinl")
      (unless (isContextLoaded context)
              (loadContext 
               (prependInstallPath (strcat "etc/context/" context ".cxt")))
              (callInitProc context)
              )
      )
    
    ;------------------------------------------------------------------------
    ; Define the class for the formatter. 
    ;------------------------------------------------------------------------
    (defclass abSpectreTopCVFormatter (spectreFormatter)
      ()
      )
    
    /***************************************************************
    *                                                              *
    *              (abRegisterSpectreTopCVFormatter)               *
    *                                                              *
    *              Register the formatter with Artist              *
    *                                                              *
    ***************************************************************/
    
    (defun abRegisterSpectreTopCVFormatter ()
      (let (tool)
           (setq tool (asiGetTool 'spectre))
           (asiSetNetlistFormatterClass tool 'abSpectreTopCVFormatter)
           )
      )
    
    
    /***********************************************************************
    *                                                                      *
    * (nlPrintTopCellHeader ((formatter abSpectreTopCVFormatter) cellView) *
    *                                                                      *
    *    Method for top level header - call the standard subckt header     *
    *                                                                      *
    ***********************************************************************/
    
    (defmethod nlPrintTopCellHeader ((formatter abSpectreTopCVFormatter) cellView)
      (nlPrintSubcktHeader formatter cellView)
      ;----------------------------------------------------------------------
      ; don't want comments twice, so don't call the standard formatter?
      ;----------------------------------------------------------------------
      ; (when (nextMethodp) (callNextMethod))
      )
    
    /***********************************************************************
    *                                                                      *
    * (nlPrintTopCellFooter ((formatter abSpectreTopCVFormatter) cellView) *
    *                                                                      *
    *    Method for top level footer - call the standard subckt footer     *
    *                                                                      *
    ***********************************************************************/
    
    (defmethod nlPrintTopCellFooter ((formatter abSpectreTopCVFormatter) cellView)
      (nlPrintSubcktFooter formatter cellView)
      (when (nextMethodp) (callNextMethod))
      )
    

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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