Rhodium has asked for the wisdom of the Perl Monks concerning the following question:
Here is the variables.SUBCKT testblock a b c vdd vcc vss vssa *.PININFO a:I b:I c:I vdd:I vcc:I + vss:G vssa:I RR0 a vss 9.99967K $[PO] XI48 a b c vdd vcc vss vssa / test2block .ENDS
Now here is what I need for an output$runset{"POWER-NODE"}="vdd,vdda,vddb" $runset{"GROUND-NODE"}="vssa"
Here is my code thus far...SUBCKT testblock a b c vdd vcc vss vssa *.PININFO a:I b:I c:I vdd:P vcc:I + vss:I vssa:G RR0 a vss 9.99967K $[PO] XI48 a b c vdd vcc vss vssa / cd_acore_porbuf .ENDS
Am I approaching this correctly.. Can someone help me out.. PLEASE:)while($line = shift @netlist){ chomp $line; if($line =~ ".SUBCKT $runset{SchCell}"{ #OK, where in the right area.. print NET_N "$line\n"; $line = shift @netlist; # Get the next line chomp $line; while($line !~ ".ENDS"){ # If we are at the END stop.. for ($line) { if (($line =~ "*.pininfo") { # Ok I'm here.. Now how do I get this line any other lines # denoted by the "+" into an array } # Now how do I do the search and replace.. for each of the pwrs # and grounds.. } } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Search and replace.. ..a bit different
by VSarkiss (Monsignor) on Apr 10, 2002 at 20:02 UTC | |
|
Re: Search and replace.. ..a bit different
by tadman (Prior) on Apr 10, 2002 at 19:58 UTC | |
|
Re: Search and replace.. ..a bit different
by mrbbking (Hermit) on Apr 10, 2002 at 20:35 UTC | |
|
Re: Search and replace.. ..a bit different
by Rhodium (Scribe) on Apr 10, 2002 at 23:19 UTC | |
|
Re: Search and replace.. ..a bit different
by Rhodium (Scribe) on Apr 10, 2002 at 19:49 UTC |