[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: File instead of SPICE voltage source?



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?