热度 29| |
1.#auto_cdl_out.csh#
#!/bin/csh
set library=$1
set cell=$2
set includeFile=/************your cdl includeFile path****************/source.added #subckit文件#
if( ! -d cdl ) then
mkdir cdl
endif
cd cdl
if(! -f cds.lib ) then
ln -s ../cds.lib ##此处是连接上一层的cds.lib文件,要确保cds.lib的文件位置正确以及里面各个lib的路径是完整且正确的!
endif
cat <<EOF >! si.env
simLibName = "$library"
simCellName = "$cell"
simViewName = "schematic"
simSimulator = "auCdl"
simNotIncremental = 't
simReNetlistAll = nil
simViewList = '("auCdl" "schematic")
simStopList = '("auCdl")
simNetlistHier = t
hnlNetlistFileName = "$cell.cdl"
resistorModel = ""
shortRES = 2000.0
preserveRES = 't
checkRESVAL = 't
checkRESSIZE = 'nil
preserveCAP = 't
checkCAPVAL = 't
checkCAPAREA = 'nil
preserveDIO = 't
checkDIOAREA = 't
checkDIOPERI = 't
checkCAPPERI = 'nil
simPrintInhConnAttributes = 'nil
checkScale = "meter"
checkLDD = 'nil
pinMAP = 'nil
preserveBangInNetlist = 'nil
shrinkFACTOR = 0.0
globalPowerSig = ""
globalGndSig = ""
displayPININFO = 't
preserveALL = 't
setEQUIV = ""
incFILE = "$includeFile"
auCdlDefNetlistProc = "ansCdlSubcktCall"
EOF
cat /dev/null >! netlist
si -batch -command netlist
2.#auto_gds_out.csh#
#!/bin/csh
set library=$1
set topCell=$2
if( ! -d gds ) then
mkdir gds
endif
strmout \
-library $library \
-strmFile $topCell.gds \
-topCell $topCell \
-view layout \
-logFile ./gds/strmOut.log \
-outputDir ./gds
# -runDir ./gds
if($status != 0) then
echo strmout $cell.gds failed
else
echo strmout $cell.gds successfully!
endif
3.#auto_drc_flow.csh#
#!/bin/csh
set lib_lay=$1
set topCell=$2
set start=`date`
./auto_gds_out.csh $lib_lay $topCell
./drc.csh $topCell
set end=`date`
echo "drc start at $start"
echo "drc end at $end"
echo "auto drc flow successfully!"
4.#drc.csh#
#!/bin/csh
set topCell=$1
set gds_path=../gds
set drc_rule=/**********your drc rule path***********/calibre.drc
set gds=$gds_path/$topCell.gds
if( ! -d drc ) then
mkdir drc
endif
sed -e "s@topCell.gds@$gds@g" \
-e "s@topCell@$topCell@g" \
-e "s@drc_rule@$drc_rule@g" drc.rule > drc/drc.rule
cd drc
calibre -drc -hier -turbo 10 -turbo_litho -hyper -nowait drc.rule | tee drc.log
if ( -f $topCell.drc.results ) then
echo "running drc successe!"
calibre -rve $topCell.drc.results &
else
echo "! ERROR: there is no $topCell.drc.results, please check your script and gds, and try again!"
endif
5.#drc.rule#
LAYOUT PATH "topCell.gds"
LAYOUT PRIMARY "topCell"
LAYOUT SYSTEM GDSII
DRC RESULTS DATABASE "topCell.drc.results" ASCII
DRC MAXIMUM RESULTS 1000
DRC MAXIMUM VERTEX 4096
DRC CELL NAME YES CELL SPACE XFORM
DRC SUMMARY REPORT "topCell.drc.summary" REPLACE HIER
VIRTUAL CONNECT COLON NO
VIRTUAL CONNECT REPORT NO
DRC ICSTATION YES
INCLUDE "drc_rule"
6.#auro_lvs_flow.csh#
#!/bin/csh
set lib_sch=$1
set lib_lay=$2
set topCell=$3
set start=`date`
./auto_cdl_out.csh $lib_sch $topCell
./auto_gds_out.csh $lib_lay $topCell
./lvs.csh $topCell
set end=`date`
echo "lvs start at $start"
echo "lvs end at $end"
echo "auto lvs flow successfully!"
7.#lvs.csh#
#!/bin/csh
set topCell=$1
set cdl_path=../cdl
set gds_path=../gds
set lvs_rule=/**************your lvs rule path********/calibre.lvs
set cdl=$cdl_path/$topCell.cdl
set gds=$gds_path/$topCell.gds
if(! -d lvs ) then
mkdir lvs
endif
sed -e "s@topCell.gds@$gds@g" \
-e "s@topCell.cdl@$cdl@g" \
-e "s@topCell@$topCell@g" \
-e "s@lvs_rule@$lvs_rule@g" lvs.rule > lvs/lvs.rule
cd lvs
calibre -lvs -hier -spice ./$topCell.sp -turbo 10 -nowait lvs.rule | tee lvs.log
if( -f $topCell.lvs.report ) then
grep -q "INCORRECT" $topCell.lvs.report
if($?) then
echo "$topCell's lvs is correct!"
echo $topCell >> ../correct.txt
calibre -rve -lvs svdb
else
gvim $topCell.lvs.report
echo "$topCell's lvs is incorrect!"
echo $topCell >> ../incorrect.txt
endif
else
echo "! ERROR: there is no $topCell.lvs.report, please check your script, cdl and gds, and try again!"
endif
8.#lvs.rule#
LAYOUT PATH "topCell.gds"
LAYOUT PRIMARY "topCell"
LAYOUT SYSTEM GDSII
SOURCE PATH "topCell.cdl"
#SOURCE PATH "includefile"
SOURCE PRIMARY "topCell"
SOURCE SYSTEM SPICE
MASK SVDB DIRECTORY "svdb" QUERY SI
LVS REPORT "topCell.lvs.report"
LVS REPORT OPTION NONE
LVS REPORT MAXIMUM 50
LVS RECOGNIZE GATES NONE
LVS ABORT ON SOFTCHK NO
LVS ABORT ON SUPPLY ERROR NO
LVS IGNORE PORTS NO
LVS SHOW SEED PROMOTIONS NO
LVS SHOW SEED PROMOTIONS MAXIMUM 50
LVS ISOLATE SHORTS YES CELL PRIMARY && NAME "?"
VIRTUAL CONNECT COLON NO
VIRTUAL CONNECT REPORT NO
LVS EXECUTE ERC YES
ERC RESULTS DATABASE "topCell.erc.results"
ERC SUMMARY REPORT "topCell.erc.summary" REPLACE HIER
ERC CELL NAME YES CELL SPACE XFORM
ERC MAXIMUM RESULTS 1000
ERC MAXIMUM VERTEX 4096
DRC ICSTATION YES
LVS REDUCTION PRIORITY SERIES
INCLUDE "lvs_rule"
9.#cds.lib#
DEFINE lib_lay ../../ #lay_lib path#
DEFINE lib_sch ../../ #sch_lib path#
DEFINE XXXXXXX XXXXXX
10.#includefile#
.INCLUDE "/XXXX/XXXXX/XX.cdl" #cdl网表路径#
.INCLUDE "/XXXX/XXXXX/subcircuit.cdl"
/2