• 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. ABCD parameters from .snp file

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 126
  • Views 5629
  • 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

ABCD parameters from .snp file

Maria98
Maria98 over 1 year ago

hi

I want to get the ABCD parameters of the designed TL to calculate its characteristic impedance and propagation constant. Can i simulate the structure to get ABCD parameters directly, or need to get ABCD parameters from the SNP file?  Please guide.

Thank you

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    Assuming you're using Virtuoso and ADE (you didn't say), I just wrote this calculator function to handle this. The file needs to retain the ".ils" suffix, and you can add to the calculator using the "fx" button in the function panel or the "+" button in the expression evaluator. It allows you to either do this from an s-parameter simulator or an s-parameter file (see the comments at the top):

    /* abABCD.ils
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Dec 11, 2023 
    Modified   
    By         
    
    Get ABCD parameters from a set of s-parameters (either from simulation results
    or directly from an s-parameter file). Can use:
    
    abABCD('sp "A") ; or "B" or "C" or "D" (can be symbols too)
    
    The first argument can be the same as spm supports - i.e. 'sp, 'psp, 'hbsp
    etc (strings are allowed too), but also supports the use of 'file too. If
    you use:
    
    abABCD('file "B" ?result "model1_GPDK045_typical_withMapping" ?resultsDir
           "./model1_GPDK045_typical_withMapping.s2p")
    
    Note that you can also use:
    
    openResults("./model1_GPDK045_typical_withMapping.s2p")
    selectResult("model1_GPDK045_typical_withMapping")
    abABCD('file "C")
    
    too. 
    
    Note that the results of each of the parameters
    are complex values versus frequency. 
    
    The results have been validated against MATLAB using commands such as this:
    
    ABCD=abcdparameters('model1_GPDK045_typical_withMapping.s2p')
    plot(ABCD.Frequencies,real(rfparam(ABCD,'B')))
    
    Quite a useful blog from Cadence System Analysis which gives the equations
    resources.system-analysis.cadence.com/.../2020-how-to-calculate-a-transfer-function-from-s-parameters
    
    Keep the .ils suffix of the file (because it uses SKILL++ semantics), and
    you can add to the calculator using the "fx" button in the function panel
    in the calculator or the "+" button in the expression evaluator.
    
    ***************************************************
    
    SCCS Info: @(#) abABCD.ils 12/11/23.14:53:24 1.2
    
    */
    
    /********************************************************************
    *                                                                   *
    *       (abABCD  ana param @key (Z0 50.0) result resultsDir)        *
    *                                                                   *
    *    Function to access s-parameter results as ABCD parameters.     *
    * The ana argument can be a symbol or string, sp, psp, qpsp, hbsp,  *
    *      lssp or file. If file, then the ?result and ?resultsDir      *
    *  arguments are used to read from an s-parameter file. The param   *
    * is a string or symbol for which of the four parameters A, B, C, D *
    *  you want. The characteristic impedance is via the optional ?Z0   *
    *                      argument (default 50).                       *
    *                                                                   *
    ********************************************************************/
    
    (defun abABCD (ana param @key (Z0 50.0) result resultsDir)
      (defun getSP (ana i j @key result resultsDir)
        (if (eq (concat ana) 'file)
          (getData (lsprintf "s%d,%d" i j) ?result result ?resultsDir resultsDir)
          (spm ana i j)
          ))
      (let (
            (s11 (getSP ana 1 1 ?result result ?resultsDir resultsDir))
            (s12 (getSP ana 1 2 ?result result ?resultsDir resultsDir))
            (s21 (getSP ana 2 1 ?result result ?resultsDir resultsDir))
            (s22 (getSP ana 2 2 ?result result ?resultsDir resultsDir))
            abcdParam
            )
        (setq abcdParam
              (if (and s11 s12 s21 s22)
                (quotient 
                  (caseq (concat param)
                         (A (plus
                              (times (plus 1 s11) (difference 1 s22))
                              (times s12 s21)))
                         (B (times 
                              Z0
                              (difference
                                (times (plus 1 s11) (plus 1 s22))
                                (times s12 s21))))
                         (C (quotient 
                              (difference
                                (times (difference 1 s11) (difference 1 s22))
                                (times s12 s21))
                              Z0))
                         (D (plus
                              (times (difference 1 s11) (plus 1 s22))
                              (times s12 s21)))
                         (t
                           (error "abABCD: param must be one of A,B,C,D")))
                  2.0 s21)
                (error "abABCD: could not access at least one of s11, s12, s21, s22")
                ))
        ;--------------------------------------------------------------------
        ; Set the expression on the waveform to make it more readable
        ;--------------------------------------------------------------------
        (if (eq (concat ana) 'file)
          (famSetExpr
            abcdParam 
            `(abABCD ',(concat ana) ,(get_string param) 
                     ?result ,result ?resultsDir ,resultsDir))
          (famSetExpr abcdParam `(abABCD ',(concat ana) ,(get_string param)))
          )
        abcdParam))
    
    ; NOTE: Have intentionally removed the ?result and ?resultsDir
    ; arguments since doing these from calculator is not that likely
    ;
    ;;;;;;;;;;;;;;;;;;;;;;;;;; GUI builder information ;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ocnmRegGUIBuilder(
     '(nil
      function abABCD
      name abABCD
      description "Retrieve ABCD parameters of two-port network"
      category ("Custom Functions")
      analysis (nil
          general (nil
            args (ana param Z0)
              params(nil
                     ana (nil
                           prompt "Analysis Type"
                           tooltip "Select the analysis type"
                           guiRowHint 0
                           default "sp"
                           type ("sp" "psp" "qpsp" "hbsp" "lssp" "file")
                           required t
                     )
                     param (nil
                           prompt "Parameter"
                           tooltip "ABCD parameter name"
                           guiRowHint 1
                           default "A"
                           type ("A" "B" "C" "D" )
                           required t
                     )
                     Z0 (nil
                           prompt "Z0"
                           tooltip "Characteristic Impedance"
                           guiRowHint 1
                           type float
                           default 50.0
                           required nil
                           keyed t
                     )
              )
            inputrange t
          )
      )
      outputs(result)
     )
    )

    • Cancel
    • Vote Up +2 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 1 year ago in reply to Andrew Beckett

    Dear Maria98,

    Maria98 said:
    Can i simulate the structure to get ABCD parameters directly, or need to get ABCD parameters from the SNP file? 

    Figure 1

    Figure 2

    abcd_example_octave_sml_121223.zip

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 1 year ago in reply to ShawnLogan

    Dear Maria98,

    For some reason, I was unable to post the text in my response as it indicates an error occurred. After trying different things for two days, I have included my response as a Portable Document Formatted file. Sorry for the inconvenience Maria98!

    Shawn

    sml_forum_post_response_121123.pdf

    • Cancel
    • Vote Up +1 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