Hi every one,
I wrote a script to generate many files, but when the script finished, the icfb showed the error information: segmentation fault, and crashed.
I tested the script in IC51 and IC61, both crashed.
Please help me to find the problem out, thank you very much!!
the codes:
procedure(LeeSrcLibGen(pdk bodyList metalList targetPath)
prog((contName metalLength a i metalOpt totalList metalProcess contPath ipcId num cellPath viewFile port envFile)
contName=strcat(pdk "_" "srcLibs")
unless(isDir(targetPath) && isWritable(targetPath)
printf("path is not available: %L \n" targetPath)
return()
)
printf("\n**************************************************\n
\n The Directory has been created.\n
\n Ready to generate.\n
\n**************************************************\n")
ipcId=ipcBeginProcess(strcat("rm -rf " targetPath "/" contName))
ipcWait(ipcId)
metalLength=length(metalList)
a=1
foreach(metal metalList
metalProcess=car(metal)
metalOpt=remove(metalProcess metal)
totalList=append(bodyList metalOpt)
contPath=targetPath
foreach(context list(contName metalProcess "libdefs" pdk)
contPath=strcat(contPath "/" context)
ipcId=ipcBeginProcess(strcat("mkdir " contPath))
ipcWait(ipcId) ) ;foreach
num=length(totalList)
i=1
foreach(cell totalList
cellPath=strcat(contPath "/" cell)
ipcId=ipcBeginProcess(strcat("mkdir " cellPath))
ipcWait(ipcId)
viewFile=strcat(cellPath "/" "schematic.view")
setq(port outfile(viewFile))
when(port
fprintf(port "%L %L \n" pdk cell) ) ;when
close(port)
printf("%n-->Generating %L (%n/%n) --- %L \n" a metalProcess i++ num cell )
hiFlush()
) ;foreach
a++
) ;foreach
printf("Done...\n")
) ;let
) ; procedure
pdkName="testPDK"
bodyList=list(
"nmos18" "nmos33" "nmos18_ckt" "nmos33_ckt" "pmos18" "pmos33" "pmos18_ckt" "pmos33_ckt"
"nmos18_nw" "nmos33_nw" "nmos18_nw_ckt" "nmos33_nw_ckt" "pmos18_nw" "pmos33_nw" "pmos18_ckt_nw" "pmos33_nw_ckt"
"rnplus" "rpplus" "rnplus_sab" "rpplus_sab" "rnwell_aa" "rnwell_sti"
"rnpoly" "rppoly" "rnpoly_sab" "rppoly_sab" "rhr"
"rnplus_ckt" "rpplus_ckt" "rnplus_sab_ckt" "rpplus_sab_ckt" "rnwell_aa_ckt" "rnwell_sti_ckt"
"rnpoly_ckt" "rppoly_ckt" "rnpoly_sab_ckt" "rppoly_sab_ckt" "rhr_ckt"
)
metalList=list(
'("All" "rm1" "rm2" "rm3" "rm4" "rm5" "rm6" "rm6_ckt" "rm6t" "rm6t_ckt")
'("metalA" "rm1" "rm2" "rm3" "rm4" "rm5" "rm6")
'("metalB" "rm1" "rm2" "rm3" "rm4" "rm6")
'("metalC" "rm1" "rm2" "rm3" "rm6")
'("metalD" "rm1" "rm2" "rm6")
'("metalE" "rm1" "rm2" "rm3" "rm4" "rm5" "rm6_ckt")
'("metalF" "rm1" "rm2" "rm3" "rm4" "rm6_ckt")
'("metalG" "rm1" "rm2" "rm3" "rm6_ckt")
'("metalH" "rm1" "rm2" "rm6_ckt")
'("thickmetalA" "rm1" "rm2" "rm3" "rm4" "rm5" "rm6t")
'("thickmetalB" "rm1" "rm2" "rm3" "rm4" "rm6t")
'("thickmetalC" "rm1" "rm2" "rm3" "rm6t")
'("thickmetalD" "rm1" "rm2" "rm6t")
'("thickmetalE" "rm1" "rm2" "rm3" "rm4" "rm5" "rm6t_ckt")
'("thickmetalF" "rm1" "rm2" "rm3" "rm4" "rm6t_ckt")
'("thickmetalG" "rm1" "rm2" "rm3" "rm6t_ckt")
'("thickmetalH" "rm1" "rm2" "rm6t_ckt")
)
targetPath="./"
hiDisplayAppDBox(?name 'LeeSrcNoticBox
?dboxBanner "information"
?dboxText "It will create src library"
?dialogType hicErrorDialog
?dialogStyle 'modal
?buttonLayout 'YesNo
?callback sprintf(nil "LeeSrcLibGen('%L '%L '%L '%L)" pdkName bodyList metalList targetPath)
)