• 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. Howto include a text-file (eg. S-parameters or LRCG file...

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 127
  • Views 17767
  • 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

Howto include a text-file (eg. S-parameters or LRCG file) in a library and track its location automatically for netlisting ?

Herge
Herge over 15 years ago

I am currently developping symbols for use in EMC simulations. For example models of cables and bulk-current injection coils.

The cables are unshielded twisted pairs described by frequency-dependent RLCG parameters in a text file.

For the BCI coils, I need to use a 1-port described by S-parameters. See attachment for snapshot of the schematic of the coil model.

 I  want to release those cells as symbols and schematics in a library. However the mtline or the nport component require the absolute path of the file to be specified. I would like to store the text files inside the directory structure of the library, and make sure that whenever the library is moved as a whole the netlisting will still be such that the correct files are loaded by nport or mtline.

I would like to minimize the customisation effort and if possible not do custom netlisting. I was wondering if I could use a custom AEL function to automatically fill in the library path in the CDF field when netlisting ? 

  • BCI-Coil1.jpg
  • View
  • Hide
  • Cancel
  • Chris Smit
    Chris Smit over 15 years ago

    " However the mtline or the nport component require the absolute path of the file to be specified "

    You can use the file name only and set the include path in your ADE environment. 

    Chris.

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

    I've been meaning to reply to this for a while, just didn't have the chance to get my code adapted and tested.

    Anyway, here's some SKILL to solve this. See the comments at the top which explain what you need to do to get an nport which allows you to refer to a s-parameter file contained within a lib/cell/view.

    /* abNportFromViewProc.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Oct 08, 2009 
    Modified   
    By         
    
    A customized netlist procedure to specify the s-parameter file from
    a lib/cell/view combination. Typically the referenced view will be
    a "text" view.
    
    To set up, copy nport from analogLib into your own library, then
    edit the Base CDF:
    
    Add these parameters:
    
    sparamLib  - string - parseAsCEL=no, parseAsNumber=no
    sparamCell - string - parseAsCEL=no, parseAsNumber=no
    sparamView - string - parseAsCEL=no, parseAsNumber=no
    
    Remove the file parameter
    
    In the spectre simInfo, remove file from otherParameters, and add
    sparamLib sparamCell sparamView. Change the netlist procedure to
    abNportFromViewProc
    
    ***************************************************
    
    SCCS Info: @(#) abNportFromViewProc.il 10/08/09.16:28:54 1.1
    
    */
    
    defun(abNportFromViewProc (inst)
        let((formatter netlister numPins sparamLib sparamCell sparamView 
    	ddId)
    	;------------------------------------------------------------
    	; get hold of the formatter and netlister objects
    	;------------------------------------------------------------
    	formatter=nlGetFormatter(inst)
    	netlister=nlGetNetlister(formatter)
    	nlPrintInstComments(formatter inst)
    	nlPrintInstName(formatter inst)
    	;------------------------------------------------------------
    	; Get information about the nport
    	;------------------------------------------------------------
    	numPins=atoi(nlGetParamStringValue(inst "p"))
    	sparamLib=nlGetParamStringValue(inst "sparamLib")
    	sparamCell=nlGetParamStringValue(inst "sparamCell")
    	sparamView=nlGetParamStringValue(inst "sparamView")
    	;------------------------------------------------------------
    	; Netlist the variable number of pins
    	;------------------------------------------------------------
    	nlPrintString(netlister " (")
    	for(pin 1 numPins
    	    nlPrintString(netlister 
    		strcat(
    		    nlGetTerminalSignalName(inst sprintf(nil "p%d" pin))
    		    " "
    		    nlGetTerminalSignalName(inst sprintf(nil "m%d" pin))
    		    " "
    		)
    	    )
    	)
    	nlPrintString(netlister ")")
    	nlPrintModelName(formatter inst)
    	;------------------------------------------------------------
    	; Output the path to the s-parameter file in the 
    	; s-parameter view
    	;------------------------------------------------------------
    	nlPrintInstParameters(formatter inst)
    	ddId=ddGetObj(
    	    sparamLib
    	    sparamCell
    	    sparamView
    	    "*"
    	    )
    	when(ddId
    	    nlPrintString(netlister " file=\"")
    	    nlPrintString(netlister ddId~>readPath)
    	    nlPrintString(netlister "\"")
    	)
        ))
    

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • aplumb
    aplumb over 15 years ago
    Hey Andrew,

    Here's a possible tweak to the code to allow for the continued use of the file path for things like parametrized file path overrides of the lib/cell/view code. The 'file' simInfo Spectre variable needs to be in the 'otherParameters' field for it to show up in instance properties:

    --snip--

    sparamFile=nlGetParamStringValue(inst "file")
    if( !sparamFile && ddId then
    nlPrintString(netlister " file=\"")
    nlPrintString(netlister ddId~>readPath)
    nlPrintString(netlister "\"")
    else
    nlPrintString(netlister " file=")
    nlPrintString(netlister sparamFile)
    )

    --end-snip--

    Andrew.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • aplumb
    aplumb over 15 years ago
    Fixed up the CR/LFs there. Looks like the Forum still doesn't like Mac OS X Safari web browser. A.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    Of course - this was just an example. I cut it down to keep it simple; there are other fields that may not make sense - for example, romDatFile (rarely used these days, because it's only for interp=rational which isn't needed much), and so on. But it's just to illustrate the principle.

    So yes, you could easily add something like your suggestion, Andrew. BTW, you'd need to print the quotes around the filename, rather like I did in my code.

    What I do when posting code (at least anything other than a few lines) is to use the "HTML" button and then put <code><pre> and </pre></code> around the code I'm pasting in. It comes out scrambled in the email, but on the forum site it looks good and is easy to cut and paste.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • aplumb
    aplumb over 15 years ago
    I tried initially with the quotes included but that broke compatibility with Solution 11021266 (see http://sourcelink.cadence.com/docs/db/kdb/2004/Dec/11021266.html).

    Patches upon patches. ;-)

    Andrew.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    And that solution's one of mine!

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Herge
    Herge over 15 years ago

    Thank you very much.

    At my side I worked out a solution, that is very similar, except that inside my custom netlisting function I get the cell view and library automatically form the parent of the instance being netlisted (I did the same with the mtline), then copy the required file from its location in the library to the location of the netlisting directory and then call the original netlisting procedure.

    The advantage is that the netlisting directory is then self-contained. 

     

    • 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