Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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

Syntax: Exxx n+ n- nc+ nc- table=(<value pair>, <value pair>, ...)

A look-up table is used to specify the transfer function. The table is a list of pairs of numbers. The second value of the pair is the output voltage when the control voltage is equal to the first value of that pair. The output is linearly interpolated when the control voltage is between specified points. If the control voltage is beyond the range of the look-up table, the output voltage is extrapolated as a constant voltage of the last point of the look-up table.

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top