CDF problem



I am trying to create a a parametrized cell. However something seems
not to work properly.
I read the docs but could not figure out the problem. Any hint?

When simulating I get this message in the CIW

\o Warning from spectre in `vsinpulse', during circuit read-in.
\o
\o "input.scs" 24: `vsinpulse': Parameter `v1' redefines parameter
of same
\o name defined at higher level.
\o
\o "input.scs" 24: `vsinpulse': Parameter `v2' redefines parameter
of same
\o name defined at higher level.
\o
\o "input.scs" 24: `vsinpulse': Parameter `per' redefines
parameter of same
\o name defined at higher level.
\o
\o "input.scs" 24: `vsinpulse': Parameter `tdp' redefines
parameter of same
\o name defined at higher level.
\o
\o "input.scs" 24: `vsinpulse': Parameter `tr' redefines parameter
of same
\o name defined at higher level.
\o
\o Further occurrences of this warning will be suppressed.

The cell is composed by a vsin and a vpulse in series.
I used pPar() to make some parameters of those two sources as
parameters of my new cell.
E.g. in the AC magnitude of vsin I put pPar("acm"), etc., so that my
new cell has a parameter named acm that sets that value to one of it's
component
This is a file generated with cdfDump():


/****************************************************/
LIBRARY = "ballini_devel"
CELL = "vsinpulse"
/****************************************************/

let( ( libId cellId cdfId )
unless( cellId = ddGetObj( LIBRARY CELL )
error( "Could not get cell %s." CELL )
)
when( cdfId = cdfGetBaseCellCDF( cellId )
cdfDeleteCDF( cdfId )
)
cdfId = cdfCreateBaseCellCDF( cellId )

;;; Parameters
cdfCreateParam( cdfId
?name "acm"
?prompt "AC magnitude"
?units "voltage"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('acp)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "acp"
?prompt "AC phase"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('acp)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "vdc"
?prompt "DC voltage"
?units "voltage"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('vdc)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "vo"
?prompt "Offset voltage"
?units "voltage"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('vo)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "va"
?prompt "Amplitude"
?units "voltage"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('va)"
?editable "t"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "freq"
?prompt "Frequency"
?units "frequency"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('freq)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "tds"
?prompt "Delay time for sine wave"
?units "time"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('tds)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "theta"
?prompt "Damping factor"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('theta)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "xfm"
?prompt "XF magnitude"
?units "voltage"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('xfm)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "pacm"
?prompt "PAC magnitude"
?units "voltage"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('pacm)"
?editable "t"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "pacp"
?prompt "PAC phase"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('pacp)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "v1"
?prompt "Voltage 1"
?units "voltage"
?defValue "0.0"
?type "string"
?display "artParameterInToolDisplay('v1)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "v2"
?prompt "Voltage 2"
?units "voltage"
?defValue "0.0"
?type "string"
?display "artParameterInToolDisplay('v2)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "tdp"
?prompt "Delay time for pulse wave"
?units "time"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('tdp)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "tr"
?prompt "Rise time"
?units "time"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('tr)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "tf"
?prompt "Fall time"
?units "time"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('tf)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "pw"
?prompt "Pulse width"
?units "time"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('pw)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "per"
?prompt "Period"
?units "time"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('per)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)

;;; Simulator Information
cdfId->simInfo = list( nil )
cdfId->simInfo->UltraSim = '( nil
namePrefix "V"
termOrder (PLUS MINUS)
componentName "subcircuit"
netlistProcedure nil
)
cdfId->simInfo->auCdl = '( nil
namePrefix "V"
termOrder (PLUS MINUS)
componentName "subcircuit"
netlistProcedure ansCdlSubcktCall
)
cdfId->simInfo->auLvs = '( nil
namePrefix "V"
termOrder (PLUS MINUS)
componentName "subcircuit"
netlistProcedure ansLvsCompPrim
)
cdfId->simInfo->cdsSpice = '( nil
namePrefix "V"
termOrder (PLUS MINUS)
componentName "subcircuit"
macroArguments ("acm" "acp" "vdc" "vo" "va" "freq" "tds"
"theta" "xfm" "pacm" "pacp" "v1" "v2" "tdp" "tr" "tf" "pw" "per")
netlistProcedure ansSpiceSubcktCall
)
cdfId->simInfo->hspiceD = '( nil
namePrefix "V"
termOrder (PLUS MINUS)
componentName "subcircuit"
netlistProcedure nil
)
cdfId->simInfo->hspiceS = '( nil
namePrefix "V"
termOrder (PLUS MINUS)
componentName "subcircuit"
macroArguments ("acm" "acp" "vdc" "vo" "va" "freq" "tds"
"theta" "xfm" "pacm" "pacp" "v1" "v2" "tdp" "tr" "tf" "pw" "per")
netlistProcedure ansSpiceSubcktCall
)
cdfId->simInfo->spectre = '( nil
namePrefix "V"
termOrder (PLUS MINUS)
componentName "subcircuit"
instParameters (acm acp vdc vo va freq tds theta xfm pacm
pacp v1 v2 tdp tr tf pw per)
netlistProcedure nil
)
cdfId->simInfo->spectreS = '( nil
namePrefix "V"
termOrder (PLUS MINUS)
componentName "subcircuit"
macroArguments ("acm" "acp" "vdc" "vo" "va" "freq" "tds"
"theta" "xfm" "pacm" "pacp" "v1" "v2" "tdp" "tr" "tf" "pw" "per")
netlistProcedure ansSpiceSubcktCall
)

;;; Properties
cdfId->formInitProc = ""
cdfId->doneProc = ""
cdfId->buttonFieldWidth = 340
cdfId->fieldHeight = 35
cdfId->fieldWidth = 350
cdfId->promptWidth = 175
cdfId->paramLabelSet = "vo va freq v1 v2 tr"
cdfId->opPointLabelSet = "i"
cdfSaveCDF( cdfId )
)

*****************END OF FILE*******************************

Moreover, is this file essentially correct? Can I "trust" its
behavior?

Also, how can I make the current that flows in the two cell components
a "property" (I don't know the exact term here) that is accessible
e.g. in the calculator without descending in the hierarchy (in the
expression in the Calulator window)?

Thanks for any hint!
Kind regards
.



Relevant Pages