[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnucap-devel] System simulation
From: |
al davis |
Subject: |
Re: [Gnucap-devel] System simulation |
Date: |
Mon, 19 Mar 2007 02:31:25 -0400 |
User-agent: |
KMail/1.9.5 |
On Sunday 18 March 2007 06:07, Thomas Lundin wrote:
> I played around with gnucap a few years ago and thought that
> the interactivity would make it "easy" to get it to talk to
> an micro-controller simulator. And now when micro-controller
> simulator people has joined up with the circuit simulator
> people on this list I thought I'd get some opinions.
>
> What got me into this is that it's possible to continue a
> transient analasys where it left off after it has been
> stopped. If I recall correctly it is possible to change
> component values around while it's halted and continue with
> those new values.
That still works :-)
> My thought was to create a new logic device that works as an
> "digital generator" that can be changed between 1 and 0 from
> the command line. The plan was then that the MCU-simulator
> would interact with gnucap through a pipe.
The existing logic device is scheduled for some big changes.
Probably the best way to accomplish what you want is a "bm"
function. Any component can have an expression, with a
function, like PWL, TANH, and the Spice time dependent sources.
These are defined in the "bm" files. (Behavioral modeling,
1980's style).
What I recommend is to make a new bm file, maybe you could call
it "bm_external.cc" that lets you set a value from a pipe.
Another approach might be to define a new device with
a ".model" file.
> Would this be enough from a gnucap point of view to get
> gnucap and a MCU-simulator (gpsim for instance) be able to
> act as system simulator where you can simulate your software
> together with your electronics?
>
> A second and required step would be to add ADC's and DAC's.
The plan is full Verilog-AMS, eventually. Before that, you
could make those as ".model" files. The ".model" files are
compiled into ".cc" files by "gnucap-modelgen". Compiling
that ".cc" makes a ".so" that can be used as a plugin. This
functionality exists now, in the development snapshot.
Future plans include being able to "attach foo.cc"
or "attach "bar.model" with a single command, and have the
compiling done automatically.