• 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. stitching results of two transient simulations

Stats

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

stitching results of two transient simulations

SoniaMK
SoniaMK over 8 years ago

Hi,

This might be a simple question for those who are skilled in spectre but it seems I can't figure out how to do the following. I want to run two transient simulation, the second one starting from a point in time where the first simulation finished or perhaps at a point of time somewhere during the run of the first simulation. Then I would like to stitch together the results of the first and second simulation. I hope this is possible and going from the first to the second simulation can be done quite seamlessly.

Thanks for your help.

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

    There's an option on the direct plot form (Results->Direct Plot->Main Form) for transient to allow you to reference a previous result and stitch that together. However, this only offers the ability to do it for two results.

    Alternatively you can use this SKILL code to concatenate a number of waveforms:

    /* abConcatWaveforms.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Jan 08, 2009 
    Modified   Jan 12, 2009 
    By         A.D.Beckett
    
    Function to concatenate waveforms.
    
    For example:
    
    new=abConcatWaveforms(flip(sig) sig)
    
    will produce a new waveform made out of a flipped version of 
    the input signal, glued to the original input signal.
    
    Copies units and name attributes from the first x and y vector it can find
    them on. Other attributes (e.g. expression) are ignored, because they're
    unlikely to be valid for the concatenated waveform. Also copies plotStyle,
    xScale and barBase waveform attributes.
    
    Can also register as a special function:
    
    abRegConcatWaveformsSpecialFunction()
    
    This will add abConcatWaveforms as a calculator special function.
    
    ***************************************************
    
    SCCS Info: @(#) abConcatWaveforms.il 01/12/09.10:29:05 1.2
    
    */
    
    /*****************************************************************
    *                                                                *
    *             (abConcatWaveforms (wave1 [waves...]))             *
    *                                                                *
    *  Function to concatenate a number of waveforms. The function   *
    *   takes an arbitrary number of waveforms (assumed to all be    *
    *  waveforms or families of the same number of dimensions), and  *
    * concatenates the axes together. Note that care should be taken *
    *  if the x-axes overlap, because this merely concatenates the   *
    *              vectors without any checking at all.              *
    *                                                                *
    *****************************************************************/
    
    (defun abConcatWaveforms (wave1 @rest waves)
      (let (xVec yVec newX newY newLen len xName xUnits yName yUnits 
                 newWave (attribs (makeTable 'attribs nil)))
        (cond
          ((drIsWaveform wave1)
           (setq newLen (drVectorLength (drGetWaveformXVec wave1)))
           (foreach wave waves
                    (setq newLen (plus newLen
                                       (drVectorLength (drGetWaveformXVec wave))))
                    )
           (setq newX (drCreateVec (drGetWaveformXType wave1) newLen))
           (setq newY (drCreateVec (drGetWaveformYType wave1) newLen))
           (foreach wave (cons wave1 waves)
                    (setq xVec (drGetWaveformXVec wave))
                    (setq yVec (drGetWaveformYVec wave))
                    (setq len (drVectorLength xVec))
                    (for pos 0 (sub1 len)
                         (drAddElem newX (drGetElem xVec pos))
                         (drAddElem newY (drGetElem yVec pos))
                         )
                    ;--------------------------------------------------------
                    ; Record attributes
                    ;--------------------------------------------------------
                    (unless xName (setq xName (getq xVec name)))
                    (unless xUnits (setq xUnits (getq xVec units)))
                    (unless yName (setq yName (getq yVec name)))
                    (unless yUnits (setq yUnits (getq yVec units)))
                    (foreach attrib '(plotStyle xScale barBase)
                             (unless (and
                                       (arrayref attribs attrib)
                                       (get wave attrib))
                               (setarray attribs attrib (get wave attrib))
                               ))
                    )
           ;-----------------------------------------------------------------
           ; Store found attributes
           ;-----------------------------------------------------------------
           (when xName (putpropq newX xName name))
           (when xUnits (putpropq newX xUnits units))
           (when yName (putpropq newY yName name))
           (when yUnits (putpropq newY yUnits units))
           ;-----------------------------------------------------------------
           ; Finally create the new waveform
           ;-----------------------------------------------------------------
           (setq newWave (drCreateWaveform newX newY))
           (foreach attrib attribs
                    (putprop newWave (arrayref attribs attrib) attrib)
                    )
           newWave
           ) ; is waveform
          ((famIsFamily wave1)
           (apply 'famMap (constar 'abConcatWaveforms wave1 waves))
           ) ; is family
          (t
            (error "abConcatWaveforms - can't handle %L\n" wave1)
            )
          ) ; cond
        ) ; let
      ) ; defun
    
    /******************************************************************
    *                                                                 *
    *              (abConcatWaveformsSpecialFunctionCB)               *
    *                                                                 *
    *  Callback function for the abConcatWaveforms special function   *
    * Just takes the buffer and one stack item and concatenates them. *
    *                                                                 *
    ******************************************************************/
    
    (defun abConcatWaveformsSpecialFunctionCB ()
      (calSpecialFunctionInput 'abConcatWaveforms '(STACK))
      )
    
    /*******************************************************************
    *                                                                  *
    *              (abRegConcatWaveformsSpecialFunction)               *
    *                                                                  *
    * Register abConcatWaveforms as a special function. Note that this *
    * only uses abConcatWaveforms with two arguments - otherwise would *
    * need a form to indicate how many values to concatenate - so this *
    *                         keeps it simple!                         *
    *                                                                  *
    *******************************************************************/
    
    (defun abRegConcatWaveformsSpecialFunction ()
      (calRegisterSpecialFunction
        (list "abConcatWaveforms" 'abConcatWaveformsSpecialFunctionCB))
      t
      )
    
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    There's an option on the direct plot form (Results->Direct Plot->Main Form) for transient to allow you to reference a previous result and stitch that together. However, this only offers the ability to do it for two results.

    Alternatively you can use this SKILL code to concatenate a number of waveforms:

    /* abConcatWaveforms.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Jan 08, 2009 
    Modified   Jan 12, 2009 
    By         A.D.Beckett
    
    Function to concatenate waveforms.
    
    For example:
    
    new=abConcatWaveforms(flip(sig) sig)
    
    will produce a new waveform made out of a flipped version of 
    the input signal, glued to the original input signal.
    
    Copies units and name attributes from the first x and y vector it can find
    them on. Other attributes (e.g. expression) are ignored, because they're
    unlikely to be valid for the concatenated waveform. Also copies plotStyle,
    xScale and barBase waveform attributes.
    
    Can also register as a special function:
    
    abRegConcatWaveformsSpecialFunction()
    
    This will add abConcatWaveforms as a calculator special function.
    
    ***************************************************
    
    SCCS Info: @(#) abConcatWaveforms.il 01/12/09.10:29:05 1.2
    
    */
    
    /*****************************************************************
    *                                                                *
    *             (abConcatWaveforms (wave1 [waves...]))             *
    *                                                                *
    *  Function to concatenate a number of waveforms. The function   *
    *   takes an arbitrary number of waveforms (assumed to all be    *
    *  waveforms or families of the same number of dimensions), and  *
    * concatenates the axes together. Note that care should be taken *
    *  if the x-axes overlap, because this merely concatenates the   *
    *              vectors without any checking at all.              *
    *                                                                *
    *****************************************************************/
    
    (defun abConcatWaveforms (wave1 @rest waves)
      (let (xVec yVec newX newY newLen len xName xUnits yName yUnits 
                 newWave (attribs (makeTable 'attribs nil)))
        (cond
          ((drIsWaveform wave1)
           (setq newLen (drVectorLength (drGetWaveformXVec wave1)))
           (foreach wave waves
                    (setq newLen (plus newLen
                                       (drVectorLength (drGetWaveformXVec wave))))
                    )
           (setq newX (drCreateVec (drGetWaveformXType wave1) newLen))
           (setq newY (drCreateVec (drGetWaveformYType wave1) newLen))
           (foreach wave (cons wave1 waves)
                    (setq xVec (drGetWaveformXVec wave))
                    (setq yVec (drGetWaveformYVec wave))
                    (setq len (drVectorLength xVec))
                    (for pos 0 (sub1 len)
                         (drAddElem newX (drGetElem xVec pos))
                         (drAddElem newY (drGetElem yVec pos))
                         )
                    ;--------------------------------------------------------
                    ; Record attributes
                    ;--------------------------------------------------------
                    (unless xName (setq xName (getq xVec name)))
                    (unless xUnits (setq xUnits (getq xVec units)))
                    (unless yName (setq yName (getq yVec name)))
                    (unless yUnits (setq yUnits (getq yVec units)))
                    (foreach attrib '(plotStyle xScale barBase)
                             (unless (and
                                       (arrayref attribs attrib)
                                       (get wave attrib))
                               (setarray attribs attrib (get wave attrib))
                               ))
                    )
           ;-----------------------------------------------------------------
           ; Store found attributes
           ;-----------------------------------------------------------------
           (when xName (putpropq newX xName name))
           (when xUnits (putpropq newX xUnits units))
           (when yName (putpropq newY yName name))
           (when yUnits (putpropq newY yUnits units))
           ;-----------------------------------------------------------------
           ; Finally create the new waveform
           ;-----------------------------------------------------------------
           (setq newWave (drCreateWaveform newX newY))
           (foreach attrib attribs
                    (putprop newWave (arrayref attribs attrib) attrib)
                    )
           newWave
           ) ; is waveform
          ((famIsFamily wave1)
           (apply 'famMap (constar 'abConcatWaveforms wave1 waves))
           ) ; is family
          (t
            (error "abConcatWaveforms - can't handle %L\n" wave1)
            )
          ) ; cond
        ) ; let
      ) ; defun
    
    /******************************************************************
    *                                                                 *
    *              (abConcatWaveformsSpecialFunctionCB)               *
    *                                                                 *
    *  Callback function for the abConcatWaveforms special function   *
    * Just takes the buffer and one stack item and concatenates them. *
    *                                                                 *
    ******************************************************************/
    
    (defun abConcatWaveformsSpecialFunctionCB ()
      (calSpecialFunctionInput 'abConcatWaveforms '(STACK))
      )
    
    /*******************************************************************
    *                                                                  *
    *              (abRegConcatWaveformsSpecialFunction)               *
    *                                                                  *
    * Register abConcatWaveforms as a special function. Note that this *
    * only uses abConcatWaveforms with two arguments - otherwise would *
    * need a form to indicate how many values to concatenate - so this *
    *                         keeps it simple!                         *
    *                                                                  *
    *******************************************************************/
    
    (defun abRegConcatWaveformsSpecialFunction ()
      (calRegisterSpecialFunction
        (list "abConcatWaveforms" 'abConcatWaveformsSpecialFunctionCB))
      t
      )
    
    • 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