+ add script for getting net length from a def file (#306)

* + add script for getting net length in a def file
+ add net length report for caravel

* regenerate reports due to bad lef path in the previous one
This commit is contained in:
Kareem Farid 2022-10-19 21:31:38 +02:00 committed by GitHub
parent f6e0e9dc87
commit 6cf92648c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5662 additions and 0 deletions

View File

@ -0,0 +1,29 @@
#!/bin/env bash
# usage get_net_length.bash merged.lef design.def wire_length.txt
set -u
{
openroad -exit -no_splash <<EOF
read_lef $1
read_def $2
variable odb_block [[[::ord::get_db] getChip] getBlock]
set odb_nets [odb::dbBlock_getNets \$::odb_block]
set fp [open "$3" w]
foreach net \$odb_nets {
set net_name [odb::dbNet_getName \$net]
set wire [odb::dbNet_getWire \$net]
if {\$wire != "NULL"} {
set wire_length [odb::dbWire_getLength \$wire]
set wire_length [expr \$wire_length / 1000.0]
puts \$fp "\$net_name \$wire_length"
}
}
close \$fp
EOF
} > $(dirname $3)/get_net_length-openroad.log
filename=$(basename $3)
filename_no_ext="${filename%%.*}"
sort_file_path="$(dirname $3)/${filename_no_ext}-sorted.txt"
cat $3 | sort -k 2 -n | column -t > $sort_file_path
echo "wrote to $sort_file_path"

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff