• 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 add a spice netlist component and how to simulate...

Stats

  • Locked Locked
  • Replies 7
  • Subscribers 125
  • Views 22163
  • 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 add a spice netlist component and how to simulate it

eashwar g
eashwar g over 10 years ago

i tried adding the following spice code using this link

http://community.cadence.com/cadence_blogs_8/b/rf/archive/2009/01/07/tip-of-the-week-how-to-simulate-a-subcircuit-netlist-with-spectre-in-ade

simulator lang=spice

.SUBCKT memristor Pside Nside PARAMS:

+ Ron=1K Roff=100K Rinit=80K D=10N uv=10F p=1
***********************************************
* DIFFERENTIAL EQUATION MODELING *
***********************************************
Gx 0 x value={ I(Emem)*uv*Ron/D^2*f(V(x),p)}
Cx x 0 1 IC={(Roff-Rinit)/(Roff-Ron)}
Raux x 0 1T

* RESISTIVE PORT OF THE MEMRISTOR *
*******************************
Emem plus aux value={-I(Emem)*V(x)*(Roff-Ron)}
Roff aux minus {Roff}
***********************************************
*Flux computation*
***********************************************
Eflux flux 0 value={SDT(V(plus,minus))}
***********************************************
*Charge computation*
***********************************************
Echarge charge 0 value={SDT(I(Emem))}
***********************************************
* WINDOW FUNCTIONS
* FOR NONLINEAR DRIFT MODELING *
***********************************************
*window function, according to Joglekar
.func f(x,p)={1-(2*x-1)^(2*p)}
*proposed window function
;.func f(x,i,p)={1-(x-stp(-i))^(2*p)}
.ENDS memristor

i get these errors


Error found by spectre in `memristor', during circuit read-in.
    ERROR (SFE-1024): "/home/eashwar/Desktop/model" 23: Instance `Cx': Unexpected value `/' - positional parameters are not allowed after explicitly named parameters.
    ERROR (SFE-1024): "/home/eashwar/Desktop/model" 23: Instance `Cx': Unexpected value `Roff-Ron' - positional parameters are not allowed after explicitly named parameters.
Warning from spectre in `memristor', during circuit read-in.
    WARNING (SFE-1805): "/home/eashwar/Desktop/model" 43: .func is not recognised as a valid SPICE control card.


how to use this code to create a component ,..,so that we can use this model for further simulations

please suggest steps

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    This can be solved by:

    1. Removing the simulator lang= line from the model file
    2. Use the pspice_include statement to include it rather than include. This was introduced in MMSIM13.1, and is also available in ADE in IC616 (under Setup->Simulation Files)
    3. Finally spectre seems to interpret the "^" operator in the model file as a bitwise XOR operator, whereas looking at the context of the model, ^ appears to be an exponent. I checked the PSPICE (Allegro AMS Simulator to give its real name) documentation, and ^ is indeed an XOR operator. If this is meant to be an exponent, change the occurrences of ^ to **. Other than this, the model looks pretty PSPICE-like though...

    Doing all this, the model can be parsed and simulated. I have not checked whether it functions correctly though.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • eashwar g
    eashwar g over 10 years ago

    Cadence (R) Virtuoso (R) Spectre (R) Circuit Simulator
    Version 11.1.0.523.isr15 32bit -- 6 Sep 2012

    can't i use pspice code ?
    how to check mmsim version,
    is that version relevant?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago
    That's MMSIM11.1 (the clue is in the version 11.1.XXX - the spectre version number corresponds to the MMSIM stream version number). As I mentioned, PSPICE support is not available until MMSIM13.1, so you are using too old a version.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • eashwar g
    eashwar g over 10 years ago

    so cant i use this code in mmsim11.1
    there is no solution for this ??

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago
    Yes, the solution is to move to MMSIM13.1 or MMSIM14.1! Not sure why that would be an issue? A customer under a maintenance contract (or a University) has access to these. The alternative would be to rewrite everything into native spectre approaches, which is not an entirely trivial task... and when there is a simpler solution of using a release from the last 2 years rather than a 3-4 year old release, it seems a no-brainer to me...
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • eashwar g
    eashwar g over 10 years ago

    is this a big procedure to move..
    if it can be upgraded using existing license
    can u provide the steps to do so

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

    First of all, there is no tax on characters in this forum. The forum guidelines ask you not to use "instant messaging shorthand" - using words such as "u" tends to disincline me from answering...

    I don't know which license version you have - you might have a license installed for the latest version - in which case installing a later version of MMSIM is straightforward. If  you are a customer with maintenance, you can go to support.cadence.com and use the Software->Software Updates menu to order a new license file.

    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