P
PolyPusher
Guest
*WARNING* dbiGetHeaderMasterCellView: Failed to open cellView
(AC_block symbol) from lib (crdc_custom_work) in 'r' mode because
cellview does not exist.
I have some code that reports the connectivity of an instance and
places it in a file. In some cases some instances in the schematic
are mapped(not sure if this is the right description) to the wrong
library(they are "blinking" if that helps . Is there a way to
check for this condition and continue?
Something like:
if unable to open cellview, then print in the CIW "Failed to find
instance", else continue with original code.
Code is below.
Thank you in advance,
Eric
procedure(EFConnectivity(fileName @optional (cvEFcon geGetEditCellView
()))
let((prt PIN EFInstance EFCellname EFTerm EFNet EFCellPin
EFPinCellname EFTermName EFPinNetName EFX EFCon_list EFCon_pins
EFConInst EFConInstName EFConXtemp EFConInstNamePrev)
EFConInstNamePrev="EFNoInst"
EFCon_pins=nil
EFCon_list=nil
PIN="PIN"
EFX=0
unless(prt=outfile(fileName)
error("Could not open %s for writing" fileName)
) ; unless
fprintf(prt "Connectivity Report Format:Instance.Cellname.InstTerm
(pins).net")
fprintf(prt "\n")
fprintf(prt "\n")
when(cvEFcon
foreach( inst cvEFcon~>instances
EFInstance=inst~>name
EFCellname=inst~>master~>cellName
foreach( instTerm inst~>instTerms
EFTerm=instTerm~>name
EFNet=instTerm~>net~>name
EFCon_list=append(EFCon_list list(strcat(EFInstance "."
EFCellname "." EFTerm " - " EFNet )))
);foreach
);foreach
);when
;sort the output
EFCon_list=sort(EFCon_list nil)
;==========addition for pins
PIN="PIN"
when(cvEFcon
foreach( inst cvEFcon~>instances
if(rexMatchp(PIN inst~>name)
then EFCellPin=inst~>name
EFPinCellname=inst~>master~>cellName
);if
if( inst~>net
then
EFTermName=inst~>net~>term~>name
EFPinNetName=inst~>net~>name
EFCon_pins=append(EFCon_pins list(strcat(EFCellPin "."
EFPinCellname "." EFTermName " - " EFPinNetName )))
);if
);foreach
);when
;==============end pin addition
EFCon_pins=sort(EFCon_pins nil)
foreach( mapc EFConX EFCon_list
EFConXtemp=nil
EFConXtemp=EFConX
EFConInst=nil
EFConInst=append(EFConInst list(EFConXtemp))
EFConInstName=nil
EFConInstName=car(parseString(car(parseString(car(EFConInst)
"."))))
if(EFConInstName==EFConInstNamePrev
then
fprintf(prt EFConX)
fprintf(prt "\n")
else
fprintf(prt "\n");new instance, add a space in the file
fprintf(prt EFConX)
fprintf(prt "\n")
);if
EFConInstNamePrev=EFConInstName;capture previous value for if, then,
else above
)
fprintf(prt "\n")
foreach( mapc EFConX EFCon_pins ;process pins seperately to save
space in file, no space between "pin instances"
fprintf(prt EFConX)
fprintf(prt "\n")
);foreach
close(prt)
view(get_filename(prt))
)
t
)
(AC_block symbol) from lib (crdc_custom_work) in 'r' mode because
cellview does not exist.
I have some code that reports the connectivity of an instance and
places it in a file. In some cases some instances in the schematic
are mapped(not sure if this is the right description) to the wrong
library(they are "blinking" if that helps . Is there a way to
check for this condition and continue?
Something like:
if unable to open cellview, then print in the CIW "Failed to find
instance", else continue with original code.
Code is below.
Thank you in advance,
Eric
procedure(EFConnectivity(fileName @optional (cvEFcon geGetEditCellView
()))
let((prt PIN EFInstance EFCellname EFTerm EFNet EFCellPin
EFPinCellname EFTermName EFPinNetName EFX EFCon_list EFCon_pins
EFConInst EFConInstName EFConXtemp EFConInstNamePrev)
EFConInstNamePrev="EFNoInst"
EFCon_pins=nil
EFCon_list=nil
PIN="PIN"
EFX=0
unless(prt=outfile(fileName)
error("Could not open %s for writing" fileName)
) ; unless
fprintf(prt "Connectivity Report Format:Instance.Cellname.InstTerm
(pins).net")
fprintf(prt "\n")
fprintf(prt "\n")
when(cvEFcon
foreach( inst cvEFcon~>instances
EFInstance=inst~>name
EFCellname=inst~>master~>cellName
foreach( instTerm inst~>instTerms
EFTerm=instTerm~>name
EFNet=instTerm~>net~>name
EFCon_list=append(EFCon_list list(strcat(EFInstance "."
EFCellname "." EFTerm " - " EFNet )))
);foreach
);foreach
);when
;sort the output
EFCon_list=sort(EFCon_list nil)
;==========addition for pins
PIN="PIN"
when(cvEFcon
foreach( inst cvEFcon~>instances
if(rexMatchp(PIN inst~>name)
then EFCellPin=inst~>name
EFPinCellname=inst~>master~>cellName
);if
if( inst~>net
then
EFTermName=inst~>net~>term~>name
EFPinNetName=inst~>net~>name
EFCon_pins=append(EFCon_pins list(strcat(EFCellPin "."
EFPinCellname "." EFTermName " - " EFPinNetName )))
);if
);foreach
);when
;==============end pin addition
EFCon_pins=sort(EFCon_pins nil)
foreach( mapc EFConX EFCon_list
EFConXtemp=nil
EFConXtemp=EFConX
EFConInst=nil
EFConInst=append(EFConInst list(EFConXtemp))
EFConInstName=nil
EFConInstName=car(parseString(car(parseString(car(EFConInst)
"."))))
if(EFConInstName==EFConInstNamePrev
then
fprintf(prt EFConX)
fprintf(prt "\n")
else
fprintf(prt "\n");new instance, add a space in the file
fprintf(prt EFConX)
fprintf(prt "\n")
);if
EFConInstNamePrev=EFConInstName;capture previous value for if, then,
else above
)
fprintf(prt "\n")
foreach( mapc EFConX EFCon_pins ;process pins seperately to save
space in file, no space between "pin instances"
fprintf(prt EFConX)
fprintf(prt "\n")
);foreach
close(prt)
view(get_filename(prt))
)
t
)