当前位置: 首页 > news >正文

pt2edi.pl

#!/usr/bin/perl -w
my $now = `date +%y_%m_%d_%Hh%Mm`;
open(FH, "<./eco_changes.tcl") or die "Cant open file $!";
open (OUT,">tempus_from_pt.tcl");
print OUT "report_resource\n";
print OUT "setEcoMode -updateTiming false\n";
print OUT "setEcoMode -refinePlace false -prefixName ECO_FIX_group5 -batchMode true -honorDontUse false -honorFixedStatus false\n";my $flag = 0;
my $hinst = "";while (<FH>) {chomp;my $line = $_;next if $line =~ /^#/;next if $line =~ /^\s*$/;if ($line =~ /^current_instance$/) {$flag = 1;$hinst = "";} elsif ($line =~ /^current_instance\s\{(\S+)\}$/) {$flag = 0;$hinst = $1;} elsif ($flag == 1 || $hinst ne "") {if ($line =~ /^insert_buffer \[get_pins \{(\S+)\}\] (\S+) -new_net_names \{(\S+)\} -new_cell_names \{(\S+)\}/) {my $term = $1;my $cell = $2;my $new_net = $3;my $new_inst = $4;if ($hinst ne "") {$term = "$hinst/$term";#$new_net = "$hinst/$new_net";#$new_inst = "$hinst/$new_inst";print OUT "ecoAddRepeater -cell $cell -term $term -name $new_inst -hinstGuide $hinst -newNetName $new_net\n";} else {print OUT "ecoAddRepeater -cell $cell -term $term -name $new_inst -newNetName $new_net\n";}} elsif ($line =~ /^size_cell\s+\{(\S+)\} \{(\S+)\}/) {my $inst = $1;my $cell = $2;if ($hinst ne "") {$inst = "$hinst/$inst";print OUT "## module: $hinst\n";print OUT "ecoChangeCell -inst $inst -cell $cell\n";} else {print OUT "ecoChangeCell -inst $inst -cell $cell\n";}} elsif ($line =~ /^insert_buffer \[get_pins \{(\S+)\}\] (\S+) -inverter_pair -new_net_names \{(\S+) (\S+)\} -new_cell_names \{(\S+) (\S+)\}/) {my $term = $1;my $cell = $2;my $new_net1 = $3;my $new_net2 = $4;my $new_inst1 = $5;my $new_inst2 = $6;if ($hinst ne "") {$term = "$hinst/$term";print OUT "ecoAddRepeater -cell $cell -term $term -name {{ $new_inst1 $new_inst2}} -hinstGuide $hinst -newNetName {{$new_net1 $new_net2}}\n";#print OUT "ecoAddRepeater -cell $cell -term $term -name $new_inst2 -hinstGuide $hinst -newNetName $new_net2\n";} else {print OUT "ecoAddRepeater -cell $cell -term $term -name {{ $new_inst1 $new_inst2}}  -newNetName {{$new_net1 $new_net2}}\n";#print OUT "ecoAddRepeater -cell $cell -term $term -name $new_inst2 -newNetName $new_net2\n";}} elsif ($line =~ /^add_buffer_on_route \[get_net -of \{(\S+)\}\] -user_specified_buffers \{ (.*)\} -no_legalize/) {my $term = $1;my $buffer_tmp = $2;$buffer_tmp =~ s/\s0//g;my @buffers = reverse split (/ /,$buffer_tmp);if ($hinst ne "") {$term = "$hinst/$term";}foreach my $b (@buffers) {push @tmp, $b;if ($b =~ /PhyEco.*/) {if ($hinst ne "") {print OUT "ecoAddRepeater -cell $tmp[2] -name $tmp[3] -net \[get_object_name \[get_net -of $term\]\] -loc $tmp[1] $tmp[0] -hinstGuide $hinst\n";} else {print OUT "ecoAddRepeater -cell $tmp[2] -name $tmp[3] -net \[get_object_name \[get_net -of $term\]\] -loc $tmp[1] $tmp[0]\n";}@tmp = qw//;}}} else {print "## exceptions: $line\n";}} else {print "## exceptions: $line\n";}
}print OUT "report_resource\n";
print OUT "setEcoMode -reset\n";
print OUT "report_resource\n";close FH;
close OUT;
http://www.jsqmd.com/news/36332/

相关文章:

  • 读书笔记:OpenPBR 规范(5)
  • 2025年玻璃钢雕塑生产厂家权威推荐榜单:玻璃钢人物雕塑/玻璃钢景观雕塑/定制玻璃钢雕塑源头厂家精选
  • 2025年孕慈安权威解析:美国PURE POLAR十一年品牌深度推荐盘点
  • 2025年新能源重卡权威解析推荐榜:盘点厂家实力与口碑前五强
  • Luogu P1121 环状最大两段子段和 题解 [ 绿 ] [ 分类讨论 ] [ 线性 DP ]
  • Archery + LDAP 一体化部署
  • 2025年热门的高尔夫观光车厂家最新权威实力榜
  • 2025年11月上海财税公司十大推荐:靠谱机构汇总与高性价比选课技巧
  • 2025.11.10
  • C++设计模式之行为型模式:迭代器模式(Iterator) - 详解
  • 2025年评价高的金钻绒厂家实力及用户口碑排行榜
  • springboot mybaits 连接多数据源
  • 写博客怕内容被偷?SSR 实现安全加密的原理讲解
  • 数据库变量使用
  • 2025年11月上海财税公司十大推荐:主流机构排行榜与高性价比选择指南
  • 2025 运维监控厂商选型全指南:选对监控工具筑牢运维根基,助力企业数字化转型
  • 逆向基础--C++ 作用域、常量、修饰符类型 (03)
  • 2025年石棉橡胶板厂家联系电话推荐:精选老牌企业速查指南
  • 2025年石棉橡胶板厂家联系电话推荐:源头工厂直联通道
  • 2025年石棉橡胶板厂家联系电话推荐:五强厂家速查指南
  • 2025年评价高的真丝绒热门厂家推荐榜单
  • 2025年比较好的镭射激光灯厂家推荐及选购参考榜
  • 2025年杭州刑事律师权威推荐榜单:劳动纠纷律师/刑事律师/离婚律师团队精选
  • 2025年11月geo优化公司推荐:知名机构排行榜与口碑评价对比指南
  • 2025年11月geo优化公司推荐:知名机构排行榜与口碑评价
  • win 端口进程管理
  • P14467 [COCI 2025/2026 #1] 扔球 / Krugomet 题解
  • 【ACM出版、EI检索稳定】2025年人工智能、业务转型和数据科学创新国际学术会议(ICBTDS 2025)
  • 2025年石棉橡胶板厂家联系电话推荐:采购避坑与售后无忧
  • MATLAB实现海浪数据处理与谱分析