|
From: Lionel S. C. <lio...@gm...> - 2009-01-18 17:52:15
|
Hello,
I'm trying to understand how spice work, and how it is implemented. I
read most of the spice designer's book. It gives precious information
on the theory of spice, but not on the actual C implementation.
I ask the questions I'm investigating on. If someone have the
knowledge and time to answer me, I'm interested.
My actual preocupation is to simulate an OP command by saving the
relevant information of a transient point and restore it for ac
analysis.
Spice uses an RHS vector containing the circuit values (currents?) and
a matrix representing the relation between each.
Is that right:
The designer is interested in the RHS data because it represents the
data we are used to manipulate in a circuit (Voltage, currents)
The AC analysis is interested in the matrix as it represents the
linearised relation between it.
Question:
What is important to save? Both, as both are calculated by NIiter I guess.
Question:
In order to speed up processing, the matrix is ordered. How is the
link between RHS and matrix handled. It seems that the RHS is not
scrambled. This line (spsolve.c : 190) in SMPsolve gives a clue?
Solution[*(pExtOrder--)] = Intermediate[I]; ?
Both TRAN and OP use NIiter function. I guess where the difference
between OP and TRAN is handled (in preparation of the data before
calling NIiter, or in NIiter itself)
Thanks by advance. Work in progress...
--
Lionel SAINTE CLUQUE
|