XSPICE

Had a thought to create some digital models using XSPICE primitives...

...I don't think I've seen them used before, in models, and I'm probably seeing why.

Why did they see fit to create and release such uselessness?

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Contract Design 
Website: http://seventransistorlabs.com
Reply to
Tim Williams
Loading thread data ...

See 2nd paragraph here: Hopefully, that will explain their intent. [Disclaimer: I know nothing about XSPICE]

--
Jeff Liebermann     jeffl@cruzio.com 
150 Felker St #D    http://www.LearnByDestroying.com 
Santa Cruz CA 95060 http://802.11junk.com 
Skype: JeffLiebermann     AE6KS    831-336-2558
Reply to
Jeff Liebermann

What do you think is wrong with it? I use XSPICE from within NGSPICE and in my opinion it a fabulous piece of software (open, free, and extensible).

XSPICE is also in Intusoft ICAPS and in SIMetrix. The bare netlist interface is clunky because one has to frequently cross from the analog to the digital world, using bridge models. SIMetrix places bridges automatically. The SIMetrix documentation for XSPICE (on-line) is delightfully concrete and to the point.

-marcel

Reply to
mhx

Thanks for the reply.

Simple example: Suppose I want to create a model of the UC3842 peak current mode controller (or something like that).

The switching core requires an error amp, comparator, pulse generator (oscillator), RS flip-flop, and an output driver.

The error amp is simple enough (any op-amp model will do, or a couple dependent sources, passives and diodes if we're desperate), no worries there.

The comparator can be implemented in analog to meet voltage and timing specs, but has to turn digital eventually. We might apply some input conditioning, followed by a 1-bit ADC, to solve this. Still no problem.

The problem comes at the flip-flop. If we use the XSPICE flip-flop primitive, then as soon as both inputs go high, the output goes undefined, and so goes everything after it. This is a necessary, and normal, condition for this circuit, with a well-defined "race" state (one input shall be dominant), and a well-defined outcome (even if both inputs exit the "race" state at the same instant, it is acceptable for the output to be in either state; pick one).

If there's a larger chain of logic following, then everything that's touched by the undefined level also becomes undefined.

Most absurd of all, there seems to be no component which can "fix" an undefined level. There is no "define" gate, say: 0 ==> 0, 1 ==> 1, undefined ==> {0|1}. Surely there must be a recommended method to prevent this madness from spreading through an entire circuit. (It would be fantastic to have documented such a solution in the first place...)

I forget exactly what I was working on when I realized this, so I don't have a more concrete example to offer...

I'll have to see what SIMetrix has to say, thanks.

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Contract Design 
Website: http://seventransistorlabs.com
Reply to
Tim Williams

Probably on purpose. The idea might be that 'undefined' never must happen in a proper design, so the simulator has to make sure the user always sees it. A bit like 0/0 generating a NaN and there being (almost) no way to get rid of it.

To be sure, I fully understand your frustration, but to me this does not yet demonstrate XSPICE's uselessness.

Do you know about cm_d_state, XSPICE's digital state machine model? It handles all 12 states at input and output.

(I defined my PWM in 'C' directly :-)

[..]

-marcel

Reply to
mhx

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.