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("lus"==mappingstring mappingstring=":a")
if(":minus"==mappingstring mappingstring=":b")
);when resistor
when(rexMatchp("^CAP" device)
if("lus"==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
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("lus"==mappingstring mappingstring=":a")
if(":minus"==mappingstring mappingstring=":b")
);when resistor
when(rexMatchp("^CAP" device)
if("lus"==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