[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnucap-devel] commands in spectre mode.
Re: [Gnucap-devel] commands in spectre mode.
Sat, 1 Dec 2007 12:40:09 +0000
On Dec 1, 2007 6:51 AM, al davis <address@hidden> wrote:
> On Friday 30 November 2007, Dan McMahill wrote:
> > > 1. When a command is prefixed with an instance name, what
> > > to do with the name?
> > Spectre uses it to name the results files. For example
> > tran1 tran start=0 stop=1u ....
> > tran2 tran start=1u stop=2u
> > mysim ac ....
> > will produce results files called "tran1.tran", "tran2.tran",
> > "mysim.ac".
> Equivalent to gnucap:
> tran 0 1u >tran1.tran
It is not only that (see my previous mail). For example transient
analysis may include (out of my head, can be wrong):
my_tran tran ... acnames=[my_ac] actimes=[1e-6] ...
my_alter alter param=>my_param> value=<new_value>
my_ac ac ...
The simulation flow is:
2. my_ac (interestingly it outputs data not to the my_ac database but
rather to the my_tran_something as a sweep with actimes being a sweep
Note that referencing may disturb the order of evaluation (my_alter
was not called before my_ac).
> > commands are in fact instances just like elements (except
> > their order of appearance matters)
> Like gnucap.
I am not perfectly sure now but command may be nested in case of sweep analyses.
> > > 2. Are commands sequential, like normal gnucap commands, or
> > > like mixed batch of cards, like spice?
> > sequential but the whole topology of the circuit is read in
> > first. i.e. you can put your analysis commands before the
> > circuit netlist if you want.
> Good, except for the "but" part. I regularly use the gnucap
> feature to partly build a circuit, simulate, build more ...
> unbuild some, simulate ...
For now, I would settle for compatibility with netlists produced by
GUI tools. They AFAIK produce sequential netlists.
> What about interactive operation? .. typing in commands and
> components from the keyboard?
I have never used it.
> > > 3. How to set up probes?
> > you'll find stuff like this:
> > finalTimeOP info what=oppoint where=rawfile
> > modelParameter info what=models where=rawfile
> > element info what=inst where=rawfile
> > outputParameter info what=output where=rawfile
> > designParamVals info what=parameters where=rawfile
> > saveOptions options save=allpub
> > These statements control things like what is written out and
> > what signals are saved.
> Can you explain? I don't understand.
AFAIK saveOptions decides which variables should be saved during
analyses that were specified earlier.
Other commands output design information data as key->value pairs to
the output database. This is pretty useful as both simulation data
and, say, model or instance design parameters or DC OP results can be
later accessed using a single API. It means you can write a script for
postprocessing the results and it will have access to the
presimulation settings as well.
The database itself has a hierarchical organisation and stores
key->value pairs. Key can be anything you want, a simulation command
name, an instance name, a net name etc. The values can be:
- Another table. If you access "my_tran-tran" you will get another
table with top level instance and net names.
- Scalars. Can be a waveform, but also a single measurement (like OP
for a IDS current of an instance) or a text string (simulation title
- Vectors. Just a sequence of scalars.
Additionaly, from the API level there is no difference between
accessing a waveform and accessing a table produced by a sweep
analysis that contains scalar values. They are handled differently in
the database but later unified by the data access library.
> > This will give results files called mysims1.ac1,
> > mysims1.tran1, mysims2.ac1, mysims2.tran1
> or is it "mysims1.ac1.ac" ?
Probably mysims1.ac1-ac. Analysis names have the analysis types
encoded in their names.
> > // include a section from a file
> > include "/some/model/file" section=<mysection>
> How are sections marked? By a section do you mean a subckt?
By default, Spectre includes files in Spice format:
include "my_lib.lib" section=lib1
$ cat my_lib.lib
I am not sure about spectre library format now. It is only being used
if the library file name has an extension ".scs" or it explicitly
switches to spectre syntax mode.
> Need to finish expression evaluation. I have code, just need to
> move it.
That would be great. Does it allows constructing expressions form
design variables (like Spectre) or also from the circuit (node voltags
etc) variables (like Hspice)? The latter is a great tool for