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

Re: gEDA-user: ngspice simulation with microcontrollers



On Sep 25, 2007, at 1:03 AM, Amos Tibaldi wrote:

> Hello,
>  I write this mail in order to obtain help if possible for the use  
> of the ngspice simulator. How can I simulate the behaviour of a  
> microcontroller that is present in the schematic of a circuit with  
> ngspice?

Basically, you can't.

What I do in these situations is substitute voltage sources for the  
microcontroller output pins and generate PWL stimuli for them. Put  
probes where the inputs would be, .PRINT those voltages, and use an  
AWK or C program to extract bits from the recorded voltages. Of  
course, that's a one-way data flow: if you really want the  
microcontroller to participate, you can't do it that way. What I  
think you want is very difficult, and likely impractical.

> In the netlist there is a row starting for example with U3 but I  
> don't know how to implement its behaviour in a way that the ngspice  
> simulation considers it. I have seen in the gEDA Suite GUI that  
> there is a row with written "Chip programs" that has leafs  
> verilog .v files. May be that is the way? But in such a case how  
> can I inform ngspice to use the verilog listing?

Perhaps Al will chime in about gnucap: I suppose you could write some  
sort of plugin that allows the program you'd run in the  
microcontroller to interact in an event-driven way with an analog sim.

>
> Thanks very much in advance,
>
> -- 
> Amos Tibaldi
>
>
> _______________________________________________
> geda-user mailing list
> geda-user@xxxxxxxxxxxxxx
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

John Doty              Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd@xxxxxxxxx




_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user