how do I get rid of this evalstring() ?

F

fogh

Guest
Hi All,

How can I get rid of the evalstring in the following ? :

let(
(library CDFid termlist term devicelist device mappingstring)
library="somepdk"
devicelist='(
"nmos" "pmos" "rfnmos"
"npn" "lpnp" "vpnp"
"respoly" "reswood" "resceramic" "respaper" "resstone"
"capMIM" "capPIS" "varicap"
)
foreach(device devicelist
CDFid=cdfGetCellCDF(ddGetObj(library device))
termlist=CDFid->simInfo->spectre->termMapping->?

foreach(term termlist
mappingstring=strcat(":" lowerCase(term))
when(rexMatchp("^res" device)
if(":plus"==mappingstring mappingstring=":a")
if(":minus"==mappingstring mappingstring=":b")
);when resistor
when(rexMatchp("^CAP" device)
if(":plus"==mappingstring mappingstring=":a")
if(":minus"==mappingstring mappingstring=":k")
);when capa with polarity
mappingstring=sprintf(nil "(FUNCTION mappedRoot(%L))" mappingstring)
evalstring( strcat(
"CDFid->simInfo->spectre->termMapping->"
term
"=mappingstring"
))
);foreach term
);foreach device
);let
 
this seems to work :

putprop( CDFid->simInfo->spectre->termMapping mappingString term )

cheers,

stéphane


fogh wrote:

Hi All,

How can I get rid of the evalstring in the following ? :

let(
(library CDFid termlist term devicelist device mappingstring)
library="somepdk"
devicelist='(
"nmos" "pmos" "rfnmos"
"npn" "lpnp" "vpnp"
"respoly" "reswood" "resceramic" "respaper" "resstone"
"capMIM" "capPIS" "varicap"
)
foreach(device devicelist
CDFid=cdfGetCellCDF(ddGetObj(library device))
termlist=CDFid->simInfo->spectre->termMapping->?

foreach(term termlist
mappingstring=strcat(":" lowerCase(term))
when(rexMatchp("^res" device)
if(":plus"==mappingstring mappingstring=":a")
if(":minus"==mappingstring mappingstring=":b")
);when resistor
when(rexMatchp("^CAP" device)
if(":plus"==mappingstring mappingstring=":a")
if(":minus"==mappingstring mappingstring=":k")
);when capa with polarity
mappingstring=sprintf(nil "(FUNCTION mappedRoot(%L))"
mappingstring)
evalstring( strcat(
"CDFid->simInfo->spectre->termMapping->"
term
"=mappingstring"
))
);foreach term
);foreach device
);let
 
Thanks Stephane, it works fine.

I guess I should have RTFM on this one: it is explicit from SKILL user manual , chapter on data structures, that I had to use putprop. I just made myself a new hardcopy.

S. Badel wrote:
this seems to work :

putprop( CDFid->simInfo->spectre->termMapping mappingString term )

cheers,

stéphane


fogh wrote:

Hi All,

How can I get rid of the evalstring in the following ? :

let(
(library CDFid termlist term devicelist device mappingstring)
library="somepdk"
devicelist='(
"nmos" "pmos" "rfnmos"
"npn" "lpnp" "vpnp"
"respoly" "reswood" "resceramic" "respaper" "resstone"
"capMIM" "capPIS" "varicap"
)
foreach(device devicelist
CDFid=cdfGetCellCDF(ddGetObj(library device))
termlist=CDFid->simInfo->spectre->termMapping->?

foreach(term termlist
mappingstring=strcat(":" lowerCase(term))
when(rexMatchp("^res" device)
if(":plus"==mappingstring mappingstring=":a")
if(":minus"==mappingstring mappingstring=":b")
);when resistor
when(rexMatchp("^CAP" device)
if(":plus"==mappingstring mappingstring=":a")
if(":minus"==mappingstring mappingstring=":k")
);when capa with polarity
mappingstring=sprintf(nil "(FUNCTION mappedRoot(%L))"
mappingstring)
evalstring( strcat(
"CDFid->simInfo->spectre->termMapping->"
term
"=mappingstring"
))
);foreach term
);foreach device
);let
 

Welcome to EDABoard.com

Sponsor

Back
Top