add comment in the code
This commit is contained in:
parent
f38d8ad70f
commit
c674c83440
|
|
@ -17,6 +17,7 @@ AUTHORS
|
||||||
MODIFICATIONS
|
MODIFICATIONS
|
||||||
|
|
||||||
<date> <person name> <nature of modifications>
|
<date> <person name> <nature of modifications>
|
||||||
|
1 oct. 2020 Florian Ballenegger Added support for instance parameters
|
||||||
|
|
||||||
SUMMARY
|
SUMMARY
|
||||||
|
|
||||||
|
|
@ -84,6 +85,43 @@ entries in the SPICE matrix and the storage of pointers to
|
||||||
locations of the matrix used by MIFload during a simulation.
|
locations of the matrix used by MIFload during a simulation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
Support for instance parameters: how it works
|
||||||
|
|
||||||
|
cmpp is modified to recognize the new 'parameter_scope' keyword
|
||||||
|
in ifspec.ifs files, which can be set to 'model', 'instance', or 'both'.
|
||||||
|
|
||||||
|
All parameters are filled in the xspice parameter descriptor, as before.
|
||||||
|
|
||||||
|
Instance parameters spice descriptors are added when ifspec.ifs
|
||||||
|
is translated (xspice/cmpp/writ_ifs.c).
|
||||||
|
Use the index in the xspice list of parameter descriptors as key id.
|
||||||
|
Instance parameters are put first, followed by instance static variables.
|
||||||
|
Parameters which have instance scope only are filtered out the model
|
||||||
|
parameter spice descriptors.
|
||||||
|
|
||||||
|
A new field 'iparam' is added in the Mif_Private_t struct to point to the
|
||||||
|
table of instance parameters values, which is stored in the MIFinstance
|
||||||
|
and allocated in mif_inp2.c.
|
||||||
|
|
||||||
|
Model object MIFmodel still hold entries for all parameters in 'param',
|
||||||
|
including instance parameters. The wasted memory is considered small as
|
||||||
|
there is usually less models than instances.
|
||||||
|
|
||||||
|
In the codemodel code generated by cmpp from cfunc.mod, the access to
|
||||||
|
parameters that have instance scope is modified to point to the iparam
|
||||||
|
entry of Mif_Private_t (xspice/cmpp/mod_yacc.y). Relevant index to
|
||||||
|
iparam table is calculated by cmpp.
|
||||||
|
|
||||||
|
A new MIFParam function is added to the core interface.
|
||||||
|
MIFask and MIFmParam are modified.
|
||||||
|
|
||||||
|
Parsing for A devices is modified at several places
|
||||||
|
(mif_inp2.c, subckt.c, inpcom.c)
|
||||||
|
|
||||||
|
Florian Ballenegger (Anamosic), October 2020.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
MIFsetup(
|
MIFsetup(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue