-
Notifications
You must be signed in to change notification settings - Fork 3
/
ViaAddition.pl
81 lines (71 loc) · 1.82 KB
/
ViaAddition.pl
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
## (c) Krishna Subramanian <https://github.com/mongrelgem>
## UART Project <https://github.com/mongrelgem/USART-RTL-Physical-Design>
## Report Bugs and Issues <https://github.com/mongrelgem/USART-RTL-Physical-Design/issues>
#!/usr/local/bin/perl
#####
print("This script file will remove nrd nrs m and OFF parameters\n");
print("from a netlist file.\n");
print("Modified by Xiangyu.\n");
#### USAGE
$num_args=$#ARGV;
if ($num_args!=1){
die ("\n%USAGE: netclean.pl <infile> <outfile>\n");
}
##### enter input file
$inputfile=@ARGV[0];
#print $inputfile;
$outputfile=@ARGV[1];
#print " $outputfile\n";
##### open input file
open(READINPUT,$inputfile) || die "Cannot open $inputfile for reading!";
##### open output file
if (-e $outputfile){
print ("Overwriting $outputfile\n");
}
else {
print("Creating $outputfile!\n");
}
open(WRITEOUTPUT,">$outputfile") || die "Cannot overwrite $outputfile!";
##### process the file
if (-e $outputfile)
{
# print("Start processing $inputfile!\n");
while(<READINPUT>)
{
#print $_;
s/VIAS 2 ;/\VIAS 5 ;
- via1
+ RECT M1 ( -70 -70 ) ( 70 70 )
+ RECT M2 ( -50 -90 ) ( 50 90 )
+ RECT V1 ( -50 -50 ) ( 50 50 )
;
- via2
+ RECT M2 ( -50 -90 ) ( 50 90 )
+ RECT M3 ( -60 -60 ) ( 60 60 )
+ RECT V2 ( -50 -50 ) ( 50 50 )
;
- via3
+ RECT M3 ( -70 -70 ) ( 70 70 )
+ RECT M4 ( -60 -60 ) ( 60 60 )
+ RECT V3 ( -50 -50 ) ( 50 50 )
;
- via4
+ RECT M4 ( -70 -70 ) ( 70 70 )
+ RECT M5 ( -60 -60 ) ( 60 60 )
+ RECT V4 ( -50 -50 ) ( 50 50 )
;
- via5
+ RECT M5 ( -70 -70 ) ( 70 70 )
+ RECT M6 ( -60 -60 ) ( 60 60 )
+ RECT V5 ( -50 -50 ) ( 50 50 )
;
/ig;
s/via1Array_0/via1/ig;
s/via1Array_2/via1/ig;
s/via1Array_1/via1/ig;
print WRITEOUTPUT $_;
}
print("Done!\n");
}
close (READINPUT);
close (WRITEOUTPUT);