-
Notifications
You must be signed in to change notification settings - Fork 3
/
check_extraction
executable file
·58 lines (49 loc) · 1.72 KB
/
check_extraction
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#! /usr/bin/env bash
# check_extraction: checks all the ext files in the directory specified for merge shorts.
# Copyright 2022 D. Mitch Bailey cvc at shuharisystem dot com
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
echo "Merge shorts: shorts between ports that do not appear in the extraction report."
for ext_path in $1/*.ext*; do
ext_file=${ext_path##*/}
ext_cell=${ext_file%%.ext*}
if [[ ${ext_file##*.} == "gz" ]]; then
CAT=zcat
else
CAT=cat
fi
$CAT $ext_path |
awk -v CELL=$ext_cell -f $LVS_ROOT/scripts/merge_short.awk
done
zgrep -c ^port $1/*.ext* |
grep ':0$' |
sed -e 's,.*/,,' -e 's/.ext:.*//' |
sort > $1/../noport.subckt
awk '/^.subckt/ {print $2}' $1/*.gds.spice |
sort > $1/../layout.subckt
zegrep -c '^device' $1/*.ext* |
grep -v ':0$' |
sed -e 's,.*/,,' -e 's/.ext:.*//' |
sort > $1/../device.subckt
zegrep -c '^use' $1/*.ext* |
grep ':0$' |
sed -e 's,.*/,,' -e 's/.ext:.*//' |
sort |
comm -12 - $1/../device.subckt > $1/../leaf.subckt
echo "
Leaf cells without explict ports"
comm -12 $1/../noport.subckt $1/../layout.subckt |
comm -12 - $1/../leaf.subckt
echo "
Non-leaf cells without explict ports"
comm -12 $1/../noport.subckt $1/../layout.subckt |
comm -23 - $1/../leaf.subckt