• 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. Error evaluating parameter expression with other parame...

Stats

  • Replies 3
  • Subscribers 129
  • Views 53
  • Members are here 0

Error evaluating parameter expression with other parameters

GT20260122746
GT20260122746 1 hour ago

Hello, 

I am having some trouble understanding how to correctly implement some expressions in the parameters in my subckt model.

I have a model that I have defined as a subckt. To begin with, I defined the parameters on the circuit level, like:

simulator lang = spectre

parameters a = 100

parameters b=10*a

subckt test (N1 N2)

test_R (N1 N2) r=b

This works as expected, I can run simulations with the model and they work as expected. However, then when I create a symbol from this and add it to the schematic, I cannot edit the parameter a as it doesn not appear in the property editor, I can only edit the parameters directly in the spectreText file. So I add the parameters into the subckt, like:

simulator lang = spectre

subckt test (N1 N2)

parameters a = 100

         + b=10*a

test_R (N1 N2) r=b

This has the desired result, the parameters appear in the base CDF. I see them in Component Parameters. I can edit them on the schematic editor. However, when I run simulations, it netlists OK, but I get errors:

ERROR (SFE-1997): "input.scs" 14: Cannot run the simulation because xx: parameter `b': Unknown parameter `a' has been specified in expression `10*a', correct the expression and rerun the simulation.

Things I have tried:

  • Changed the parameter a to 'Evalution mode=number', and b to 'Evaluation mode=expression'. This results ina slightly different, but similar error. 
  • Looked around the forums which seems to suggest I might need to turn on ParseAsCEL or something? But I cannot see this option in my Edit CDF menu.

My overall goal is to use multiple instances of this symbol/model, with slightly different parameter values, so perhaps I am going about this the wrong way. 

  • Cancel
  • Sign in to reply
  • Andrew Beckett
    Andrew Beckett 1 hour ago

    Not sure exactly how you have things set up. It should work fine in Spectre - this works for example (your example must be wrong, because there's no component name for test_R):

    //
    simulator lang = spectre
    
    subckt test (N1 N2)
    
    parameters a = 100
             + b=10*a
    
    test_R (N1 N2) resistor r=b
    
    ends test
    
    I1 (a 0) test a=150
    V1 (a 0) vsource dc=1
    
    dc dc
    inst info what=inst where=screen
    
    

    Anyway, what does the actual netlist look like from ADE? That would give a clue - plus show what you have in the CDF. At the moment, the problem probably is in the part you've not shared...

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • GT20260122746
    GT20260122746 41 minutes ago in reply to Andrew Beckett

    Hi, 

    Sorry, here's some more full models:

    The spectre.scs

    simulator lang=spectre

    subckt Parameter_test (N1 N2)

    parameters a=100
             + b=a*10

    test_R (N1 N2) resistor r=b

    ends Parameter_tes

    The input.scs:

    simulator lang=spectre
    global 0
    parameters temperature=27

    I0 (0 net1) Parameter_test a=100 b=a*10
    I3 (0 net1) isource type=pulse val0=0 val1=1A period=10n delay=0 rise=1p \
            fall=1p width=1n
    simulatorOptions options psfversion="1.4.0" reltol=1e-3 vabstol=1e-6 \
        iabstol=1e-12 temp=27 tnom=27 scalem=1.0 scale=1.0 gmin=1e-12 rforce=1 \
        maxnotes=5 maxwarns=5 digits=5 cols=80 pivrel=1e-3 \
        sensfile="../psf/sens.output" checklimitdest=psf 
    tran tran stop=100n write="spectre.ic" writefinal="spectre.fc" \
        annotate=status maxiters=5 
    finalTimeOP info what=oppoint where=rawfile
    modelParameter info what=models where=rawfile
    element info what=inst where=rawfile
    outputParameter info what=output where=rawfile
    designParamVals info what=parameters where=rawfile
    primitives info what=primitives where=rawfile
    subckts info what=subckts where=rawfile
    saveOptions options save=allpub
    include "...spectre.scs"

    Which results in error:

    ERROR (SFE-1997): "input.scs" 14: Cannot run the simulation because I0: parameter `b': Unknown parameter `a' has been specified in expression `a*10', correct the expression and rerun the simulation.

    And in the CDF (base):

    Thanks for your help. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Andrew Beckett
    Andrew Beckett 21 minutes ago in reply to GT20260122746

    In the CDF, change the default value of b to either be blank (in which case it will use the default in the model if not specified), or to:

    iPar("a")*10

    which will ensure that it netlists the instance line correctly. Currently it is outputting b=a*10 on the instance line, and a in that context is the global a.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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.

© 2026 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information