• 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. Pspice model of memrister running in Virtuoso

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 125
  • Views 13092
  • 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

Pspice model of memrister running in Virtuoso

Ranjan Yadav
Ranjan Yadav over 3 years ago

Hi Andrew, 

Greetings

I'm Ranjan, VLSI student from India. I want to implement the Spice model for memristor into cadence virtuoso in order to implement the memristor into my cmos based analog circuit. Could you please guide me on how can i implement from the beginning? I tried few ways, none of it worked. I would be really really thankful if you could help me with the same.

The above image is the spice code for the model i want to use.( Source: Yakopcic, Phd Dissertation).

.subckt memristor2 TE BE RSV
.params Ron=160 Roff=1200 Th=0.8 Tl=-0.8 Kh1=50e4 Kh2=-15 Kl1=2e6 Kl2=19.75
.func Rt(V1, V2) = IF( V1 <= Th, IF(V1 >= Tl, 0, IF(V2 < Roff, Kl1*exp(Kl2*(V1-Tl)), 0) ), IF(V2 > Ron, -Kh1*exp(Kh2*(V1-Th)), 0) )
Gx 0 RSV value={Rt(V(TE,BE),V(RSV))}
Cx RSV 0 {1}
.ic V(RSV) = 600
Gmem TE BE value = {V(TE,BE)/V(RSV)}
.ENDS memristor2

Also, I have copied in text as well.

Please help me.

Thanking you

Sincerely

Ranjan

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

    Ranjun,

    You posted this originally on the end of a 9-year old thread, which the forum guidelines ask you not to do. Please read them. Also, sending me a friend request with the same question will not get it answered any more quickly, and I generally decline all friend requests on the forum because questions should be asked in the forums, not to me personally. So I split your question off from the original thread and moved it to a suitable forum.

    I took the file above and created a "pspice" view of a cell in Virtuoso. The first thing is that it does is complain about the .params line. That's because the statement in PSPICE should be .param - if I remove the "s" from the end of .params and change to .param, everything appears OK. I can create a symbol from the model and then reference it in a schematic (I'm not sure what the meaning of each pin is or any of the parameters or how it's supposed to behave, but a simple simulation ran OK).

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Ranjan Yadav
    Ranjan Yadav over 3 years ago in reply to Andrew Beckett

    I'm sorry Andrew for not complying with guideline before. I'll make sure ,I'll follow all guidelines from now onwards.

    I am thankful to you for your time and response.

    I wrote the Pspice code using pspice text editor in virtuoso and made symbol out of it and drawn the schematic out for just checking the behavior of memristor.

    Schematic is shown below:

    Parameter for vsource is as follows:

    Made the Config file out of it,( am I taking analogLib as spectre as view, is that correct?)

    But while running in ADE_XL, I'm not getting the input waveform as sine as well, could you please help me finding out the error or something which i might my skipping due to my limited knowledge.

    Output:

    Thanking You

    Sincerely

    Ranjan 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to Ranjan Yadav

    Hi Ranjan,

    You don't have a ground symbol in your schematic, so the simulator ground will be assigned randomly. Please add a gnd symbol from analogLib to the wire between negative terminal of the vsource and the BE pin.

    I didn't repeat your test, but that's probably what's wrong.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Ranjan Yadav
    Ranjan Yadav over 3 years ago in reply to Andrew Beckett

    Andrew, I added the ground first, I didn't work out so I removed the gnd still, Vsin voltage as input sine waveform didn't come. As you said to add gnd, I again added and ran the ADE_XL in config mode, still output remain same at 0 V as input, which inturn not causing any change in threshold based memristor.

    What shall I do now?

    Any suggestions would be highly appreciated.

    Thanking You

    Ranjan

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Ranjan Yadav
    Ranjan Yadav over 3 years ago in reply to Andrew Beckett

    Andrew, I added the ground first, I didn't work out so I removed the gnd still, Vsin voltage as input sine waveform didn't come. As you said to add gnd, I again added and ran the ADE_XL in config mode, still output remain same at 0 V as input, which inturn not causing any change in threshold based memristor.

    What shall I do now?

    Any suggestions would be highly appreciated.

    Thanking You

    Ranjan

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to Ranjan Yadav

    I just noticed that your config has a very strange set of views used, and also has no stopping views. Not sure that this is the reason, but it's not good. When you create the config view, click on the "Use Template" at the bottom and pick "spectre". Set the top-level design appropriately, but your view list should be:

    spectre cmos_sch cmos.sch schematic veriloga ahdl pspice dspf

    and stop list:

    spectre

    If this doesn't work, please go over the output point in ADE XL and use Right Mouse->View Netlist (or something like that) and share the contents of the netlist that is shown.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Ranjan Yadav
    Ranjan Yadav over 3 years ago in reply to Andrew Beckett

    Yes Andrew, It worked. Thank you so much. 

    I'm really grateful to you for helping me.

    Warm Regards

    Ranjan

    • 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