• 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 126
  • Views 17771
  • 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
Parents
  • 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
Reply
  • 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
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