multi-model CDF for transistor symbol

G

Gerd

Guest
Hi,

I'm trying to create a symbol view that's usable for 2 transistor
models, named X and Y. To do this i started modifying a CDF file which
i dumped from an existing symbol. The idea is to be able to specify
which model i want when doing 'Add->Instance' in the Composer window.
This is working fine, and with the callback routine 'EvaluateStuff()' i
can alter other parameters depending on the choice i click.

cdfCreateParam( cdfId
?name "ModelName"
?prompt "Model name"
?defValue "X"
?choices '("X" "Y")
?type "radio"
?callback "EvaluateStuff()"
)
cdfCreateParam( cdfId
?name "A"
?display "cdfgData->ModelName->value==\"X\""
...
)
cdfCreateParam( cdfId
?name "B"
?display "cdfgData->ModelName->value==\"Y\""
...
)

I also have two parameters A and B which need to be activated when,
respectively, X or Y is selected.

Now, what is not working is changing the A and B label values attached
to the symbol after it has been instantiated.

cdfId->paramLabelSet = "-ModelName W L ..."

The dots should be A or B, depending on parameter ModelName.
(there are 4 cdsParam() labels specified in the symbol view)

I tried the following:

if(cdfFindParamByName(cdfId "ModelName")~>value == "X"
then
cdfId->paramLabelSet = "-ModelName W L A"
else
cdfId->paramLabelSet = "-ModelName W L B"
)

but it does not work on the schematic.

When i specify 5 labels and enter this, both A and B are displayed
simultaneously, but it isn't really what i want...

cdfId->paramLabelSet = "-ModelName W L A B"


Is it even possible to do something like this?
(what i can't seem to force is to specify 'cdfId->paramLabelSet' from
the callback routine 'EvaluateStuff()'...)

Any help is very much appreciated!

Gerd.
 
Found the answer:

if( ilInst~>model=="X"
strcat("A=" aelSuffixNotation(ilInst~>A))
strcat("B=" aelSuffixNotation(ilInst~>B))
)
 
Ok, i will have a look.

Do you know if you can make the model name a variable in the CDF data
for auCdl netlisting?

cdfId->simInfo->auCdl = '( nil
netlistProcedure ansCdlCompPrim
instParameters (m L W)
termOrder (D G S B)
propMapping (nil m VarProp)
namePrefix "M"
modelName "N"
)

Whatever i put for modelName (names, variables, quotes, no quotes), it
is always printed literally in the CDL netlist...
 
Well, i'm trying with these IL labels and i can indeed print the value
of a CDF parameter. But is it also possible to print something like
this?

"A = 2u"

I mean, printing the parameter name + its value, the way cdsParam()
does it.

Stephane, you mentioned the possibility of writing a custom netlist
procedure. Out of curiosity, do you know in which manual i can find
information on how to do this?

thanks,
Gerd
 
This is the only combination i can get working:

cdfId->simInfo->auCdl = '( nil
netlistProcedure ansCdlCompPrim
instParameters (m L W model)
termOrder (D G S B)
propMapping (nil model ModelName)
namePrefix "M"
)

I'm happy now ;)
 

Welcome to EDABoard.com

Sponsor

Back
Top