Hi again
Let me expand a bit further on this. Given any file that has a number of
.SUBCKT calls I am looking to do a search and replace
on the
*.pininfo line. This line may extend multiple lines which are denoted by the presence of a
+ at the start of a line.
.SUBCKT foo a b c
*.pininfo vdd:I vss:I a:I b:I c:I vddw:I vddq:O
+ vddy:I
Now, I want to first get the complete
*.pininfo line and then do a replace on certain words. Those words are of two types:
Powers which is a comma separated list held by the $runset{"POWER-NODE"}. This comma separated list first needs to to be split up, and at the end of each word get :P concatonated to it
$runset{"POWER-NODE"}="vdd,vddq,vcc"
# translates to vdd:P vddq:P vcc:P
Ground which is also a comma separated list held by the $runset{"GROUND-NODE"}. This comma separated also need to be split and concatonated with :G
$runset{"GROUND-NODE"}="vss,vsc"
# translates to vss:G vsc:G
Now using the
*.pininfo line look for the variables held by both
$runset{"POWER-NODE"} and
$runset{"GROUND-NODE"} and do a search and replace. The tricky part is dealing with the
:P/G/I/O. Effectively, we are ingnoring it during the search but replacing it after the fact.
So, given the above example you would end up with a new
*.pininfo which looks like..
.SUBCKT foo a b c
*.pininfo vdd:P vss:G a:I b:I c:I vddw:I vddq:P
+ vddy:I
Does this help?? Thanks so much