#!/bin/bash # # run_caravel_lvs_3.sh --- # # Run LVS on caravel. Read GDS using the recipe developed for open_pdks. # Read I/O cells from vendor GDS first so that they get replaced. # echo ${PDK_ROOT:=/usr/share/pdk} >/dev/null echo ${PDK:=sky130A} >/dev/null echo ${CARAVEL_ROOT:=/home/tim/gits/caravel} >/dev/null echo ${LITEX_ROOT:=/home/tim/gits/caravel_mgmt_soc_litex} >/dev/null # echo "Running LVS on caravel." # if [ $# -eq 0 ]; then # echo "No arguments---running LVS on existing spice if it exists." # elif [ $1 == "extract" ]; then # echo "Forced new extraction." # rm -f $CARAVEL_ROOT/spi/lvs/caravel.spice # else # echo "Ending without running LVS." # exit 0 # fi # if [ ! -f $CARAVEL_ROOT/spi/lvs/caravel.spice ]; then magic -dnull -noconsole -rcfile $PDK_ROOT/$PDK/libs.tech/magic/$PDK.magicrc <netgenD.tcl <= 0) && ([lsearch \$cells1 \$cellname] < 0)} { equate classes "\$circuit1 \$cell" "\$circuit2 \$cellname" puts stdout "Matching pins of \$cell in circuit 1 and \$cellname in circuit 2" equate pins "\$circuit1 \$cell" "\$circuit2 \$cellname" } } # Ignore fill cells in standard cell sets that have two-letter prefixes. if {[regexp {.._sky130_fd_sc_[^_]+__fill_[[:digit:]]+} \$cell match]} { ignore class "\$circuit1 \$cell" } } # Run LVS flatten class "\$circuit2 user_project_wrapper" flatten class "\$circuit2 manual_power_connections" flatten class "\$circuit2 empty_macro" lvs "\$circuit1 caravel" "\$circuit2 caravel" $PDK_ROOT/$PDK/libs.tech/netgen/${PDK}_setup.tcl caravel_3_comp.out -json EOF export NETGEN_COLUMNS=90 export MAGIC_EXT_USE_GDS=1 netgen -batch source netgenD.tcl 2>&1 | tee caravel_3_lvs.log rm netgenD.tcl exit 0