• 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. varying inline subckt parameter with altergroup in Spec...

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 124
  • Views 14841
  • 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

varying inline subckt parameter with altergroup in Spectre

sunilm123
sunilm123 over 8 years ago

I am trying to vary the inline subckt parameter as :

inline subckt n1 (d g s b)
parameters ad=0
n1 (d g s b) n1 ad=ad
model n1 bsim3v3 
ends n1

a1 altergroup {
  model n1 bsim3v3 ad=1
}

But getting the following error :

Error found by spectre during hierarchy flattening.
ERROR (SFE-2201): "input.scs" 20: In altergroup `a1', model `n1'
differs from its previous definition in "input.scs", line 13.

Can I have any workaround for this .

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    That won't work because you're trying to change an instance of an inline subckt to be an instance of a model. You either need to create a global parameter and then vary that in the altergroup (or use an alter statement) as follows:

    //

    parameters n1_ad=0
    inline subckt n1 (d g s b)
    parameters ad=n1_ad
    n1 (d g s b) n1 ad=ad
    model n1 bsim3v3 type=n
    ends n1

    M1 (d g 0 0) n1
    V1 (d 0) vsource dc=1
    V2 (g 0) vsource dc=1

    dc1 dc
    inst info what=inst where=logfile

    a1 altergroup {
     parameters n1_ad=1.0
    }

    dc2 dc
    inst2 info what=inst where=logfile

    Or redefine the entire subckt:

    //

    inline subckt n1 (d g s b)
     parameters ad=0
     n1 (d g s b) n1 ad=ad
     model n1 bsim3v3 type=n
    ends n1

    M1 (d g 0 0) n1
    V1 (d 0) vsource dc=1
    V2 (g 0) vsource dc=1

    dc1 dc
    inst info what=inst where=logfile

    a1 altergroup {
     inline subckt n1 (d g s b)
      parameters ad=1.0
      n1 (d g s b) n1 ad=ad
      model n1 bsim3v3 type=n
     ends n1
    }

    dc2 dc
    inst2 info what=inst where=logfile

    Both work, I tested them.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    That won't work because you're trying to change an instance of an inline subckt to be an instance of a model. You either need to create a global parameter and then vary that in the altergroup (or use an alter statement) as follows:

    //

    parameters n1_ad=0
    inline subckt n1 (d g s b)
    parameters ad=n1_ad
    n1 (d g s b) n1 ad=ad
    model n1 bsim3v3 type=n
    ends n1

    M1 (d g 0 0) n1
    V1 (d 0) vsource dc=1
    V2 (g 0) vsource dc=1

    dc1 dc
    inst info what=inst where=logfile

    a1 altergroup {
     parameters n1_ad=1.0
    }

    dc2 dc
    inst2 info what=inst where=logfile

    Or redefine the entire subckt:

    //

    inline subckt n1 (d g s b)
     parameters ad=0
     n1 (d g s b) n1 ad=ad
     model n1 bsim3v3 type=n
    ends n1

    M1 (d g 0 0) n1
    V1 (d 0) vsource dc=1
    V2 (g 0) vsource dc=1

    dc1 dc
    inst info what=inst where=logfile

    a1 altergroup {
     inline subckt n1 (d g s b)
      parameters ad=1.0
      n1 (d g s b) n1 ad=ad
      model n1 bsim3v3 type=n
     ends n1
    }

    dc2 dc
    inst2 info what=inst where=logfile

    Both work, I tested them.

    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