VCVS in LTSPICE as a 1 bit Comparator

Status
Not open for further replies.

Puppet123

Full Member level 6
Joined
Apr 26, 2017
Messages
356
Helped
22
Reputation
44
Reaction score
21
Trophy points
18
Activity points
3,059
I am using a VCVS in LTSPICE.

I am confused about the command in the Spiceline for using a Table.

I want to use the VCVS as a 1 bit Comparator instead of making a transistor based one.

What will adding the following spiceline for a VCVS in LTSpice do ?

table=(-0.5 0, 0 0, 1.0e-6 1, 0.5 1)

Will it set the output to 0 when the VCVS is input with -0.5, 0 output when it gets 0, 1 output when it gets 1u and one output when it gets 1?

Is this correct ?

Thanks.
 

Hi,

Why a VCVS? Why not some logic gate (s)?

Well, you have not explained what you want to compare but you have said one bit so I think you're referring to binary.

LTSPICE has a folder of components called DIGITAL. Inside the folder you have an XOR gate. Connecting a NOT gate at the output of the XOR gate gives an XNOR gate. You can successfully use this combination as a comparator for a one-bit input signal alongside a one-bit reference signal.
 

I believe the purpose and working of the table statement is well explained in SPICE and Ltspice manuals. See below the built-in help for Voltage Dependent Voltage Source


Yes, it's working as described in your question.
 

Some simulators added limit-values to the controlled sources
which could be handy, eliminating "blowups" from kV-range
voltages on devices fitted for only few-volt fidelity and sanity.
However this adds "sharp corners" where the transfer transitions
from controlled to clipped, which can itself be problematic
(usually want bounded and continuous derivatives; this is why
you often see tanh() used for things that "ought to be simpler".

But if it isn't a feature here then ....
 

Hello,

Thank you for your replies.

It is for an MDAC for a Pipeline ADC simulation. I need a 1 bit comparator for the 1.5 bit Pipeline ADC stage.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…