Thank Klaus and special thanks to ThisIsNotSam.
I coded a small script for my issue:
Code:
#!/bin/bash
cell=$1
pin=$2
netlist=$3
outputs='Q Z ZN Y'
echo "All logica drivers of pin "$pin" of standard cell "$cell" in the netlist "$netlist":"
lnets=`cat $netlist | grep " $cell" | sed 's/.*'$pin'(//' | sed 's/).*//'`
for n in $lnets
do
n_mod=$(echo $n | sed 's/\[/\\[/' | sed 's/\]/\\]/')
IFS=$'\n'
for lp in `cat $netlist | grep "(" | grep "$n_mod"`
do
p=`echo $lp | sed 's/('"$n_mod"'.*//' | sed 's/.*\.//'`
if [[ $outputs == *"$p"* ]];then
echo "`echo $lp | awk '{print $2}'`"
fi
done
done
#usage: ./get_logicaldriver.bash NAND2X1AD A netlist.v
I tested with netlist here:
http://www.vlsiip.com/asic_dictionary/N/download/counter.v
But I have some confuse in question "Given a netlist, write a code/pseudo code for finding all the logical drivers of a pin of any standard cell in the netlist",
any standard cell here is lib cell (I coded for this case) or instance name in netlist?
who can advise whether I misunderstood?
Thanks