0.0000 14.65 0.0010 -10.99 0.0020 -26.86 . . . 29.9920 -73.24 29.9930 -105.0 29.9940 -78.13
The original file was comma separated, I removed them with a SED script.
How is this possible with GNU-CAP?
regards, Shahab.
On Sunday 01 May 2005 04:55 pm, Shahab Sanjari wrote:
This one is somehow off topic, actually a general question about SPICE simulation, but I thought I'd better ask it here.
Is it possible to tell the SPICE, that a voltage source doesn't generate according to a fix function, but rather reads a file from hard disk which has data in it? For example an ASCII file that has two columns separated with tabs or space, one for time and the other for amplitude. I could then feed this into my custom made filter to check the output.
Gnucap will do it the same way another poster said to do it with Spice, and some other ways too.
With gnucap, you can also do it through a .model statement. When you do it this way, you can pick the order of interpolation up to 3. 1 is PWL, 2 is quadratic splines, 3 is cubic splines. You can also set the boundary conditions. There is no limit on the number of points.
It will take about 5 lines of code to add exactly the feature you are looking for. If you want to try it I can do it this weekend.
Does the file exist completely before running the simulation? Or is the file being created as the simulation runs?
--