• 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. help on using diode model in Spectre simulation

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 125
  • Views 16863
  • 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

help on using diode model in Spectre simulation

apple419
apple419 over 11 years ago

HI,

    I created a sample diode model file testdiode.scs as following:

simulator lang=spectre

subckt testdiode (ac)

d1 (a c) d01

model d01 diode

+is=14n n=2 rs=33m cjo=26p m=0.4 vj=0.3

ends testdiode 

Then I include testdiode.scs in ADE > Setup > Model Libraries.

Next I put a "diode" symbol  from analogLib library and put the testdiode in the "Model name" section and left all other sections default (blank).

After the simulation is completed, I wanted to display the diode current waveform. But nothing shows up and I got the following errors:

   ERROR (ADE -5021): asiEnvGetVar: Variable 'envOpts psfWaveViewer' is not declared for tool 'spectre0'.

Anyone knows what this error is about?

Thanks 

  • Cancel
  • apple419
    apple419 over 11 years ago

    It seems like it doesn't draw the diode current if the marker is on the diode pin. But if I add a series 0V VDC with the diode then it works. It shows the VDC current which is same as the diode current. Strange. Seems like it has to do with the subcircuit...

    I also found Spectre can directly simulate the PSPICE .subckt. One change has to make is set simulator lang=pspice. Then the PSPICE .SUBCKT netlist can be used without any change. 

     

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

    The problem is probably due to the termMapping that's in the CDF for the diode component in analogLib. This has the termMapping for spectre set to:

    nil PLUS \:a MINUS "(FUNCTION minus(root(\"PLUS\")))"

    If it was set to:

    nil PLUS \:1 MINUS "(FUNCTION minus(root(\"PLUS\")))"

    Then it would work. Because your model is a subckt model, spectre saves the terminals in the result database by position rather than by name. There is a simulator option to control this, useterms=name - see "spectre -h options". However, the problem is that if your PDK has other devices which are termMapped to :1, :2 etc, then they will then fail to work;  I asked some time ago for the ability for two aliases for each name to be output - both with the name and the position, so that either would work - unfortunately this has not been implemented yet.

    What is happening with :a in the term mapping is that it puts the save statement in the netlist as :a, but the results database ends up with :1, and then it can't map this back to the /PLUS terminal - and hence there's  nothing to plot.

    I tried the above out by editing the effective CDF, but you could also take a copy of analogLib diode and edit the base CDF so you don't have to change it every session, which is a bit impractical.

    Regards,

    Andrew.

    • 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