• 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. How to edit/modify ansCdlPrintInstParams in .simrc file...

Stats

  • Locked Locked
  • Replies 0
  • Subscribers 125
  • Views 3197
  • 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

How to edit/modify ansCdlPrintInstParams in .simrc file for auCdl netlisting

Paulux
Paulux over 14 years ago

 Hello,

 May I know how to edit/modify variable "ansCdlPrintInstParams" in .simrc file such that the auCdl netlist is shown below?

.SUBCKT umim PLUS MINUS

CC0 PLUS MINUS 1.5e-4*cl*cw+2e-9*(cl+cw) $[CA]  $L=cl  $W=cw

.ENDS

XC1 out gnd! / umim cw=20 cl=20

Now my generated auCdl netlist is shown below. (But I want to move cl cw in the equation line after $[CA] to be $L=cl $W=cw and remove cl=15 cw=15!)

.SUBCKT umim PLUS MINUS cl=15 cw=15

CC0 PLUS MINUS 1.5e-4*cl*cw+2e-9*(cl+cw) cl cw $[CA]

.ENDS

XC1 out gnd! / umim cw=20 cl=20

Or if I use the wrong way, could you please help to recommend how to fix this?

Thank you very much in advance for your help and kindness.

***If I post to the improper forum, could you please kindly help to move to the proper forum and let me know when this message is posted?

The umim CDF is

 let( ( libId cellId cdfId )
    unless( cellId = ddGetObj( LIBRARY CELL )
        error( "Could not get cell %s." CELL )
    )
    when( cdfId = cdfGetBaseCellCDF( cellId )
        cdfDeleteCDF( cdfId )
    )
    cdfId  = cdfCreateBaseCellCDF( cellId )

    ;;; Parameters
    cdfCreateParam( cdfId
        ?name           "cl"
        ?prompt         "cl"
        ?defValue       "15"
        ?type           "string"
        ?parseAsCEL     "yes"
    )
    cdfCreateParam( cdfId
        ?name           "cw"
        ?prompt         "cw"
        ?defValue       "15"
        ?type           "string"
        ?parseAsCEL     "yes"
    )

    ;;; Simulator Information
    cdfId->simInfo = list( nil )
    cdfId->simInfo->auCdl = '( nil
        dollarEqualParams nil
        dollarParams      nil
        modelName         ""
        propMapping       (nil cl cl cw cw)
        instParameters    (cl cw)
        namePrefix        "X"
        termOrder         ("PLUS" "MINUS")
        componentName     subcircuit
        netlistProcedure  ansCdlSubcktCall
    )

 The mim1 CDF is shown below

let( ( libId cellId cdfId )
    unless( cellId = ddGetObj( LIBRARY CELL )
        error( "Could not get cell %s." CELL )
    )
    when( cdfId = cdfGetBaseCellCDF( cellId )
        cdfDeleteCDF( cdfId )
    )
    cdfId  = cdfCreateBaseCellCDF( cellId )

    ;;; Parameters
    cdfCreateParam( cdfId
        ?name           "l"
        ?prompt         "Length"
        ?defValue       "pPar(\"cl\")"
        ?type           "string"
        ?display        "t"
        ?parseAsCEL     "yes"
    )
    cdfCreateParam( cdfId
        ?name           "w"
        ?prompt         "Width"
        ?defValue       "pPar(\"cw\")"
        ?type           "string"
        ?display        "t"
        ?parseAsCEL     "yes"
    )
    cdfCreateParam( cdfId
        ?name           "c"
        ?prompt         "Capacitance"
        ?defValue       "1.5e-4*cl*cw+2e-6*(cl+cw)"
        ?type           "string"
        ?display        "artParameterInToolDisplay('c)"
        ?parseAsCEL     "yes"
    )

 cdfId->simInfo = list( nil )
    cdfId->simInfo->auCdl = '( nil
        dollarEqualParams (cl cw)
        dollarParams      nil
        netlistProcedure  ansCdlHnlPrintInst
        instParameters    (C L W)
        componentName     cap
        termOrder         (PLUS MINUS)
        propMapping       (nil C c L l W w)
        namePrefix        "C"
        modelName         "CA"
    )

 The .simrc is given as follows

auCdlCDFPinCntrl=t
CDLUsePortOrderForPinList = t
auCdlInstPrintOrder=list('instName 'connections 'instParams 'model)
procedure( ansCdlPrintConnections(fp connections )
        foreach( cn connections
            artFprintf( fp "%s " car(cn) )  ))

procedure( ansCdlPrintInstParams(fp pairList)
        foreach( pair pairList
                artFprintf( fp "%s " artMakeString(cadr(pair)) )
            ))
procedure( ansCdlPrintInstProps(fp pairList)
        foreach( pair pairList
                artFprintf( fp "%s=%s " car(pair) artMakeString(cadr(pair)) )
            ))

procedure( ansCdlPrintModelName(fp isAPrimitive definedPropVal
                                  modelPropInstVal
                                  componentPropInstVal
                                  cdfModelName
                                  cdfComponentName
                            )
        when( isAPrimitive
            let( (model)
                model = nil
                if( definedPropVal
                    model  = definedPropVal
                  )
                if( !model && modelPropInstVal
                    model =  definedPropVal
                  )
                if( !model && cdfModelName
                    model = cdfModelName
                  )
                if( !model && componentPropInstVal
                    model = componentPropInstVal
                  )
                if( !model && cdfComponentName
                    model = cdfComponentName
                  )
                    artFprintf(fp "$[%s] " artMakeString( model ) )
                )
            ))
 

  • 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