本文目的在于将工艺厂提供标准单元库的cdl网表转成对应的原理图。通常cdl网表中器件参数如下。如果直接使用原始网表,转成原理图后器件的symbol参数和器件的属性参数不对应。因此需要使用程序在原始网表后面添加一项参数fw,添加后的网表如下。
MM41 net115 xo net78 VPW N15LL W=200.00n L=130.00n(原始参数)
MM41 net115 xo net78 VPW N15LL W=200.00n L=130.00n fw=200.00n(添加后)
需要将整个原始的cdl网表都做转换,新建个空白文件,命名change_cdl,转换程序如下:
%%工艺厂提供的标准单元库中,电源和地使用了全局变量使用程序如下
$read_in = "./origin.cdl"; #原始网表
$write_out = "./output.cdl"; #生成网表
open (IN, "< $read_in") or die "Can't open original file: $!\n";
open (OUT, "> $write_out") or die "Can't open output file: $!\n";
while (<IN>) {
if (/^\.subckt/) {
chomp;
$_ .= " VDD VSS"; #VDD和VSS为电源和地名
print OUT "$_\n";}
elsif (/^M.*W=(\S+)/) { chomp;
$_ .= " fw=$1";
print OUT "$_\n";
}
else {
print OUT $_;
}
}
close IN;
close OUT;
open (TEST, "<$write_out") or die "can not open the file: $!\n";
while ( <TEST> ) {
print;
}
close TEST;
%%工艺厂提供的标准单元库中,电源和地没有使用了全局变量使用程序如下
$read_in = "./origin.cdl"; #原始网表
$write_out = "./output.cdl"; #生成网表
open (IN, "< $read_in") or die "Can't open original file: $!\n";
open (OUT, "> $write_out") or die "Can't open output file: $!\n";
while (<IN>) {
if (/^\.subckt/) {
chomp;
}
elsif (/^M.*W=(\S+)/) { chomp;
$_ .= " fw=$1";
print OUT "$_\n";
}
else {
print OUT $_;
}
}
close IN;
close OUT;
open (TEST, "<$write_out") or die "can not open the file: $!\n";
while ( <TEST> ) {
print;
}
close TEST;