Home > Community > Forums > Custom IC Design > How to use vcvs as an OR or AND gate

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 How to use vcvs as an OR or AND gate 

Last post Thu, Jan 3 2013 10:16 AM by Andrew Beckett. 3 replies.
Started by sohaiba 27 Nov 2012 11:42 PM. Topic has 3 replies and 1765 views
Page 1 of 1 (4 items)
Sort Posts:
  • Tue, Nov 27 2012 11:42 PM

    • sohaiba
    • Top 500 Contributor
    • Joined on Mon, Jul 9 2012
    • Islamabad, Pakistan
    • Posts 21
    • Points 375
    How to use vcvs as an OR or AND gate Reply

    Please can you elaborate how to use the vcvs source as OR or AND gate? How to connect the terminals?

    Sohaib
    • Post Points: 20
  • Thu, Jan 3 2013 7:22 AM

    Re: How to use vcvs as an OR or AND gate Reply

    Use vcvsp (not vcvs) from analogLib. That allows you to specify the number of controlling voltages (i.e number of inputs to your logic gate). Then specify the type of source as "and" or "or" or whatever you want. 

    See the attached picture with a schematic (showing the property assistant to see the properties on the vcvsp), and the resulting waveforms.

    Regards,

    Andrew.


    • Post Points: 20
  • Thu, Jan 3 2013 9:35 AM

    • surreyian
    • Top 500 Contributor
    • Joined on Tue, May 17 2011
    • Posts 19
    • Points 320
    Re: How to use vcvs as an OR or AND gate Reply
    I tried to configure a NAND/NOR gate with the example given, but NAND/NOR gates gave the same result as AND/OR gate. Any other setting required?
    • Post Points: 20
  • Thu, Jan 3 2013 10:16 AM

    Re: How to use vcvs as an OR or AND gate Reply

    Yes, it's a bit of an oddity - but one that comes from the same feature in certain other SPICE simulators - they also behave the same way where AND and NAND are equivalent (I just checked). This isn't entirely surprising if you think about it, because there's no information on what the inversion would be...

    To get the inversion, you have to set the "Type of transfer char" to PWL, and then you can specify a PWL mapping of input to output voltage (so for example, in my case if I have 4 inputs in the PWL vector, with inputs 0, 0.2, 1.8, 2 and outputs 2, 1.8, 0.2, 0 - this will achieve the inversion (I had a 2 volt "supply" in my case).

    Regards,

    Andrew.

    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by sohaiba at 27 Nov 2012 11:42 PM. Topic has 3 replies.