1 介绍
1.1 概述
Gates On the Fly, GOF, 提供完整的门电路网表解决方案,以适应各样的网表ECO和网表分析测试状况。功能包括:
- 完整的网表ECO解决方案
- 完全的互动图形电路功能
- 网表功能检查
- 灵活的网表数据库报告
- 开扩展的脚本接口
1.2 网表ECO解决方案
Gates On the Fly实现多种先进的ECO方法。不同的网表ECO在网表大小和复杂程度变化很大,不同公司的设计流程也大不一样。Gates On the Fly可让用户根据网表改动大小和复杂程度,灵活地选择一种或多种ECO方法。
- 自动和手动模式ECO的选择
- 脚本和图形模式ECO的选择
- 只做金属层和所有层ECO的选择
- Functional ECO和Timing ECO的选择
自动ECO模式是由GofCall脚本的'fix_modules' API和'fix_logic' API实现。GofCall脚本是跟Perl脚本语法兼容的,后面篇幅会详细介绍GofCall脚本。自动ECO流程需要两个网表文件,Implementation Netlist和Reference Netlist,Implementation Netlist是要做ECO的网表,Reference Netlist是改动过的RTL经过重新综合的参考网表,综合时的constraints设置应和pre-layout网表一样。用户把改动过的模块(Module)名字传给'fix_modules' API . GOF用内置的逻辑等价检测工具分析指定的模块逻辑,发现不等价的逻辑点,产生电路补丁去修复那些模块。最终产生的补丁是最优化的电路具有最小的门数,打上补丁的Implementation Netlist和Reference Netlist达到逻辑等价。使用'map_spare_cells' API可让电路补丁转换成只有spare-type的门或是物理存在的spare instances,以用于只做金属层的ECO。
Timing ECO也可用自动模式完成,Primetime timing报告文件必须要产生,并读入。
手工模式是由GofCall脚本提供的API实现。当用户知道ECO需要怎么改动网表,ECO的规模较小,或者改动是重复性工作,象是加反向器到很宽的总线上,手工模式就是很好的选择。因为手工模式更加高效,速度更快,因为不需做综合,而且最后动到的门电路比自动模式更小。进一步来说,自动模式和手工模式可穿插在同一个GofCall脚本当中。
电路原理图上直接ECO也应算是手工模式,其实现ECO规模更小,象是添加一个或两个门,或是改变几条连线。后面图形模式会详细介绍。
当自动或手工ECO模式完成时,需要运行'map_spare_cells' API把所有新加的门转换成spare-type的门或物理存在的spare instances。如果在手工模式中,用户已经全部使用了spare-type的门或物理存在的spare instances,这个转换过程就可跳过。
- 分层网表(Hierarchical Netlist)ECO
GOF通过指定模块来设定ECO的范围。一些逻辑等价分析例子只能在扁平化模式中得到等价结果。因为GOF只在用户指定的模块或逻辑点上做ECO,就可避免不应修理的逻辑。
GOF的Timing ECO提供分析和GUI修理功能。GOF读入Primetime报告文件,列出 Violations的总结报告。用户可以把一个路径上的所有Instances和连接显示在Schematic上,Instances和连接可被任意选中,并显示在LayoutViewer上。用户根据报告的数据和LayoutViewer的结果来修理别的自动修理工具,如Primetime,无法修理的最后剩下的路径。
图形模式的优点是快速上手,非常适用于小规模的ECO。增量电路原理图或叫互动电路原理图对分析电路非常有用,用户可在原理图上看出下一步的行动。
增量电路原理图可以很迅速地找到逻辑问题点,GOF还有很多API的接口可以快速查找网表数据库。
在手册第二部分,列出八种ECO流程以应付不同的ECO情形,在第三部分,给出一个ECO指导,用于选择不同的ECO流程。
1.3 下载和安装GOF
Gates On the Fly软件下载可到这个网页
http://www.nandigits.com/download.htm
支持三种操作系统,MS-Windows, Linux 32bits和Linux 64bits OS。下载合适的软件后,反压缩到一个目录中,就可使用。把安装的目录设置在寻找路径中。
set path = ( 'the_install_path/GOF64/bin', $path)
若需试用License,请EMAIL support@nandigits.com,没有License时,网表的大小限制是4M BYTES。
2 网表ECO流程分类
2.1 自动全部层ECO流程
2.1.1 概况
全部层functional ECO可以自由地加或减门。ECO操作用GofCall脚本实现,GofCall脚本是与Perl语法完全兼容的,脚本调用内部API去使用网表数据库,并修改网表。GOF需要读入两个网表文件,第一个网表是Implementation Netlist,ECO要在这个网表上完成,第二个网表是Reference Netlist,这是改动过的RTL经过重新综合产生的参考网表。综合时要注意,尽量用跟pre-layout网表一样的Constraint文件。在GofCall脚本中,把修改过的模块名字输入到'fix_modules' API的参数中。GOF用内置逻辑等价检查工具分析并找出每个模块中不等价的逻辑点,然后产生优化的最小的电路补丁。这个电路补丁被整合在Implementation Netlist中,使得每个修改过的模块和对应的在Reference Netlist中的模块等价。
图1显示两个逻辑锥,一个从Implementation Netlist来,另一个从Reference Netlist来。它们的输出点不等价。GOF会比较两个逻辑锥,找出最小的改动,修理Implementation逻辑锥。修改后这两个就等价了。

图1逻辑锥优化
GOF对每个模块的每个不等价点的逻辑锥进行分析优化,产生最小的电路补丁用于修理这些不等价点。不等价点是以输出端口,或时序单元的输入端,(如寄存器的'D'端口),或时序单元的Instance名字。实际上可以直接指明要修理的不等价点,这可以节省时间和避免多余的修理。这个流程可以'fix_logic' API来实现。
图2显示的是这个流程的图解。

图2 自动功能性ECO流程
2.1.2 文件及数据要求
用户提供:
- Standard library (Synopsys Liberty)文件,以'.lib'为后缀
- Verilog库文件,以支持'.lib'文件没有覆盖到的库元件
- Implementation Netlist,要在这网表上做ECO
- Reference Netlist,重新综合过的网表,跟Pre-layout网表一样的constraints
- 修改过的模块(Module)名字
2.1.3 自动功能性ECO的步骤
典型的自动功能性ECO步骤:
- 修改RTL模块"module_A", "module_B" and "module_C"
- 综合修改过的RTL得到Reference Netlist
- 产生GofCall ECO脚本:
- 在'setup_eco'中指明ECO名字
- 加载Standard Cell libraries和Verilog libraries
- 读入Reference Netlist和Implementation Netlist
- 把修改的模块名字加入API,'fix_modules("module_A", "module_B", "module_C");'
- 报告ECO状况,写出ECO结果
- 运行上述脚本
2.1.4 自动功能性ECO GofCall脚本样本
GofCall脚本的语法和Perl脚本完全兼容,而且GofCall可调用内部API,使用网表数据库并修改网表。
下面是功能性ECO的脚本样本:
# GofCall ECO script, run_example.pl
use strict;
undo_eco;# Discard previous ECO operations
setup_eco("eco_example");# Setup ECO name
read_library("art.90nm.lib");# Read in standard library
read_library("mot_sensor.v");# Read in verilog library, since there is no .lib file for 'mot_sensor'
read_design("-ref", "reference.gv");# Read in the Reference Netlist
read_design("-imp", "implementation.gv");# Read in the implementation Netlist Which is under ECO
fix_modules("module_A", "module_B", "module_C");# Specify the modules that have been modified
set_top("topmod");# Set the top module
report_eco();# ECO report
check_design("-eco");# Check if the ECO causes any issue, like floating
write_verilog("eco_verilog.v");# Write out ECO result in Verilog
write_soce("eco_soce.tcl");# Write out TCL script for SOC Encounter
exit;# Exit when the ECO is done, comment it out to go to interactive mode when ’GOF >’ appears
2.1.5 运行和调试
在命令行中,用‘-run’选项来执行GofCall脚本:
gof -run run_example.pl
具体情况,参考运行和调试GofCall脚本一节
2.1.6 专用逻辑等价检查工具
内置的逻辑等价检查工具是专门用于查找Implementation Netlist中与Reference Netlist等价的信号。这些等价信号用于优化电路补丁。查找等价信号是全局性的,很可能一个模块中的信号会在另一个模块中找到。

图3专用的逻辑等价检查工具
对于每一个Reference逻辑锥中的信号,找到对应的在Implementation逻辑锥中的等价的信号。实际上,用户可直接检查指明的两信号在Reference和Implementation Netlist中是不是等价。这个过程可用API 'comare_nets'来实现。
compare_nets API:
检查在Reference和Implementation Netlist中的两信号是否等价
Usage: my $result = compare_net($net0, $net1);
$net0: The net in Reference Netlist.
$net1: The net in Implementation Netlist.
$result: If 1, they are equal, if 0, they are not equal.
Examples:
# Compare reg1/D in Reference and reg1/D in Implementation Netlist
compare_nets("reg1/D", "reg1/D");
因为逻辑等价检查工具会比较所有的逻辑锥中的信号,这让调试逻辑不等价点变得非常容易。具体信息可参考图型模式两信号逻辑等价检查。
2.1.7 分层网表的多模块ECO
在分层网表(Hierarchical Netlist)中,把所有不等价模块名字加入到'fix_modules'的参数中。任何跨越边界的改动,应把子模块和母模块都加到'fix_modules'的参数中。GOF照顺序修理各个指明的模块。
比如说,母模块'top'有子模块'smod','smod'里有寄存器'state_reg_0_'改动了,并且还增加了输入端口'in0'.可用以下命令修理两模块
fix_modules("smod", "top");
GOF先修理模块'smod',加上输入端口'in0',再修理寄存器'state_reg_0_'的逻辑锥。然后,修理模块'top',接上子模块'smod'的输入端口'in0'的驱动网络。
调整参数次序,如以上命令变成fix_modules("top", "smod")会对结果有稍微影响,当然修改过的网表跟Reference Netlist是等价的。

图4跨越多模块ECO
# GofCall ECO script, run_hier_example.pl
use strict;
undo_eco;# Discard previous ECO operations
setup_eco("eco_hier_example");# Setup ECO name
read_library("art.90nm.lib");# Read in standard library
read_design("-ref", "reference.gv");# Read in the Reference Netlist
# Read in the implementation netlist which is under ECO
read_design("-imp", "implementation.gv");
fix_modules("smod", "top");
set_top('top');# Set the scope top module
report_eco(); # ECO report
check_design("-eco");# Check if the ECO causes any issue, like floating
write_verilog("eco_verilog.v");# Write out ECO result in Verilog
write_soce("eco_soce.tcl");# Write out TCL script for SOC Encounter
2.1.8 Uniquified modules
如果一个模块有多个Instances,综合中uniquify命令使每个Instance有一个唯一的模块新名字,名字一般是'_'加上一些数字。用户可用'get_modules' API把所有的uniquified模块找到,在'get_modules'参数中使用通配符'*'。
# GofCall ECO script, run_hier_example.pl
use strict;
undo_eco;# Discard previous ECO operations
setup_eco("eco_hier_example");# Setup ECO name
read_library("art.90nm.lib");# Read in standard library
read_design("-ref", "reference.gv");# Read in the Reference Netlist
# Read in the implementation netlist which is under ECO
read_design("-imp", "implementation.gv");
set_top('top');
my @tx_mods = get_modules("tx_controller*", "-hier");
my @rx_mods = get_modules("rx_controller*", "-hier");
fix_modules(@tx_mods, @rx_mods);
set_top('top');# Set the scope top module
report_eco();# ECO report
check_design("-eco");# Check if the ECO causes any issue, like floating
write_verilog("eco_verilog.v");# Write out ECO result in Verilog
2.1.9 局部参考网表
2.1.9.1 两步骤ECO
在一些大的设计中,完整的综合可能要用很长时间。为了加快ECO进度,只做部分有ECO改动的模块的综合,以这个部分综合的网表当Reference Netlist。但是这个局部参考网表不能直接用于post-layout Implementation Netlist的ECO。因为post-layout网表可能有边界优化,而局部网表跟post-layout网表对比时,无法检测准确的边界优化。在这种情况下,就可使用两步骤ECO。
·第一步,用局部参考网表修理pre-layout网表,写出ECO网表当做新的完整Reference Netlist,这一步需要用'set_mod2mod'来达到模块映射。
·第二步,新的完整Reference Netlist被用于修理Implementation Netlist。
2.1.9.2 第一步,用局部网表修理pre-layout网表
脚本例子:
# eco_step1.pl
read_library("art.90nm.lib");# Read in standard library
read_design("-ref", "partial_reference.gv");# Read in the partial Reference Netlist
# Read in the pre-layout reference netlist under ECO
read_design("-imp", "pre_layout.gv");
# Map 'smod' in partial netlist to 'smod' in the full netlist under ECO
set_mod2mod("smod", "smod");
set_top("smod");
fix_modules("smoda", "smodb", "smod");
set_top("top");
check_design("-eco");# Check if the ECO causes any issue, like floating
write_verilog("new_reference.gv");
exit;
2.1.9.3 第二步,用新的Reference Netlist修理Implementation Netlist
脚本例子:
# eco_step2.pl
read_library("art.90nm.lib");# Read in standard library
read_design("-ref", "new_reference.gv");# Read in the partial Reference Netlist
# Read in the implementation netlist under ECO
read_design("-imp", "implementaion.gv");
fix_modules("smoda", "smodb", "smod");
set_top("top");
check_design("-eco");# Check if the ECO causes any issue, like floating
write_verilog("eco_implementation.gv");
exit;
2.1.9.4 运行两步骤ECO
GOF要运行以上两个脚本,得到最后的ECO网表"eco_implementation.gv"
gof -run eco_step1.pl
gof -run eco_step2.pl
2.1.10 连接新寄存器的DFT链
在ECO中若有新的寄存器,它们需要加入到DFT链中。这个过程可由'stitch_scan_chain' API自动实现。
例如,若一个ECO产生了八个新的寄存器'state_new_reg_0'到'state_new_reg_7',要把它们加入到已存在的寄存器'pulse_reg'之前
stitch_scan_chain('-to', 'pulse_reg');
DFT链也可用change_pin API手工连上。
2.1.11 扁平化有寄存器的模块
如果Reference Netlist有一个module/instance分层(hierarchy)不在Implementation Netlist中,当这个模块全部由组合逻辑组成,没有时序逻辑(寄存器),GOF会自动把模块扁平化。如果这模块有寄存器在里边,GOF会报错:
ERROR! (E-067B) Sequential instance 'instance_name' doesn't exist in module 'module_name' in IMP
在这种情况下,应运行'flatten_modules' API来强制扁平化那个模块。但是,我们高度建议,RTL和constraints文件操作上,应注意保持Reference Netlist和Implementation Netlist有一样的分层(Hierarchy)。当扁平化一个大模块时,ECO质量会降低,很多的多余的门会在ECO里产生。
扁平化一些模块的例子:
# GofCall ECO script, run_flatten_module_example.pl
use strict;
undo_eco;# Discard previous ECO operations
setup_eco("eco_hier_example");# Setup ECO name
read_library("art.90nm.lib");# Read in standard library
read_design("-ref", "reference.gv");# Read in the Reference Netlist
# Read in the implementation netlist which is under ECO
read_design("-imp", "implementation.gv");
flatten_modules("syn_macro", "retime", "retime_2");
fix_modules("smod", "top");
set_top('top');# Set the scope top module
report_eco();# ECO report
check_design("-eco");# Check if the ECO causes any issue, like floating
write_verilog("eco_verilog.v");# Write out ECO result in Verilog
write_soce("eco_soce.tcl");# Write out TCL script for SOC Encounter
2.1.12 加入一个新模块
上一节提到的模块也可以不扁平化,而是整个模块保持分层结构(Hierarchy)加入到ECO网表中。这流程需要把那个新模块和它的子模块写出到一个文件中,再用read_library与'-vmicro'选项加载,GOF会以Leaf元件方式处理这个模块。
加入新模块的例子:
# GofCall ECO script, run_new_module_example.pl
use strict;
undo_eco;# Discard previous ECO operations
setup_eco("eco_hier_example");# Setup ECO name
read_library("art.90nm.lib");# Read in standard library
read_library("-vmicro", "syn_macro.v");
read_design("-ref", "reference.gv");# Read in the Reference Netlist
# Read in the implementation netlist which is under ECO
read_design("-imp", "implementation.gv");
fix_modules("smod", "top");
set_top('top');# Set the scope top module
report_eco();# ECO report
check_design("-eco");# Check if the ECO causes any issue, like floating
write_verilog("eco_verilog.v");# Write out ECO result in Verilog
write_soce("eco_soce.tcl");# Write out TCL script for SOC Encounter
syn_macro.v的内容会整个写入ECO文件eco_verilog.v中,对应的Instance也会加入到ECO文件中,管脚信号照Reference Netlist连接。
2.1.13 修改RTL和重新综合的注意事项
当修改RTL并重新综合时,要小心尽量维持Reference Netlist和Implementation Netlist的相似性。
2.1.13.1 保持时序信号名字
这里的时序信号是指会在综合中生成寄存器的信号,在RTL中,它们以'reg'形态存在。在RTL改动中,一个很普遍的问题是把时序信号名字改动了,重新综合后,它们会产生一个新的寄存器在Reference Netlist中,这样就导致ECO增加不必要的寄存器。例如:
always @(posedge clk) abc <= abc_next;
综合上面语句时,会产生一个寄存器Instance 'abc_reg'。如果RTL改动了时序信号'abc' ,使之有了一新名字'abc_new'
always @(posedge clk) abc_new <= abc_next;
在综合后,会产生一个新的寄存器instance 'abc_new_reg',这样就导致ECO结果有多余的新的寄存器,'abc_new_reg',它本来就是'abc_reg',在Implementation Netlist中已经存在。
所以,为避免多余的寄存器产生,我们高度建议保持时序信号的名字。要注意的是,以'reg'形态存在的信号不一定是时序信号,综合后,它们可能是由组合逻辑驱动。例如:下面的abc_sig是组合逻辑驱动的,所以在RTL中,这名字可以改动。
always @(*) abc_sig = abc_con & abc_en;
2.1.13.2 使用相同的综合constraints
当重新综合产生Reference Netlist时,应当使用和Implementation Netlist一样的constraints.如Reference Netlist有不在Implementation Netlist中的层次,可在综合中使用扁平化命令,使得两个网表有相同的层次。若不得不在GofCall脚本中使用扁平化API,ECO结果可能不是最优化的。
2.1.14 ECO之后检查设计
我们高度建议在ECO之后执行'check_design',为加快速度,用户可以用'-eco'选项。
check_design('-eco')
这命令可以发现悬空信号或多重启动问题。
2.1.15 在 fix_modules'中排除修理点
在fix_modules中,有些逻辑点不需要修理,例如,与测试有关的输入管脚和输出端口。用户可以用'-exclude'选项来排除这些逻辑点。
例如,下面的模块中,与测试有关的逻辑点有,输出端口'scan_out_123'和'scan_out_456',子模块Instance u_subabc的输入管脚'scan_en_0', 'scan_en_1'和'scan_in_123'。
module abc(scan_en, scan_in, scan_out_123,scan_out_456, in0, out0…);
input scan_en, scan_in, scan_out _123, scan_out_456;
input [7:0] in0;
output [7:0] out0;
wire scan_en_0_buf, scan_en_1_buf, scan_in_123_buf;
…
Subabc u_subabc(.scan_en_0(scan_en_0_buf), .scan_en_1(scan_en_1_buf),
.scan_in_123(scan_in_123_buf),
…);
…
endmodule
用户可以用'-exclude'选项把它们排除在修理以外
fix_modules('abc', '-exclude', 'scan_out_*,scan_in_*,scan_en_*');
注意,不需要指明'scan_in_*'和'scan_en_*'的路径。
2.1.16 处理ECO之后的悬空问题
在ECO之后,'check_design'应该执行,以发现悬空的问题,产生悬空的原因有:
- 忘了把模块名字加入到'fix_modules'参数中
- 一些Instances没有库文件支持
- 后端软件克隆了输入端,把原来的端口悬空不用
对于#1,把忘加的模块名字加入到'fix_modules'参数就可简单地解决问题。
对于#2,把该加载的库文件加入到'read_library'参数中即可简单地解决问题。
对于#3,把有悬空信号的模块名字加入到'fix_modules'参数应可解决问题。如果悬空信号的驱动逻辑锥在RTL中没有改动,另一解决办法是在'fix_modules' API中使用'-exclude'选项,'-exclude'的参数是悬空信号的FANOUT逻辑终点。
fix_modules('abc_mod', '-exclude', "state_reg_0/D,state_reg_1/D,scan_out*");
2.1.17 'fix_modules' API和'fix_logic'API的区别
'fix_modules' API用模块名字当做参数。GOF找出模块中的不等价逻辑,加以修改。但是在'fix_logic' API中用户需要指明具体的需要修改的逻辑点,这些逻辑点可以是,输出端口,寄存器Instance,寄存器的输入管脚,分层Instance的输入管脚,或黑箱子的输入管脚。
很明显,'fix_logic'要比'fix_modules'快速。如果用户知道有哪些逻辑点需要修改,这些逻辑点就可被直接加入到'fix_logic'的参数中,这样ECO速度就可大大加快。
例如,
fix_modules("abc_mod")
以上命令是要修理模块'abc_mod'中被修改过的逻辑。如果用户知道改动过逻辑只影响到这些逻辑点,输出端口'lms_working',寄存器'sm_state_reg_0'和'sm_state_reg_1'。这命令将可用'fix_logic'代替,
fix_logic("lms_working", "sm_state_reg_0", "sm_state_reg_1")
注意,'fix_logic'应当和'set_top' API成对使用,
set_top("abc_mod");
fix_logic("lms_working", "sm_state_reg_0", "sm_state_reg_1");
另一注意点,逻辑点以寄存器Instance名字列出时,实际上,GOF会修理寄存器所有数据输入管脚的逻辑锥。
2.2 自动只做金属层ECO流程
2.2.1 概述
在只做金属层ECO中,后端设计流程已走完排位和布线,所以所有硅层已不能动了。ECO中任何新加的门应该映射到物理存在的spare Instance。
流程示意图如下:

图5只做金属层ECO流程
该流程可用GOF内部综合引擎或外部综合引擎来把补丁逻辑映射到全部由spare-type的门组成的电路。流程需要至少这两种spare-type的门元件组合:
·两输入端的'and/or'门和'inv'门,'mux'可选
·两输入端的'nand/nor'门和'inv'门,'mux'可选
流程还需要读入一个设计交换格式(Design Exchange Format)文件,用于映射新加的门到最近的物理上存在的spare instances。如果DEF文件缺失,GOF会被把新加的门映射到spare-type的门元件,而不是物理上存在的spare Instances。用户要用后端软件像是SOC Encounter把这些spare-type的门映射到最近的spare instances。
在'fix_modules'命令中,GOF分析参数中的模块,发现不等价逻辑点,优化补丁逻辑锥得到最小的补丁电路。
该流程也可使用外部综合工具,外部工具的执行命令要加在寻找路径当中。支持的外部综合工具包括Synopsys的Design Compiler和Cadence的RTL Compiler
当设置为使用外部综合工具时,GOF把补丁写到Verilog文件中,另外写出一个TCL脚本用于综合。TCL脚本是用于给综合工具设限,使得补丁电路的元件都是spare-type的门。外部综合工具需要映射前的Verilog补丁文件和TCL脚本作为输入,写出最终的补丁Verilog文件只有spare-type的门元件。
当只有spare-type的补丁文件产生后,用户可以在'map_spare_cells'API中用'-pause'选项来暂停流程。用户检查由综合工具产生的补丁,手工修改或微调Constraint文件不断综合直到补丁达到要求为止。再按'n'键继续。
GOF读回只有spare-type的补丁文件,补进Implementation Netlist的电路中,使之与Reference Netlist逻辑等价。
当ECO完成后,可以写出一个ECO结果报告,也可写出ECO网表和后端软件ECO脚本供后端软件和Formal软件使用。
2.2.2 文件和数据要求
- Standard library (Synopsys Liberty)文件,以'.lib'为后缀
- 别的Verilog库文件,以支持'.lib'文件没法覆盖的元件
- Implementation Netlist,需要ECO的网表
- Reference Netlist,重新综合过的网表
- DEF (Design Exchange Format)文件,这文件可选。如果不读入这文件,GOF不会把spare-type的门映射到物理上存在的spare门
- Spare门的样式(pattern),这是以'hierarchical_instance/leaf_instance'形式。它可以有通配符'*'匹配所有的在Implementation Netlist中的spare门。这一步可不做,可直接做第七步。
- 当第六步不做时,可做这一步。读入Spare门列表文件。如果几个用户在同一个Implementation Netlist做ECO,起初的Spare门列表文件产生一次,以后每一次ECO都必须更新Spare门列表文件。
- 修改过的模块名字。
2.2.3 自动只做金属层ECO步骤
典型的自动只做金属层ECO步骤:
- 修改RTL模块
- 综合修改过的RTL得到Reference Netlist
- 产生GofCall ECO脚本:
- 在'setup_eco'中指明ECO名字
- 加载Standard Cell libraries和Verilog libraries
- 读入Reference Netlist和Implementation Netlist.
- 把修改的模块名字加入'fix_moules' API
- 读入DEF文件,可选
- 读入LEF文件,可选。在看芯片布局图时有用
- 产生spare门列表文件,可由spare门模板产生或直接读入spare门列表文件
- 运行'map_spare_cells'把补丁映射的最近的物理存在的spare Instances
- 报告ECO状况,写出ECO结果
- 运行以上产生的脚本
2.2.4 只做金属层ECO的GofCall脚本例子
GofCall脚本的语法和Perl脚本完全兼容,而且GofCall可调用内部API,使用网表数据库并修改网表。
以下是自动只做金属层ECO的例子:
# GofCall ECO script, run_metal_only_example.pl
use strict;
undo_eco;# Discard previous ECO operations
# Setup ECO name
setup_eco("eco_metalonly_example " );
read_library("art.90nm.lib");# Read in standard library
read_design("-ref", "reference.gv");# Read in the Reference Netlist
read_design("-imp", "implementation.gv");# Read in the implementation Netlist Which is under ECO
fix_modules("topmod");
set_top("topmod");# Set the top module that ECO is working on
# The following is metal ECO related
read_def("topmod.def");# Read Design Exchange Format file, optional
# Specify spare cell pattern, when 'map_spare_cells' is done, a new spare list file will be written out
# with updated spare list.
get_spare_cells("*/*_SPARE*");
# Comment the above line and use the following line to use spare list file
# if the spare list file has been generated already and gone through other ECOs
# get_spare_cells("-file", "spare_list_file.txt");
map_spare_cells();
# Use one of the following lines if external Synthesis Tool is used
#map_spare_cells ( "-syn", "rc" );
#map_spare_cells ( "-syn", "dc_shell" );
report_eco(); # ECO report
check_design("-eco");# Check if the ECO causes any issue, like floating
write_verilog("eco_verilog.v");# Write out ECO result in Verilog
write_soce("eco_soce.tcl");# Write out TCL script for SOC Encounter
exit;# Exit when the ECO is done, comment it out to go to interactive mode when ’GOF >’ appears
2.2.5 运行和调试
GofCall脚本可以'-run'选项来运行:
gof -run run_metal_only_example.pl
用户可加入'die'语句,以让GOF停在某个地方,使之处于互动状态,当‘GOF >’出现时,用户可运行内部API,比如进入图形模式的命令,'start_gui'。
参考运行和调试GofCall脚本一节
2.2.6 自动只做金属层ECO的Gated-clock因素
如果自动只做金属层ECO中牵涉到了新的Gated-clock元件,然而spare门列表中并没有Gated-clock元件,则必须使用"convert_gated_clocks" API去把Gated-clock转换成'MUX'形式的逻辑。然后用'map_spare_cells' API把'MUX'形式的逻辑转换成spare-type的门元件,最后映射的物理上存在的spare instances。
get_spare_cells("*/*_SPARE*");
convert_gated_clocks();
map_spare_cells();
2.3 Timing ECO流程
2.3.1 概况
GOF的Timing ECO提供分析和GUI修理功能。GOF读入Prime-time报告文件,列出 Violations的总结报告。用户可以把一个路径上的所有Instances和连接显示在Schematic上,Instances和连接可被任意选中,并显示在LayoutViewer上。用户根据报告的数据和LayoutViewer的结果来修理别的自动修理工具,如Prime-time,无法修理的最后剩下的路径。
2.3.2 文件及数据要求
- Standard library (Synopsys Liberty)文件,以'.lib'为后缀
- 另外Verilog库文件,以支持'.lib'文件没有覆盖到的库元件
- Implementation Netlist
- DEF 文件
- LEF 文件
- Prime-time setup timing violation报告文件
2.3.3 步骤
2.3.3.1 读进设计文件
用命令行读进库文件和Netlist
gof -lib tsmc_std.lib -lef tsmc_std.lef -def top.def top.v
GofViewer 窗口会显示出来
2.3.3.2 读进Prime-time报告文件
用菜单 Commands->'Process Timing Violations' 读入Prime-time报告文件。‘Violations Summary'窗口会弹出。
2.3.3.3 查看路径在LayoutViewer
用鼠标左键点击一个路径在’Violations Summary‘窗口中,点击鼠标右键,选中’Draw path on new schematic'命令。当Schematic窗口显示出来,选中其中部分电路或整个电路,用’Copy selected to' 命令把选中电路显示在LayoutViewer上。
2.3.3.4 ECO操作
根据元件的驱动力,延迟的大小以及元件在Layout上的位置,改变元件驱动力或改变元件位置,这些命令可以修复Timing Violation路径。
参照 a timing ECO example 。
2.4 脚本模式全部层手工ECO流程
2.4.1 概况
很多情况下,用户很清楚ECO要在哪里改动,这些改动可能是在一个128比特位的总线,也可能是添加隔离与门(AND Gate)到一个模块所有的输出端口。直接用文本编辑工具修改网表很耗时间,而且也很容易出错。这时,使用GOF的脚本做手工ECO就可大大地提高ECO效率。
GOF在GofCall脚本里支持很多内部的API,用于使用网表数据库和网表改动。
2.4.2 手工脚本ECO的步骤
一个典型的手工ECO步骤:
- 在Implementation Netlist上运行Formal测试
- 得到不等价逻辑点
- 生成GofCall脚本:
- 定义ECO名字在‘setup_eco’中
- 加载Standard Cell libraries和Verilog libraries
- 读入Implementation Netlist
- 定位要做ECO的逻辑点
- 调用ECO API来修改逻辑
- 报告ECO状态,写出ECO结果
- 运行以上生成的脚本
2.4.3 定位需要做ECO的逻辑点
定位需要做ECO的逻辑点是手工ECO最关键的地方。RTL组合逻辑的信号往往在综合中被优化掉了,无法在Implementation Netlist中找到对应名字的信号。GOF支持一个找回优化掉的信号的功能。可参照这个图形例子来使用这一功能,也可在脚本中使用API 'get_match_nets'来实现这一功能。
2.4.4 所需文件和数据要求
- Standard library (Synopsys Liberty)文件,以'.lib'为后缀
- 另外Verilog库文件,以支持'.lib'文件没有覆盖到的库元件
- Implementation Netlist
- 要做ECO的逻辑点位置
2.4.5 ECO API列表
可以改变网表的API列表:
- change_pin: Modify pin connection in ECO.
- change_gate: Modify an instance type in ECO.
- change_net: Change an existing net's driver.
- change_port: Change an output port's driver.
- new_net: Create a new net.
- new_gate: Create a new gate instance.
- new_port: Create a new port.
- del_net: Delete a net.
- del_gate: Delete a gate.
- del_port: Delete a port.
要得到完整的API列表,用户可用命令'help'在'GOF >' shell中
若要检查其中一个API,可用命令'help api_name',例如:
GOF > help new_port
Help for new_port
new_port: ECO command. Create a new port for the current top level module
ECO command. Create a new port for the current top level module
Usage: new_port($name, @options);
$name: Port name
@options:
-input: New an input port
-output: New an output port
-inout: New an inout port
Note: The port name has to be pure words or with bus bit, like, abc[0], abc[1]
Examples:
new_port('prop_control_en', '-input'); # create an input port naming 'prop_control_en'
new_port('prop_state[2]', '-output'); # create an output port with bus bit 'prop_state[2]'
new_port('prop_state[3]', '-output'); # create an output port with bus bit 'prop_state[3]'
2.4.6 手工脚本ECO的GofCall例子
# GofCall ECO script, run_example.pl
use strict;
undo_eco;# Discard previous ECO operations
setup_eco("eco_example");# Setup ECO name
read_library("art.90nm.lib");# Read in standard library
read_design("-ref", "reference.gv");# Read in Reference Netlist
read_design("-imp", "implementation.gv");# Read in implementation Netlist Which is under ECO
set_top("topmod");# Set the scope to the module that ECO is working on
# The following API adds a mux in flop 'state_reg_0_' D input pin,
# and connect up the original connection to pin 'A',
# pin 'B' connect to net 'next_state[7]', and pin 'S' to net 'sel_mode'
# the net can be replaced by format of 'instance/pin' , E.G. '.S(state_reg_2_/Q)'
change_pin("state_reg_0_/D", "MX2X4", "", ".A(-),.B(next_state[7]),.S0(sel_mode)");
report_eco();
write_verilog("eco_verilog.v");# Write out ECO result in Verilog
write_soce("eco_soce.tcl");# Write out TCL script for SOC Encounter
exit;# Exit when the ECO is done, comment it out to go to interactive mode when ’GOF >’ appears
2.4.7 运行和调试
GofCall脚本可用'-run'选项运行
gof -run fix_hold_timing.pl
参考运行和调试GofCall脚本一节
2.4.8 处理重复性工作
Perl的'for'或'foreach'循环语句可高效率地处理重复性的工作。例如,在一个模块的每个输出端加'AND'隔离门:
# GofCall ECO script, add_ands.pl
use strict;
undo_eco;# Discard previous ECO operations
setup_eco("eco_example");# Setup ECO name
read_library("art.90nm.lib");# Read in standard library
read_design("-ref", "reference.gv");# Read in Reference Netlist
read_design("-imp", "implementation.gv");# Read in implementation Netlist which is under ECO
set_top("topmod");# Set the top module that ECO is working on
my @ports = get_ports("-output");# Get all output ports of module 'topmod'
# For each output port of 'topmod', insert an 'AND' gate to enable it only when 'enable_out' is high
foreach my $port (@ports){
change_port($port, "AND2X2", "", "-,enable_out");
}
report_eco();
write_verilog("eco_verilog.v");# Write out ECO result in Verilog
write_soce("eco_soce.tcl");# Write out TCL script for SOC Encounter
exit;# Exit when the ECO is done, comment it out to go to interactive mode when ’GOF >’ appears
2.4.9 特殊字母的使用
特殊字母'-'在连接设置中表示原来已存在的连线。例如:
change_pin("U0/A", "BUFFX1", "eco_buf","-");
这语句会把一个Instance名为'eco_buf'的缓冲元件添加到Instance U0的输入脚A,原来驱动U0/A的信号现在驱动缓冲元件的输入脚。
特殊字母'.'在新的ECO Instance名字中的意思是把新加的ECO Instance加到和做ECO的逻辑点相同的层次中(Hierarchy),例如:
change_pin("u_qcif/u_num2/u_spare1/B", "AOI21X2",".", "net1,net2,net3");
若没有使用'.',ECO Instance名字是空白的,则产生的新的Instance会放在当前的模块中,如果使用".",GOF会产生新的ECO Instance并把它放在层次"u_qcif/u_num2/u_spare1"中。
2.5 脚本模式手工只做金属层ECO流程
2.5.1 概况
在只做金属层的ECO中,任何新加的门都会在'map_spare_cells'命令中映射到物理存在的spare Instances。这需要加载Design Exchange Format(DEF)文件,用于定位最佳的spare Instances。如果DEF文件缺省,则映射过程被略过。
2.5.2 所需文件和数据要求
- Standard library (Synopsys Liberty)文件,以'.lib'为后缀
- 另外Verilog库文件,以支持'.lib'文件没有覆盖到的库元件
- Implementation Netlist
- Design Exchange Format (DEF)文件,若不加载,则不做映射到物理存在的spare门
- Spare门模板,以‘hierarchical_instance/leaf_instance’的形式,它可以有通配符'*'匹配所有的在Implementation Netlist中的spare Instances。
- 或者直接加载spare门的列表文件。如果几个用户在同一个Implementation Netlist做ECO,起初的Spare门列表文件产生一次,以后每一次ECO都必须更新Spare门列表文件。
- 要做ECO的逻辑点位置
2.5.3 手工只做金属层ECO的GofCall脚本例子
# Manual Metal Only ECO, manual_metal_eco.pl
use strict;
undo_eco;
setup_eco("metal_eco0123");
set_log_file("metal_eco0123.log");
read_library("/prj/lib/tsmc40.lib");
read_design("-imp", "/prj/netlist/imp_net.v");
set_top("mtop");
new_port("nout7", "-output");# Create a new port 'nout7'
# Place the port to 60000, 1000000. It's approximate position, the main purpose is for
# spare instances selection
place_port("nout7", 60000, 100000);
new_port("nout8", "-output");# Create another port
place_port("nout8", 120000, 81000);
# 'nout8' is driven by an invert first, and the invert's input is driven by pin 'cmpmod/rego/QN'
change_port("nout8", "INV_X1M", "", "cmpmod/rego/QN");
# Drive the 'nout7' by 'INV_X1M' and leave the input unconnected, but the mapped
# spare instance name is returned.
my $inst = change_port("nout7", "INV_X1M", "", "");
# Drive the new instance's input by a flop, and specify the flop's connection in the 4thargument
change_pin("$inst/A", "SDFFRPQ_X4M", "", \
".CK(cmpmod/rego/CK),.D(cmpmod/rego/QN),.R(1'b0),.SE(1'b0),.SI(1'b0)");
read_def("/prj/def/imp_net.def");
get_spare_cells("Spare_*/*_SPARE_GATE*");
# Before mapping to spare gates, set a large number in buffer distance, so that GOF will not
# add buffers for long connections.
set_buffer_distance(9999999);
# The following 'map_spare_cells' command maps the three new ECO instances to the optimal
# spare instances.
map_spare_cells;
report_eco;
write_verilog("imp_eco0123.v");
2.5.4 运行和调试
GofCall脚本可用'-run'选项运行
gof -run manual_metal_eco.pl
参考运行和调试GofCall脚本一节
2.6 图形模式所有层ECO流程
2.6.1 概述
这一节主讲图形模式ECO,一个例子是怎么添加缓冲门或反相门。
2.6.2 启动 GOF在图形模式
启动Gates On the Fly用以下命令行:
gof -lib t65nm.lib -lib io.lib netlist_port.v
命令行的具体用法,可参照网站文件
http://www.nandigits.com/usage.htm
当GofViewer网表显示窗口出现时,按键ctrl-g(Ctrl键和'g'字母键同时按住),也可用菜单commands-> ’Launch GofTrace With Gate’,填入需要做ECO的Instance名字。

图7加载Instance到原理图上
2.6.3 产生局部原理图
在GofTrace电路原理图窗口中,使用鼠标中间键点击Instance的输入输出管脚,就可扩展电路原理图。在以下例子中,寄存器的'D'输入脚需要添加一个反向器。

图8局部原理图用于图形ECO
2.6.4 执行ECO在原理图上
点中ECO按钮,使原理图进入ECO模式

图9处于ECO模式的原理图
按鼠标左键以选中需要做ECO的信号线,点击ECO图标‘Insert gates into connections’,在弹出的窗口中选择合适的反向器。

图10选择合适的门元件
按'OK'按钮之后,在弹出窗口‘Specify Pin Connections’中,管脚全用缺省的选项‘Complete Loop’,使得新加的门被添加到信号线中。

图11新ECO门的管脚设置
按'OK'按钮,反向器就被添加到信号线中,见图12。

图12手工ECO添加一个新的反向器
2.6.5 储存ECO结果
按ECO图标‘Save ECO result to file’,在文件格式中选中想要的文件格式,包括verilog网表,SOC Encounter ECO脚本,GofCall脚本, TCL和DCShell脚本。

图13储存ECO结果
2.7 图形模式只做金属层ECO流程
2.7.1 概述
只做金属层ECO只能使用已存在硅层上的spare instances,Gates On the Fly可以控制怎么使用这些spare instances。
2.7.2 只做金属层 ECO的方法选择
图形模式只做金属层ECO有四种选项:
·用户加任意的门,GOF映射到spare-type门元件,再由后端软件把新的门映射到物理存在的spare instances
·用户加任意的门,GOF映射到物理存在的spare instances
·用户只能用spare-type的门元件,GOF映射到物理存在的spare instances
·用户直接用物理存在的spare instances,连接或断接这些spare instances
注意:'Spare-type'指的是门的类,如'INVX2', 'NAND2X2'。物理存在的spare instances是指那些存在设计中的spare Instances,如'spare1/spare_invx2'
2.7.3 设置和应用案例
这四种ECO方法的具体设置可参照这一节,GofECO只做金属层ECO。应用案例请参考网站文件。
3 选择Netlist ECO流程指导
3.1 概况
ECO案例有很简单的,也有很复杂。可以是简单的一个断线和一个连线,增加一个门,也可复杂到加入几千个门。GOF可用不同流程应付这种复杂性,以达到最佳的ECO效果。
3.2 流程选择决定因素
- Timing ECO还是functional ECO
- Timing ECO会把元件的驱动力变大或变小,增加或去掉缓冲和反向器,但不会改变网表的功能
- Functional ECO改变网表功能
- 只做金属层还是所有层ECO
- 只做金属层ECO只改变金属层,任何新加的门只能用spare的门
- 所有层ECO可以任意改变网表
- 修改点是否靠近寄存器,端口或名字不变的Instance
- 当ECO的修改点靠近寄存器,端口或名字不变的Instance时,信号名字和Instance名字一般都得以保留,手工ECO就比较有可能,比较容易
- 若RTL的修改是在组合逻辑的信号上,而这些信号名字很可能已经被优化掉,甚至名字一样,逻辑功能实际上大不一样。这种情况建议重新综合产生Reference Netlist,做自动ECO
- 修改是随意分布还是重复的
- 任意改变的ECO可能动到网表的任何位置,网表内很多点要用不同的ECO操作修改
- 重复性的ECO针对一组或类似的信号线/端口/Instance。例如,添加AND门到一个模块的所有输出端口,这类ECO使用脚本来做手工ECO就比自动ECO更加高效
- 涉及的门数是不是大于50个
- 若一个ECO涉及的门数大于50个,而且修改不是重复性的,改动点也不是靠近寄存器,端口或名字没变的Instance,这时最好采用自动ECO模式。当然,这个门槛数字大小最终取决于用户,可大可小
- 当ECO涉及的门数小于门槛数,而且ECO修改点靠近寄存器,端口或名字保持的Instance,这时手工ECO变得可行
- 图形还是脚本模式
- 图形模式优点是直观,极易上手,对于不常做ECO的用户,图形模式是很好的选择
- 脚本模式功能强大,非常高效,而且脚本可重复使用。当ECO是重复性或修改逻辑点靠近寄存器,端口,名字保持的Instance时,脚本模式是很好的选择
3.3 ECO流程选择树
ECO流程选择树显示在以下图中:

图14流程选择树
4 脚本模式具体功能
4.1 GofCall 脚本
GofCall脚本是与Perl脚本语法兼容,并且可用内部API以使用网表数据库
4.1.1 API 用法帮助
4.1.2 功能列表
- 与Perl脚本语法完全兼容
- 支持自动ECO,API有fix_modules/fix_logic/map_spare_cells
- 丰富的手工ECO API资源
- ECO操作完全可逆,使用undo_eco就可恢复ECO前的状态
- ECO结果可以随时加载到原理图上加以验证
- 别的内部API命令用于网表浏览搜索和设计检查
4.1.3 API 列表
buffer: ECO command. Buffer high fanout ECO nets
change_gate: ECO command. Modify an instance in ECO.
change_net: ECO command. Change a existing net's driver
change_pin: ECO command. Modify pin connection in ECO.
change_port: ECO command. Change an output port's driver
check_design: Check if the design has unresolved modules
compare: Logic equivalence check on output port and register input pins
compare_nets: Check equivalence of two nets in the reference and implementation netlist
convert_gated_clocks: ECO command. Convert gated clocks to MUX logic
current_design: Set the current top level module
current_instance: Set the current instance
del_gate: ECO command. Delete gate
del_net: ECO command. Delete net
del_port: ECO command. Delete port
exist_inst: Check if an instance exists
exist_wire: Check if exist the wire
fix_hold: ECO command. Fix hold time violations.
fix_logic: ECO command. Fix listed points
fix_modules: ECO command. Fix modules listed
fix_setup: ECO command. Fix Setup time violations.
flatten_modules: Flatten hierarchical modules in reference netlist
get_cell_info: Get information of a module or instance
get_cells: Get all cells in the current module or sub-modules
get_conns: Get connections of net or pin in the top level module
get_coord: Get an instance's coordination
get_definition: Get instantiation of instance
get_driver: Get the driver of a net or pin
get_drivers: Get the drivers of a net or pin
get_instance: Get instance in the top level module
get_instances: Get all hierarchical instances in the top level module
get_leaf_pin_dir: Get leaf cell pin's direction input/output/inout
get_leafs_count: Get all leaf cells name and count in the top level module
get_lib_cells: Get leaf gates in libraries
get_loads: Get loads of net or pin in the top level module
get_logic_cone: Get logic cone of nets or pins
get_match_nets: Get logic equivalent nets in implementation netlist
get_modules: Get all hierarchical modules under current module
get_net_of: Get the net name connecting to the pin
get_nets: Get nets that matching pattern
get_path: Get current hierarchical path
get_pins: Get pins of instance or module
get_ports: Get all ports in the current top level module
get_ref: Get the reference of the instance
get_resolved: Resolve the relative path to module and leaf item
get_roots: Get root designs name
get_spare_cells: ECO command. Get spare cells
gexit: Exit the GofCall interactive mode
gprint: Print out the message and save to log file
is_leaf: Check if a module or instance is leaf cell
is_seq: Check if a leaf module is a specific sequential cell
lv_search: Search instances in LayoutViewer window
map_spare_cells: ECO command. Map all new created cells to spare cells
new_gate: ECO command. Create new gate
new_net: ECO command. Create a new net
new_port: ECO command. Create a new port for the current top level module
place_gate: ECO command. Place gate position
place_port: ECO command. Place port position
pop_top: Pop out the saved top level module from the stack and discard the current setting
push_top: Set the current top level module and push the previous setting to stack
read_def: Read DEF file
read_design: Read verilog netlist
read_file: Read timing violation report file
read_lef: Read LEF file
read_library: Read standard library or verilog library files
rename_net: ECO command. Rename a net name
report_eco: Report ECO
report_spares: Report Spare cells
run: Run GofCall script
sch: Launch schematic to verify ECO
set_bound_opti: Enable or disable boundary optimization check. Enabled by default
set_buffer: Set buffer type. The tool will automatically pick one if the command is not called
set_buffer_distance: Set distance limit for inserting buffer
set_constraints: Set contraints for map_spare_cells command.
set_dont_use: Set dont use list.
set_exit_on_error: Whether the tool should exit when the script runs into an error
set_exit_on_warning: Whether the tool should exit when the script runs into a warning
set_ignore_network: Set ignore network
set_inst: Set the current instance
set_invert: Set invert type. The tool will automatically pick one if the command is not called
set_keep_format: Set keep format of the original verilog when ECO is done
set_leaf: Set a hierarchical module to be leaf. Useful to stub hierarchical instances.
set_log_file: Set log file name
set_max_lines: Set max output lines
set_max_loop: Setup max loop
set_mod2mod: Set reference module mapping to implementation module
set_mu: MU configuration
set_power: Set power pins connections for leaf cell
set_preserve: Set preserve property on instances. The tool will not remove them in ECO
set_quiet: Run script in quiet mode
set_recovery_distance: Set distance limit for gates recovery in ECO
set_tiehi_net: Set tiehi net name
set_tielo_net: Set tielo net name
set_top: Set the current top level module
set_tree: Set the current tree
set_verbose: Run script in verbose mode
setup_eco: ECO command. Setup ECO
start_gui: Start GUI windows
stitch_scan_chain: ECO command. Stitch scan chain
suppress_warnings: Suppress warning messages
swap_inst: ECO command. Swap two instances with same input/output pins.
undo_eco: ECO command. Undo eco operations
write_dcsh: ECO command. Write out ECO result in Design Compiler dcsh script format
write_perl: ECO command. Write out GofCall ECO script compatible with Perl.
write_soce: ECO command. Write out ECO result in Cadence SOC Encounter script format
write_spare_file: ECO command. Write out spare cells list file
write_tcl: ECO command. Write out ECO result in Design Compiler tcl script format
write_verilog: ECO command. Write out ECOed netlist to a file
4.1.4 API 分类
4.1.4.1 网表搜索类API
高效手工ECO中的一个非常关键因素是快速确定ECO的修改点。以下的API是用于网表快速浏览搜索:
get_cells: Get all cells in the current module or sub-modules
get_conns: Get connections of net or pin in the top level module
get_driver: Get the driver of a net or pin
get_drivers: Get the drivers of a net or pin
get_instance: Get instance in the top level module
get_instances: Get all hierarchical instances in the top level module
get_leaf_pin_dir: Get leaf cell pin's direction input/output/inout
get_lib_cells: Get leaf gates in libraries
get_loads: Get loads of net or pin in the top level module
get_match_nets: Get logic equivalent nets in implementation netlist
get_modules: Get all hierarchical modules under current module
get_net_of: Get the net name connecting to the pin
get_nets: Get nets that matching pattern
get_pins: Get pins of instance or module
get_ports: Get all ports in the current top level module
get_ref: Get the reference of the instance
例如,为得到一个模块中的所有寄存器的数据脚,参考以下脚本中使用的浏览API:
my @flop_data_pins;
set_top("module_name");
my @flops = get_cells("-type", "ff");
foreach my $flop (@flops){
my @dpins = get_pins("-data", $flop);
push @flop_data_pins, @dpins;
}
运行脚本后,Perl数组@flop_data_pins记录所有的寄存器的数据管脚。
4.1.4.2 自动ECO API分类
这些API用于自动ECO:
fix_modules: ECO command. Fix modules listed
fix_logic: ECO command. Fix listed points
map_spare_cells: ECO command. Map all new created cells to spare cells
把网表浏览搜索API和自动ECO API组合在一起,用户就可用很小的脚本做很大,又复杂的ECO改动。例如,修理所有的名字匹配"tx_machine_*"的模块:
my @modules = get_modules("-hier", "tx_machine_*");
fix_modules(@modules);
4.1.4.3 文件输入输出API分类
这些API是由于读入/写出文件:
read_def: Read DEF file
read_design: Read verilog netlist
read_file: Read timing violation report file
read_lef: Read LEF file
read_library: Read standard library or verilog library files
write_dcsh: ECO command. Write out ECO result in Design Compiler dcsh script format
write_perl: ECO command. Write out GofCall ECO script compatible with Perl.
write_soce: ECO command. Write out ECO result in Cadence SOC Encounter script format
write_spare_file: ECO command. Write out spare cells list file
write_tcl: ECO command. Write out ECO result in Design Compiler tcl script format
write_verilog: ECO command. Write out ECOed netlist to a file
4.1.4.4 手工ECO API分类
这些API用于手工ECO:
buffer: ECO command. Buffer high fanout ECO nets
change_gate: ECO command. Modify an instance in ECO.
change_net: ECO command. Change a existing net's driver
change_pin: ECO command. Modify pin connection in ECO.
change_port: ECO command. Change an output port's driver
del_gate: ECO command. Delete gate
del_net: ECO command. Delete net
del_port: ECO command. Delete port
new_gate: ECO command. Create new gate
new_net: ECO command. Create a new net
new_port: ECO command. Create a new port for the current top level module
把网表浏览搜索API和手工ECO API组合在一起,一个简短的脚本就可做一个高效的ECO。例如,添加隔离AND门到一个模块的所有输出端口:
set_top("module_name");
my @out_ports = get_ports("-output");
foreach my $out (@out_ports){
change_port($out, "AND2X2", "", "-,net_iso_enable");
}
4.1.5 API 用法
具体的API用法可参照网络文件http://www.nandigits.com/apis_gof.htm
对每一个API,可在以上文件后加'#'和API名字
例如,查看'fix_modules' API的用法:
http://www.nandigits.com/apis_gof.htm#fix_modules
4.2 脚本模式中字符串的处理
4.2.1 单引号和双引号的用法
在GofCall脚本中,任何代表模块/Instance/信号/管脚/端口的字符串都应用单引号或双引号包围。当一个Perl变量出现在字符串中时,字符串必须用双引号包围。例如:
my $inst = "state_reg_0";
change_pin("$inst/D","1'b0");
4.2.2 在Instance 和信号名字中的反斜线
若Instance名字中有反斜线,这名字必须用单引号,注意名字最后要有一个空格,或干脆把反斜线去掉,GOF会自动判断在数据库中的真实名字有没有反斜线。例如:
'\u_abc/u_def/state_reg[0] '可以写成'u_abc/u_def/reg_state_0[0]'
但如果反斜线在信号名字中,则反斜线必须保留。一个避免直接写信号名字的方法是用信号连接的Instance和管脚来表示,以'instance/pin'的格式。例如:一个Instance有以下的定义
DFFQ_X4M \u_abc/u_def/state_reg[0] (.D(\u_abc/u_def/net123 ), .Q(\u_abc/u_def/state[0] ));
在GofCall API中,要使用信号'\u_abc/u_def/net123 '可用'u_abc/u_def/state_reg[0]/D'来代替,change_pin('u_def/U123/A',‘u_abc/u_def/state_reg[0]/D’);
要使用信号'\u_abc/u_def/state[0] '可用'u_abc/u_def/state_reg[0]/Q'来代替。
4.3运行及调试GofCall脚本
4.3.1 命令行
在命令行中,GofCall脚本可用‘-run’选项来执行
gof -run run_example.pl
4.3.2 GOF Shell
如果'-run'或'-shell'选项在命令行中,GofCall脚本没有'exit'命令,当GOF执行完脚本或发现错误时,GOF会停在互动GOF shell 'GOF >'
GofCall, Netlist Processing Script APIs, Interactive Mode
Run 'start_gui' to launch GUI window
Run 'help' to list API calls
GOF >
这时,个别命令可以在GOF shell里执行。命令也可用嵌套模式,例如:
GOF > set_top(get_ref("u_rxbuf"))
4.3.3 在图形模式中运行
GofCall脚本可以在图形窗口中执行。在GofViewer窗口中,点击菜单Commands->'Launch GofCall Script Interface'就可以启动GofCall图形窗口。
键入'help'到Shell输入条中,按Enter键,可以得到API列表和简短帮助。脚本可用'run'命令来执行。

图15 GofCall图形窗口
4.3.4 快速启动原理图
在GOF shell中,图形窗口可用'start_gui'或'sch'启动。'start_gui'命令启动网表显示窗口GofViewer,用户可以在GofViewer中启动原理图。
'sch'命令只启动原理图窗口GofTrace,网表显示窗口不会出现,这样可大大加快原理图窗口启动速度,减少互动调试的时间。例如:
在以下的命令执行完毕后,
change_pin("u_top/u_core/u_regmod/state_reg/D", "XOR2X2", "", "-,new_enable");
在GOF Shell里执行'sch'命令:
GOF > sch("u_top/u_core/u_regmod/state_reg")
那个做过ECO的Instance就被加载到原理图上,用户就可用鼠标中间键点元件的管脚,用鼠标左键移动元件,以查看管脚的连接方式,这样就可以马上验证ECO是不是正确。
4.3.5 设置调试点
'sch'快速原理图启动命令可放在GofCall脚本中间用作调试点,当GOF运行到这命令时就会停住,并启动原理图。例如,以下脚本会启动原理图,并把'state_reg_0_'加载到原理图上,
…
setup_eco("sanity75");
set_log_file("t_sanity75.log");
read_library("libdr/art.m.simple.lib");
read_design('-imp', "cdir/imp_name.v");
change_pin("state_reg_0_/D", "MX2X4", "", ".A(-),.B(next_state[7]),.S0(sel_mode)");
sch("state_reg_0_");
…
在原理图上,用户用鼠标中间键点击'state_reg_0_'的'D'管脚,就可验证'D'管脚是不是由一个新产生的模块名为'MX2X4'的Instance驱动。

图16在调试点启动原理图
注意:'ECO'选项是自动有效的,因为有ECO的操作。
为对照ECO以前的逻辑,可以启动一个全新的原理图,用菜单Schematic->'New Schematic'。在新的原理图上,按'ctrl-g'(Ctrl键和'g'键一起按)或用菜单Schematic->'Load Gate',填入Instance名字到弹出的窗口中,按'OK'就可把那个Instance加载到原理图上。

图17启动原理图验证ECO以前的连接
注意:'ECO'选项是关掉的。
当所有图形窗口都关掉时,GofCall脚本就会继续执行下一条语句。
4.4 常用的手工ECO操作
4.4.1 添加门到端口
输入输出端口的操作是一样的
4.4.1.1 添加反向器到输入端口
# Insert to input port 'in_enable'
change_port("in_enable", "INVX1", "inst_name", "-"); # 'inst_name' can be empty
4.4.1.2 添加与门到输出端口
# Insert AND2X1 to output port 'out_enable', one pin connects to the original driver,
# the other pin is driven by 'scan_mode'
change_port("out_enable", "AND2X1", "", "scan_mode,-");
4.4.1.3 添加反向器到多个端口
# Find all ports matching string "abcde" and insert invert to each port
my @ports = get_ports("*abcde*");
foreach my port (@ports){
change_port($port, "INVX1", "", "-");
}
4.4.2 添加门到寄存器管脚
4.4.2.1 添加反向器到寄存器数据脚
# Insert an invert to 'D' pin of flop 'abc_reg'
change_pin("abc_reg/D", "INVX1", "", "-");
4.4.2.2 添加反向器到寄存器输出脚
# Insert an invert to 'Q' pin of flop 'abc_reg'
change_pin("abc_reg'Q", "INVX1", "", "-");
4.4.2.3 添加选择器到多个寄存器数据脚
# Find all flops matching string "cnt_reg" and insert MUX to 'D' pin of each flop,
# so that each flop is preset to 'preset_val' when 'preset_enable' is high
my @flops = get_cells("*cnt_reg*");
foreach my $flop (@flops){
change_pin("$flop/D", "MUX2X2", "", ".A(-),.B(preset_val),.S(preset_enable)");
}
4.4.3 改变寄存器 类型
4.4.3.1 非复位寄存器替换成复位寄存器
# Find all flops matching string "cnt_reg" and change each flop to resettable flop
my @flops = get_cells("*cnt_reg*");
foreach my $flop (@flops){
change_gate($flop, "DFFRQX2", ".RD(reset_n)");
}
4.4.4 添加门到分层 Instance的端口
4.4.4.1 添加反向器到分层Instance的端口
# Find all instances matching "tx_mac" in module "abc_mod" and insert invert to 'loop_en' pin
set_top("abc_mod");
my @insts = get_instances("*tx_mac*");
foreach my $inst (@insts){
change_pin("$inst/loop_en", "INVX1", "", "-");
}
4.4.4.2 添加与门到分层Instance的端口
# Find all instances matching "tx_mac" in module "abc_mod" and
# AND all output pins with "power_on" signal.
set_top("abc_mod");
my @insts = get_instances("*tx_mac*");
foreach my $inst (@insts){
my @pins = get_pins("-output", $inst);
foreach my $pin (@pins){
my $net = get_net_of($pin); # Only add AND to those out pins driving nets
if($net){
change_pin($pin, "AND2X2", "", ".A(-),.B(power_on)");
}
}
}
5 图形模式功能
5.1 GofViewer 窗口
运行GOF,不加'-run'或'-shell'选项,GOF会进入图形模式。
gof -lib t65nm.lib -lib io.liblong_port.v
在GOF启动以后,GofViewer是第一个窗口。

图18 GofViewer窗口
5.1.1 记录( Log)窗口
若在加载数据库的过程中发现错误或警告,记录窗口会在加载过程结束后弹出

图19记录窗口
5.1.2 File 菜单
5.1.2.1 Load Design加载设计文件
用户可设置输入网表文件和设计文件到Load Design命令中。
5.1.2.2 Reload Design重载设计文件
若任何网表文件或设计文件有变化,可使用Reload Design命令来重载设计文件。
5.1.2.3 Save Startup File保存启动文件
这个命令是把用户在Load Design中输入的信息写进一个启动文件。在Windows系统中这文件是批文件以‘bat’结尾,在Linux系统中,这文件是shell可执行文件。在下一次使用中,用户可以用这个启动文件加载数据库。
5.1.2.4 Open Other Netlist加载别的网表文件
这命令可以加载另一个网表文件以产生新的分层目录。这个新的分层目录会显示在左边的目录列表子窗口。这命令在以下用法中非常上手,当用户需要对另一个网表文件画电路图,并且要把新的电路图画在原有的同一个电路原理图上,这样就可以方便地对两个设计加以比较。在逻辑比较或调试,像是逻辑不等价点的调试,非常适用。
5.1.2.5 Open Log Window打开记录窗口
这命令可把记录文件打开,显示在一个文本窗口中。
5.1.2.6 Exit退出
这是退出命令。
5.1.3 Find 菜单
5.1.3.1 Search查找
这命令用于在网表列表子窗口中查找配备的字符串。
5.1.3.2 Goto Line Number跳到某一行
在一个有多个模块的分层设计中,GOF提取一个模块的内容,显示在网表列表子窗口中。这命令可以根据用户的输入把相应的模块提取出来,显示在子窗口中。
5.1.3.3 ReportArea报告面积
这命令可以报告设计面积。使用这命令需要加载Standard Library文件,因Standard Library文件有每个库元件的面积信息。
5.1.3.4 Report Leakage报告漏电流
这命令报告设计的漏电流。跟以上的一样,需要加载Standard Library文件。
5.1.3.5 Report Leaf Cells报告Leaf元件
这命令报告设计中用到的Leaf元件类型和数量。
5.1.3.6 Report Submodules报告子模块
这命令报告设计中的分层子模块。
5.1.3.7 Statistic of Current Design本模块统计
这命令报告本模块统计。一个互动窗口会弹出来让用户选择设置。
5.1.3.8 List Library列出库文件
这个命令用于列出库和库里的元件。
5.1.3.9 List Context for Leaf Cell列出Leaf元件信息
这命令会弹出窗口让用户输入Leaf元件名字模板,可以使用通配符,所有匹配模板的Leaf元件会被列出来,如果只有一个名字匹配,这该元件的详细信息会被列出来。
5.1.4 Commands 菜单
5.1.4.1 Launch GofTrace Schematic启动GofTrace电路原理图
这命令会启动GofTrace电路原理图,如果有任何Instance或信号在网表子窗口中被选中,那个Instance或启动那个信号的Instance会被画在原理图上,如果没有任何字符串被选中,原理图是空的。
5.1.4.2 Launch GofTrace with Gate带元件启动原理图
这命令会弹出窗口让用户输入一个Instance的名字,例如,‘u_abc/U123’。按‘OK’按键,GofTrace电路原理图就会启动,那个Instance会被画在原理图上。
5.1.4.3 Launch Layout Viewer启动Layout Viewer窗口
这命令启动Layout Viewer窗口,如果网表子窗口中,有Instance或信号的字符串被选中,那个Instance或驱动信号的Instance会在Layout Viewer窗口中点亮显示。这命令需要一些后端文件,DEF和LEF文件必须先要加载,不然一个警告窗口会弹出指示后端物理文件的缺失。
5.1.4.4 Launch GofCall Script Interface启动GofCall脚本互动窗口
这命令启动GofCall脚本互动窗口,在这窗口中可以运行脚本和网表操作命令。
5.1.4.5 Switch to GOF Shell Mode切换到GOF Shell模式
这命令退出图形模式,切换到Shell模式。在Shell模式会出现‘GOF >’。
5.1.4.6 Spare Cells处理Spare元件
这命令组在只做金属层ECO中处理Spare门元件。
Create Spare Cells File产生Spare instances列表文件
这命令用于在网表中提取Spare instances,一个弹出窗口可让用户填入Spare instances模板,缺省值为‘spare_*/*’.

Figure 20 Spare元件模板
点击'OK'按钮,就可从网表文件中提取Spare元件Instance,一个网表调查窗口会列出所有Spare元件Instance,储存这个列表到一个文件中以备后用。

Figure 21 Spare门Instance列表
Load Spare Cells File加载Spare instances列表文件
这命令加载由以上命令产生的Spare instances列表文件。
5.1.4.7 Launch Files Compare Window启动文件比较窗口
这命令启动网表文件比较窗口,网表文件比较功能比Linux ‘diff’命令做更多的事。
5.1.4.8 Process Timing Violations处理Timing Violation文件
这命令用于处理Prime Time报告文件,以下PDF文件有更多信息描述这一功能
www.nandigits.com/use_cases/gof_timing_analysis.pdf
5.1.4.9 SDF处理SDF文件
这个命令组用于处理SDF文件以得到延迟信息。
Create SDF Index File产生SDF索引文件
GOF只读入SDF索引文件而不是SDF文件本身,因为SDF文件很大。索引文件产生后就可以后重复使用,加载速度大大提高。
Load SDF Index File加载SDF索引文件
这命令加载已经产生的SDF索引文件。
5.1.5 Options 菜单
5.1.5.1 Hierarchy Window Font分层列表子窗口字体
分层列表子窗口(Hierarchy List Window)的位置参考图18
Increase Font Size增加字体大小
分层列表子窗口增加字体大小。
Decrease Font Size减小字体大小
分层列表子窗口减小字体大小。
5.1.5.2 Netlist Window Font网表子窗口字体
网表子窗口在GofViewer窗口右半部分,查考图18
Increase Font Size增加字体
增加网表子窗口字体。
Decrease Font Size减小字体
减小网表子窗口字体。
5.1.5.3 Dump Waveform Restore File波形重建文件
一个弹出窗口让用户选择填写对应的仿真工具,和波形重建文件名字,以及信号要加的前缀字符串。这功能在仿真调试时很有用。当有任何仿真工具被选中时,并且一个信号在网表子窗口中被选中,‘Write Waveform Restore File’会显示在弹出菜单的最上面。
5.1.5.4 Setup设置
集合了一些设置的信息。
5.1.6 Help 菜单
5.1.6.1 General概述
帮助信息概述。
5.1.6.2 About关于
关于Gates On the Fly.
5.1.6.3 nandigits.com/gof_manual.htm网络手册
参考网络手册。
5.1.6.4 Read Ethernet Mac Address读MAC地址
度MAC地址。当用户需要购买License或需要试用License,需要反馈MAC地址以产生GOF License。
5.1.7 快捷键
5.1.7.1 快捷菜单命令
按住‘Alt’键和对应下划线的字母。.
5.1.7.2 快捷功能键
- Ctrl-a:选中所有网表子窗口中的文本
- Ctrl-c:拷贝点亮的字符串
- Ctrl-v:粘帖在剪贴板里的内容
- Ctrl-d:追踪点亮的信号的驱动器
- Ctrl-f :查找功能
- Ctrl-g:加载Instance到原理图上
- Ctrl-s:象Emacs一样的正向查找
- Ctrl-r:象Emacs一样的方向查找
- Ctrl-w:写入波形重建文件
- Ctrl-x:退出当前窗口
5.1.8 选中状态
按鼠标左键在网表子窗口上,点中字符串可以是信号,Instance或模块名字,整个字符串会被点亮。网表子窗口有不同内容的弹出窗口根据选中的字符串属性。按住键Ctrl-a可把所有网表子窗口中的文本选中。按鼠标左键不放,向下或向上移动鼠标,可以选中多行文本。
5.1.9 网表子窗口弹出菜单
点鼠标右键,放开,一个弹出菜单窗口会在光标下出现。弹出菜单的内容与网表子窗口中选中的内容有关。
5.1.9.1 Search查找
在网表子窗口中查找字符串,键盘快捷键是Ctrl-f.
5.1.9.2 Copy Selected to拷贝选中的内容到
拷贝选中的内容,信号或Instance,到一个新的原理图或已存在的原理图窗口。
Schematic New新的原理图
拷贝选中的内容到新的原理图。
Schematic #number原理图数
拷贝选中的内容到一个已存在的原理图窗口。
5.1.9.3 Driver of the selected net选中信号的驱动器
追踪选中信号的驱动器,网表子窗口会显示驱动的Instance和启动的信号并点亮。
5.1.9.4 List Connectivity of the selected net列出选中信号的连接
弹出一个窗口列出选中信号的连接关系。
5.1.9.5 List Fanin EndPoints列出Fanin的端点
弹出窗口列出驱动选中信号的Fainin端点,这些端点是寄存器和输入端口。
5.1.9.6 List Fanout EndPoints列出Fanout的端点
弹出窗口列出选中信号的Fanout端点,这些端点包括寄存器和输出端口。
5.1.9.7 Parent Module母模块
跳到母模块中当前模块的定义部分,若当前模块是中高的模块,这命令无效。
5.1.9.8 List Context列出相关信息
列出选中的信号,Instance以及模块的相关信息。
5.1.10 分层列表子窗口的弹出菜单
在分层列表子窗口(Hierarchy List Window)单点鼠标右键,一个弹出菜单会出现在光标以下,菜单内容根据选中的内容而定。
5.1.10.1 Show Definition显示定义
打开模块内容并显示在网表子窗口中。
5.1.10.2 Show Calling显示Instance
打开母模块,并显示点亮Instance所在位置。
5.1.10.3 Report Area of the selected design报告选中的模块面积
参考Report Area
5.1.10.4 Report Leakage of the selected design报告选中的模块漏电流
参考Report Leakage
5.1.10.5 Report Leaf Cells of the selected design报告选中的模块Leaf元件
参考Report Leaf Cells
5.1.10.6 Report Submodules of the selected design报告选中的模块的子模块
参考Report Submodules
5.1.10.7 Statistic of the selected design选中的模块的统计
参考Statistic of Current Design
5.1.10.8 Edit Module of the selected design编辑选中的模块
用编辑软件编辑模块,编辑软件在菜单Options->Setup->Misc->'Edit tool'中定义。用户需要指明一个可写目录用于存储暂时文件。
5.1.10.9 Save Module of the selected design写出选中的模块
这命令既可用于写出编辑过的模块,也可用于写出只含选中的模块的网表。
5.1.10.10 Goto Line Number#跳到某行
5.2 GofTrace 窗口
GofTrace窗口是个增量的电路原理图。用户用鼠标中键点Instance的输入输出脚就可控制怎么扩展原理图,用户还可用鼠标左键调整门在原理图上的位置。

图22 GofTrace窗口
5.2.1 鼠标按键的用法
5.2.1.1 鼠标左键
鼠标左键用于选中一个物件,点击任一物件,该物件被点亮表示被选中。若要选中多个物件,按住'ctrl'键不放,再去按别的物件,也可以按住鼠标左键在空白处,移动鼠标选中多个物件,再放开鼠标左键。
5.2.1.2 鼠标中键
鼠标中键用于扩展电路原理图,点击Instance的输入输出脚就可扩展原理图。这键也用于拖放功能。在ECO模式,这键用于连接悬空的输入脚到输出驱动脚上。
5.2.1.3 鼠标右键
鼠标右键用于弹出菜单。
5.2.2 File 菜单
5.2.2.1 Save存储
存储当前的电路原理图到一个文件上为将来所用。存储文件以‘.st’为后缀,GOF就可以在下次用‘Open’来打开这个电路原理图。
5.2.2.2 Open打开
打工原理图文件,这文件是上一个命令Save存储的。
5.2.2.3 Print打印
打印电路原理图到一个打印机或一个文件。打印机页面设置窗口弹出用于设置打印页面大小。在Windows系统中,用户可以选择打印机,在Linux系统中,必须要保证'lpr'命令是工作的。
5.2.2.4 Exit退出
退出GofTrace窗口。
5.2.3 Schematic 菜单
5.2.3.1 New Schematic新的原理图
这个命令用于启动新的原理图窗口。
5.2.3.2 List Gate列出门元件
这命令弹出窗口让用户输入字符串用于查找跟字符串配备的Instance名字,通配符可以使用在层次名字和Instance名字。例如,设计有四个分层Instance,' u_lane0', 'u_lane1', 'u_lane_2'和'u_lane3',每个分层Instance有Spare模块,Instance名字'u_spare*',在每个Spare模块中,AND门有Instance名字 '*AND*'。为找出所有的Spare AND门,用户可打入字符串'u_lane*/u_spare*/*AND*'。
5.2.3.3 Load Gate加载门元件
这命令弹出一个窗口让用户输入字符串,配备的Instance会被加载到原理图上。跟上面的'List Gate'命令一样,可以输入通配符。但可以同时在原理图上显示的门数是有限制的,总数不能超过阈值,这阈值是由菜单Options->Setup->Misc->'Gates number limit'定义的。
5.2.3.4 Load Gate Driving Net加载驱动一个门的信号
这命令弹出窗口让用户输入信号名字的字符串,匹配的启动这个信号的Instance会被加载到原理图上。
5.2.3.5 List Selected Instances列出选中的Instance
用鼠标左键选中多个物件,包括Instance和信号线,点击这命令就会把所有的Instance以及它们的分层路径列在一个弹出的文本窗口里。
5.2.3.6 List Selected Wires列出选中的信号线
用鼠标左键选中多个物件,包括Instance和信号线,点击这命令就会把所有的信号以及它们的分层路径列在一个弹出的文本窗口里。
5.2.3.7 List Selected Modules列出选中的模块
用鼠标左键选中多个物件,包括Instance和信号线,点击这命令就会把所有的模块名字列出在一个弹出的文本窗口里。
5.2.3.8 List Selected Instances Definitions列出选中的Instance的定义
用鼠标左键选中多个物件,包括Instance和信号线,点击这命令就会把所有Instance的定义列在一个弹出的文本窗口里。
5.2.3.9 List Selected Gates Types列出选中的Instance逻辑类型
用鼠标左键选中多个物件,包括Instance和信号线,点击这命令就会把所有Instance的逻辑类型列在一个弹出的文本窗口里。例如,'AND2X2'门有类型'and',反向器有类型'not',弹出窗口会显示这样的信息,"Type 'not' has 11".
5.2.3.10 Zoom In放大
这个命令可放大原理图,原理图最大比例是100%,键盘快捷键是'+'。
5.2.3.11 Zoom Out缩小
这个命令可缩小原理图,原理图最小比例是13%,键盘快捷键是'-'。
5.2.3.12 Zoom to缩放为
这命令让用户自由选择缩放比例,可选的比例是 100%, 67%, 44%, 30%, 20%和13%。
5.2.3.13 Find Gates on Schematic在原理图上找门元件
这命令弹出窗口让用户输入字符串,以找到匹配的Instance名字,在原理图上点亮找到的Instance。匹配可用部分的字符串,例如,'U'可匹配'U0', 'U1'和'U222'。
5.2.3.14 Find Nets on Schematic在原理图上找信号线
这命令弹出窗口让用户输入字符串,以找到匹配的信号线名字,在原理图上点亮找到的信号。匹配可用部分的字符串,例如,'Net0'匹配'Net0', 'Net011'和'Net023'。
5.2.3.15 Undo Schematic Operations取消原理图操作
这命令是用于取消原理图操作,键盘快捷键是Ctrl-z.
5.2.3.16 Place & Route元件排布及布线
这命令组是用于在原理图上自动排元件以及布线。
- Auto Place & Route自动排元件以及布线
这命令是用于自动做排元件和布线。
这命令只做自动排元件。
这命令只做自动布线。
这命令复位所有已经布好的线,所有布线变成直线。
5.2.3.17Create PS/PDF File产生PS/PDF文件
这命令用于针对目前的原理图可视部分,产生Postscript文件或PDF文件file。Windows系统只支持Postscript格式,Linux系统支持Postscript和PDF格式。
5.2.4 Commands菜单
5.2.4.1 View Gates in Layout在布局图中查验门电路
这命令启动布局显示图(Layout Viewer)窗口,如果一些Instance和信号线在原理图(GofTrace)中被选中,他们会在布局显示图中被点亮。该命令需要读入DEF和LEF后端物理文件。
5.2.4.2 Load Layout Files加载后端布局文件
这命令加载后端布局物理文件,包括DEF和LEF文件,可以多次使用该命令,以依次读入多个DEF和LEF文件。DEF和LEF文件也可用启动命令行读入,选项是-def和-lef。也可用API在GofCall脚本中读入,'read_def'和'read_lef'。
5.2.4.3 Launch GofCall Script Interface启动GofCall脚本接口窗口
这命令启动GofCall脚本接口窗口。
5.2.4.4 Spare Cells处理Spare元件
这命令组在只做金属层ECO中处理Spare门元件,参考GofViewer Spare Cells一节。
5.2.4.5 Dump Waveform Restore File波形重建文件
一个弹出窗口让用户选择填写对应的仿真工具,和波形重建文件名字,以及信号要加的前缀字符串。这功能在仿真调试时很有用。当有任何仿真工具被选中时,并且一个信号在GofTrace中被选中,‘Write Waveform Restore File’会显示在弹出菜单的最上面。
支持以下仿真工具波形重建文件
- SimVision Restore File
- ModelSim Restore File
- Verdi Restore File
- GtkWave Restore file
若一个或多个被选中,当GofViewer和GofTrace选中信号线时,弹出菜单会有‘Write Selected Nets to the Waveform Restore File’在最顶端。
5.2.4.6 Process Timing Violations处理Timing Violation文件
这命令启动Prime Time报告文件处理控制窗口。
5.2.4.7 SDF处理SDF文件
这命令组处理SDF文件,参考GofViewer SDF一节。
5.2.5 Options 菜单
5.2.5.1 Increase Font Size增大字体
这命令增大原理图上的字体。
5.2.5.2 Decrease Font Size减小字体
这命令减小原理图上的字体。
5.2.5.3 Show Port显示端口名字
这选项控制端口名字显示。
5.2.5.4 Show Wire显示信号名字
这选项控制信号名字显示。
5.2.5.5 Show Title显示标题
这选项控制标题显示。
5.2.5.6 Show Type显示类型
这选项控制门类型显示。
5.2.5.7 Show Connections显示连接线
这选项控制连接线显示。
5.2.5.8 Show Comment显示注解
这选项控制注解显示。
5.2.5.9 Save String to Clipboard存储字符串到剪贴板
这选项使得信号线或Instance名字被鼠标左键点中时会被点亮,并且该字符串会被存储进剪贴板。
5.2.5.10 Cursor Mode光标正常模式
这是原理图的正常工作模式。
5.2.5.11 Line Edit Mode编辑连线模式
这模式使鼠标光标处于连线编辑模式,按住鼠标左键在一根直连线上,移动这根线会被鼠标拉动如橡皮筋一样,直到鼠标松开。
5.2.5.12 Setup设置
这命令弹出一个设置窗口用于工具设置。
5.2.6 Help 帮助菜单
5.2.6.1 General概述
普通帮助信息。
5.2.6.2 About 关于
关于Gates On the Fly.
5.2.6.3 nandigits.com/gof_manual_chinese.htm网上手册
浏览网上手册。
5.2.7 键盘快捷键
5.2.7.1 菜单快捷键
按住‘Alt’和菜单里的有下划的字母。
5.2.7.2 功能快捷键
- Ctrl-a:选中所有原理图上的物件
- Ctrl-c:拷贝选中的物件到剪贴板
- Ctrl-v:粘帖在剪贴板里的内容
- Ctrl-g:加载Instance到原理图
- Ctrl-w:写出到波形重建文件
- Ctrl-x:退出当前窗口
- Ctrl-digit:存储当前位置到该数字标识器里,在以后任何时候用户按对应数字时,原理图会移动到这数字对应的位置。
5.2.8 选中物件状态
当用鼠标左键点中任何在原理图上的物件,该物件可以是信号线,Instance或管脚,被点中的物件会被点亮。根据选中物件类型,GofTrace弹出菜单有不同的内容。按住鼠标左键在空白处,移动鼠标画一个长方体,在长方体中的多个物件就可被选中。
5.2.9 鼠标右键弹出菜单
点击鼠标右键在GofTrace原理图上,会弹出一个菜单,菜单内容根据选中物件类型而变化。
5.2.9.1 两信号逻辑等价检查
这命令需要加载Reference Netlist。
- Reference Netlist可用'-ref'选项在命令行中加载。例如,"gof -lib tsmc.lib implementation.v -ref reference.v"
- Reference Netlist也可用'read_design'加'-ref'选项在GofCall脚本中加载。例如,'read_design("-ref", "reference.v")'
点击鼠标左键在原理图上选中Implementation Netlist的一个Instance的管脚,按住'ctrl'键,点击鼠标左键选择Reference Netlist的一个Instance的管脚,这样一个Implementation Netlist的信号和一个Reference Netlist的信号被同时选中。
点击鼠标右键弹出菜单,选择"Equivalence Check for 'neta' vs 'netb'"命令。

图23 两信号逻辑点检查
当逻辑等价检查完成时,一个弹出窗口显示两信号是否等价,GOF会保存所有Instance的逻辑等价信息,当用鼠标中键展开原理图时,等价信息会以'GOF_enet###'显示在输出管脚下面,这样就把逻辑不等价调试变得很方便。例如,在上图中,Implementation Netlist的Instance 'u_mt_core.u_rtc3.Uinv0'是由手工Timing ECO出错而加入的,用GOF的此项功能就可显示该出错点跟参考点是反相的关系。
5.2.9.2 找出逻辑等价信号
在RTL语句中的组合逻辑信号名字往往会在综合中被优化掉,GOF有办法确定在Implementation Netlist中这些点是否存在,对应的信号名字是什么。这功能要求Reference Netlist保留需要找的信号名字,这种保留名字可由以下方式做到,
- 把要保留的信号名字加到输出端口中
- 用'preserve'或'dont_touch'命令在综合Constraint文件中
Reference Netlist应和Implementation Netlist一起加载,
- Reference Netlist可以命令行选项'-ref'加载。例如,"gof -lib tsmc.lib implementation.v -ref reference.v"
- Reference Netlist可用'read_design'加'-ref'选项,在GofCall脚本中加载。例如,'read_design("-ref", "reference.v")'
启动图形窗口,从Reference Netlist中把保留信号加到原理图中,点击鼠标右键弹出菜单窗口,选择'List Logic Equivalent Nets of …'命令。

图24 列出逻辑等价信号
一个弹出窗口显示和保留的信号逻辑等价或正好反相的所有信号。该弹出窗口支持弹出菜单,可以很容易地把对应信号加载到原理图中。

图25 逻辑等价的信号列表
这功能对手工ECO非常有用。在手工ECO中,如果用户要用到的组合逻辑信号已经被优化掉了,就可用这一功能定位对应的在Implementation Netlist中的等价信号。
5.2.9.3 找出两Instance之间的路径
当原理图上,两个或两个以上的Instance被选中时,鼠标右键弹出菜单就会有这一命令行。这命令用于发现两个Instance之间的组合逻辑路径。
5.2.9.4 添加注解
这命令添加注解到原理图上。
5.2.9.5 Find Gates on Schematic查找门元件
参考Find Gates on Schematic.
5.2.9.6 Find Nets on Schematic查找信号
参考Find Nets on Schematic.
5.2.9.7 Place & Route布局和布线
参考Place & Route.
5.2.9.8 Show Logic Cone显示逻辑锥
逻辑锥是在寄存器和端口之间的组合逻辑集合,参考以下的示意图。用户应选中图中输出寄存器(图26中的Output Flops)或其管脚来做逻辑锥生成。

图26逻辑锥
把整个逻辑锥画在原理图上。
把逻辑锥显示在文本窗口里。
5.2.9.9 Copy Selected to拷贝选中的内容到
这命令组是用于GofTrace窗口和LayoutViewer窗口间的互动。
拷贝选中的内容到新的原理图。
拷贝选中的内容到已存在的原理图编号。
拷贝选中的内容到一个新启动的LayoutViewer窗口,选中的电路会在LayoutViewer中被点亮。
拷贝选中的内容到已存在的LayoutViewer窗口编号。
5.2.9.10 Find selected in GofViewer在网表网表窗口中找到选中的Instance
这命令用于查找在GofViewer网表窗口里的对应Instance,找到的Instance会在网表文本窗口中被点亮。
5.2.9.11 Edit Gate编辑门元件
这命令会弹出窗口让用户加入或改变注释,或改变门显示的颜色。
5.2.9.12 List Logic for the Selected Leaf Cell列出选中的门的逻辑
这命令弹出文本窗口列出选中的门的逻辑。
5.2.9.13 List Context for the Selected Leaf Cell列出选中的Leaf元件在库中的详细信息
这命令弹出文本窗口详细列出选中的Leaf元件在库中的详细信息,内容包括Leaf元件的逻辑,面积,时序和管脚定义。
5.2.9.14 List Definition for the Selected Instance列出选中的Instance的定义
这命令弹出文本窗口列出选中的Instance的定义。
5.2.9.15 Load Instance Similar to the Selected Instance加载跟选中的Instance相近的
这命令会弹出一个输入窗口,粘帖当前选中的Instance在输入行中,用户可做稍微修改以加载相近的Instance到原理图上。
5.2.9.16 Equivalent Symbol等价门符号
这命令会改变选中的门的显示符号,换成由DeMorgan's Laws决定的等价的门符号。例如,NAND门是与输入反相的OR门等价。
5.2.9.17 Delete删除
这命令会删除在原理图上选中的物件,这些物件可以是Instance,信号线和注释。
5.3 GofECO 窗口
GofECO窗口使用GofTrace的窗口,但是使能了ECO功能。窗口的背景颜色变成缺省的淡蓝色,背景颜色可以用菜单设置Setup->GofECO->Color->BackGround。另外,ECO操作按钮会出现在工具栏里。GofECO使用和GofTrace相同的菜单,只是跟ECO有关的菜单在GofECO中被激活了。

图27 GofECO窗口
5.3.1 ECO菜单
5.3.1.1 使能ECO和ECO设置
这选项使能ECO模式,GofTrace会转换到GofECO,一个弹出窗口会出现让用户输入ECO设置。

图28 ECO设置
- ECO名字应是唯一的,这样就不会有名字冲突
- ECO注释部分是可选的,用户输入的注释会出现在ECO网表文件的开头。
- 选择按钮'Use Spares Only'和'Map Spare gates',输入行'Buffer Distance'是用于只做金属层ECO。三者的使用方式是:
- Use Spares Only'是指ECO时只能用spare-type的门,当这选项使能时,需要加载一个spare门列表文件。
- Map Spare Gates'是让GOF来映射任意的门到spare-type的门或直接的物理存在的spare instances。
- Buffer Distance'输入行是设置限度值,当连线长度超过某个限度时,需要加入缓冲(buffer)或中继(repeater)。输入一个很大的数,如9999999,可以禁止缓冲的加入。对应的脚本命令是'set_buffer_distance'。
5.3.1.2 Insert Gates添加门
这命令是用于添加门到选中的信号线中。在用这命令之前,需要在原理图上选中一条或多条连线。一个名叫'Gate selection'的弹出窗口会让用户选择适当的门类型和数目。当多个连线被选中,而且几个连线有相同的驱动器,用户可选择一个添加的门驱动所有连线,或一个添加到门前的一条连线。用户还需在'Specify pin connections'窗口中设置管脚的连接方法,用户可选缺省的管脚连接设置,然后在原理图上修改连接方式,以下的网页PDF文件指出了具体的使用方法
http://www.nandigits.com/use_cases/gof_insert_buffers_inverters.pdf
5.3.1.3 Replace Gates代替门
这命令把选中的Instance换成另一种类型,至少一个或多个Instance在原理图上被选中。当两个或以上Instance被选中,它们当前的类型必须一样。一个'Gate selection'弹出窗口让用户选择合适的门类型去置换选中的门,用户还需在'Specify pin connections'窗口中选择管脚的连接方式,管脚连接方式可以先用缺省设置,可在原理图上重新修改。
5.3.1.4 Add Gates增加门
这命令是在原理图上增加门,一个'Gate selection'弹出窗口让用户选择合适的门。当新的门出现在原理图上时,这个门的输出管脚启动一个新的信号,输入管脚全部悬空,该门所在的层次(Hierarchy)没有定义。当用户把这个新门的输入管脚接到别的已存在门的输出管脚,或把别的已存在门的悬空的输入管脚接到这个新门的输出管脚,这个新的ECO门会得到和连接的门一样的层次(Hierarchy)。更多信息参考Add Connection一节。
5.3.1.5 Delete Selected Items删除选中的物件
这命令删除选中的物件,用户若要删除多个物件会有警告窗口弹出。
5.3.1.6 Undo ECO Operations取消ECO操作
这命令取消上一次的ECO操作,每一次执行会取消上一次的ECO操作,直到没有ECO操作为止。
5.3.1.7 Add Connection增加连线
增加连线操作没有按钮或图标。增加连线怎能在输入管脚与输出管脚之间。用户在一个悬空的输入管脚按住鼠标中键,别放开,移动鼠标到要接到的Instance的输出管脚,放开鼠标,连线就产生了。
5.3.1.8 Save ECO存储ECO结果
这命令把ECO结果存储到一个文件上,支持的文件格式:
- Verilog网表
- GofCall脚本(Perl兼容语法)
- SOC Encounter ECO脚本
- TCL脚本for Synopsys
- DC脚本for Synopsys
5.3.2只做金属层ECO
只做金属层ECO只能动到金属层,GOF提供四种只做金属层ECO模式,这可由组合ECO preference的选项达到,有些模式需要加载DEF文件。
5.3.2.1 Metal ECO, mode 1 只做金属层模式1
用户可加任何类型的门,让GOF 把任意的门转换成spare-type的门元件,后端工具要把这些spare-type的门映射到网络存在的spare instances。
该模式设置:
- Spare门列表文件应当产生并加载
- 不要加载DEF文件
- 不要使能'Use Spares Only'
- 使能'Map Spare Gates'
参考只做金属层的实用案例1
http://www.nandigits.com/use_cases/gof_gui_metal_eco_mode_1.pdf
5.3.2.2 Metal ECO, mode 2 只做金属层模式2
用户可加任何类型的门,让GOF 把任意的门转换并映射到物理存在的spare instances。
该模式设置:
- Spare门列表文件应当产生并加载
- 加载DEF文件
- 不要使能'Use Spares Only'
- 使能'Map Spare Gates'
参考只做金属层的实用案例2
http://www.nandigits.com/use_cases/gof_gui_metal_eco_mode_2.pdf
5.3.2.3 Metal ECO, mode 3 只做金属层模式3
用户只能加spare-type的门元件,GOF会把spare-type门元件映射到物理存在的spare instances。
该模式设置:
- Spare门列表文件应当产生并加载
- 加载DEF文件
- 使能'Use Spares Only'
- 使能'Map Spare Gates'
参考只做金属层的实用案例3
http://www.nandigits.com/use_cases/gof_gui_metal_eco_mode_3.pdf
5.3.2.4 Metal ECO, mode 4 只做金属层模式4
用户只用物理存在的spare instances,并断开和连接所加的instances。
该模式设置:
- Spare门列表文件应当产生并加载
- 加载DEF文件
- 不要使能'Use Spares Only'
- 不要使能'Map Spare Gates'
参考只做金属层的实用案例4
http://www.nandigits.com/use_cases/gof_gui_metal_eco_mode_4.pdf
5.4 LayoutViewer布局显示窗口
LayoutViewer窗口用来显示局部的物理布局,在原理图上画的电路可以在LayoutViewer上被点亮。该窗口可与GofTrace原理图完全互动。这命令需要加载物理设计文件包括DEF和LEF文件。

图29 LayoutViewer布局显示窗口
5.4.1 File 文件菜单
5.4.1.1 Capture in PDF捕捉到PDF文件
这命令捕捉当前的布局显示到PDF文件,但PDF文件只在Linux系统中支持,在Windows系统中帮助的显示写出到PostScript格式文件。
5.4.1.2 Exit退出
退出LayoutViewer窗口
5.4.2 Commands 命令菜单
5.4.2.1 Clear Circuit Markers清除Circuit Markers
清除Circuit Markers,在图29中可看到Circuit Marker的形式,Circuit Markers是与GofTrace局部原理图互动中产生的。
5.4.2.2 Clear Search Markers清除Search Markers
Search Marker是与输入行中字符串匹配的Instance,这些Instance以不同颜色在LayoutViewer窗口中被点亮。
5.4.2.3 New Schematic新的原理图
当有Instance物件或Markers在LayoutViewer中被选中时,这命令可以启动一个新的原理图,并把选中的Instance显示在原理图上。
5.4.3 Options 选项菜单
5.4.3.1 Show Grid显示座标方格
这选项可控制座标方格的显示。
5.4.3.2 Show Instance显示Instance
在选项控制Instance名字的显示,必须要把LayoutViewer放大到某个程度,Instance名字才开始显示。
5.4.3.3 Show Module显示模块名字
在选项控制模块名字的显示,必须要把LayoutViewer放大到某个程度,模块名字才开始显示。
5.4.3.4 Setup设置
LayoutViewer窗口设置包括最大查找匹配数字和布局显示区大小。
5.4.4 Help 帮助菜单
5.4.4.1 Help on LayoutViewer
参考NanDigits网站,以找到LayoutViewer帮助内容。
5.4.5 LayoutViewer 弹出菜单
点击鼠标右键可弹出菜单。
5.4.5.1 Clear Circuit Markers清除Circuit Markers
清除Circuit Markers,在图29中可看到Circuit Marker的形式,Circuit Markers是与GofTrace局部原理图互动中产生的。
5.4.5.2 Clear Searching Markers清除Searching Markers
Search Marker是与输入行中字符串匹配的Instance,这些Instance以不同颜色在LayoutViewer窗口中被点亮.
5.4.5.3 Copy Selected to拷贝选中的到
这命令拷贝选中的门到以下接收处:
- 送回GofViewer网表窗口
- 到一个新的原理图
- 到一个有数字ID标识的原理图
5.4.6 键盘和鼠标组合
5.4.6.1 Ctrl键用于测量长度
按住'Ctrl'键并移动鼠标,光标坐标显示光标移动了多远,数字以'um'为单位。
5.4.6.2 Shift键用于选项多个标识(Marker)
按住'Shift'键,按下鼠标左键,移动鼠标画个虚拟的长方框,当松开鼠标左键,那些在长方框中的标识(Marker)会被点亮。这时,点击鼠标右键弹出菜单,那些选中的Instances可用'Copy Selected to'命令拷贝到别的原理图或GofViewer网表窗口。
5.4.7 鼠标操作
- 鼠标中间转键:向上可放大,向下可缩小LayoutViewer窗口内容显示
- 鼠标左键:点击可以选中Instance或标识,按住在LayoutViewer窗口上,可使布局图跟鼠标移动
- 鼠标中键:拖放(Drag-And-Drop)选中的Instances
- 鼠标右键:点击放开时可弹出菜单
5.4.8 选择颜色按钮
在'Select color:'栏中,按颜色按钮,该字符串变成对应颜色,任何新的Circuit Marker或Search Marker会用选中的颜色。
5.4.9 查找功能
键入字符串到查找输入行中,可以点亮LayoutViewer中匹配的Instances。查找的字符串是以'path/instance'的格式,通配符'*'可以用在'path'或'instance'中,匹配的Instance会用'Select color'栏中选中的颜色显示。
查找字符串用这些选项:
- -spare:当spare门列表文件被加载,spare门列表文件用-sparelist选项或get_spare_cells API来加载
- -type type-name: 只找那些与类型相同的Instance,如'nand'类型
- -hier:存在所有指定的分层下的Instances,如,'u_clk/* -hier'.
- -ref ref-name: 只找那些模块名字匹配的Instances,如,'NAND2X2'
例子:
'u_rtc/*':查找分层Instance 'u_rtc'下的Leaf Instance
'* -hier -type nand':查找所有的在本设计中,类型是'nand'的所有Leaf Instance
'u_clk/* -hier':查找所有的在分层'u_clk'及其子分层中的Leaf Instances
6 附录A
6.1GOF命令行选项
gof [options] netlists
options:
-h: Print out this info.
netlists: Load netlist. There can be multiple netlist files listed,
if the design has more than one netlist files.
-lib technology_library: Or '-synlib technoloty_library', Load in technology library (synthesis library)
which has parameters for leaf gates.
There can be multiple -lib options,
if the design has more than one technology library files.
-v simulation_library: Specify simulation library file name which has Verilog definition
for leaf gates, like AND2X4.
There can be multiple -v options, if the design has more than one simulation library.
Both -v and -lib options are for leaf gates definition.
But -lib can support more features, like logic cone extraction.
In some cases, some leaf cells don't have technology library,
simulation library is used instead to resolve the cells.
-v option can coexist with -lib option.
-vmacro macro_library_file: For ECO purpose. Each module in the file appears as leaf cell, and it can be
added like other leaf cell in ECO.
When write out ECO netlist, the file content appear in the beginning of ECO netlist. And the
ECO cell is added as a hierarchical sub-block.
-y library_directory: Specify library directory, one file corresponds to one leaf gate.
+libext+.v should be used with -y option.
+libext+.v: Specify library file extension in library directory.
it can be +libext+.v+.vg+.vlib,
if .vg and .vlib are also lib extensions.
-run script_file.pl: Invoke GofCall to run netlist processing script, GOF will stay in shell mode when the
script finishes.
-vn library_name: Specify none leaf gates library file. For example, a file has
collection of macro cell which is defined by leaf gates.
-yn library_directory: The files in the directory are not defining leaf gates.
-shell: Run in text mode with shell prompt, GofCall APIs can be run in interactive mode in shell
-o log_file: Save log file, default gatesof.log
-Top_1 netlist_files: Load another netlist files to build Top_1 tree. The hierarchy will shown up in left
side of GofViewer window.
You can use -Top_2 -Top_3 ... to load more netlist files.
Note, when this option takes all netlist files followed, so the main netlist files should appear
before this option
For example, 'gof -lib tsmc.lib revised_netlist1 revised_netlist2 -Top_1 golden_netlist1
golden_netlist2' will create two trees in the left side of GofViewer window.
Note: ‘gof -lib tsmc.lib -Top_1 golden_netlist1 golden_netlist2 revised_netlist1
revised_netlist2' will build only one tree, since Top_1 option eats up all of the netlist files, the main tree is gone.
+define+PARAMETER0+PARAMETER1: Define PARAMETER0 PARAMETER1.
-id mydesign: Specify design id will appear on tile. Optional.
-def def_file: Load DEF, design exchange format, file.
-lef lef_file: Load Library Exchange Format file
-pdef pdef_file: Load in pdef file.
There can be multiple -pdef options,
if the design has more than one pdef files.
DEF file is preferred if both DEF and PDEF files are available.
-gtech gtech_file: Load in gtech file for wire matching.
-sparelist spare_cells_list_file: Load in spare cells list file.
-f file_list_file: Load all the files and options in the file_list_file
-vcd vcd_file: Load in VCD file for schematic annotation
-textbutton: Text mode button instead of image mode button in ECO operations
-version: Print out current version
-licquery: Query license usage
6.2 命令行例子
gof -lib tsmc.lib soc.v
--- You have one netlist file 'soc.v' and one technology library, 'tsmc.lib'
gof -lib tsmc_std.lib -lib tsmc_io.lib top.v part0.v part1.v
--- You have three netlists, top.v, part0.v and part1.v, two technology library files
standard library cell, tsmc_std.lib, IO cells, tsmc_io.lib
gof -lib tsmc_std.lib -lib tsmc_io.lib -v analog_models.v top.v part0.v part1.v
--- Some analog cells having no technology library,
using '-v' option instead to load in analog simulation library
gof -lib tsmc_std.lib -lib tsmc_io.lib -vn macros.v -v analog_models.v top.v part0.v part1.v
--- macros.v has defined macro cells like sync-cells
gof -v /home/lib/tsmc_cells.v /home/netlist/soc.v
--- You would rather to use simulation library instead of technology library
gof -v /home/lib/tsmc_cells.v -v /home/lib/macro_cells.v +libext+.v -y /home/lib /home/netlist/top.v
/home/netlist/soc.v
--- Multiple simulation library files, and some leaf cells are defined in '/home/lib' directory,
which uses '-y' option to resolve them
gof -v /home/lib/tsmc_cells.v +libext+.v -y /home/lib -yn /home/vmodule /home/netlist/soc.v
--- '/home/vmodule' has some macro cells files
gof -v /home/lib/tsmc_cells.v /home/netlist/soc0.v /home/netlist/soc1.v -id the_soc_design
--- You would like to display 'the_soc_design' as the title
gof -lib tsmc.lib -def soc.def.gz -lef libcell.lef soc.v
--- Design Exchange Format file soc.def.gz. And library exchange format file. For layout view usage
gof -v /home/lib/tsmc_cells.v /home/netlist/soc.v -gtech soc_submod.gtech.gv
--- Load in gtech file for RTL wire to netlist mapping
gof -lib tsmc.lib soc.v -run scripts.pl
--- Process netlist with scripts.pl in text mode, scripts.pl is in perl syntax
gof -lib tsmc.lib revised_netlist.v -Top_1 golden_netlist.v
--- Load both revised netlist and golden netlist, it's good for netlist comparison
7 附录 B
7.1 致命错误码
F-000: License failed
F-001: Time out in adding ports in hierarchies
F-002: Empty ID for nets
F-003: Pin connections processing fatal error
F-004: Net id not defined
F-005: Net is not in EpHash
F-006: Instance has not been mapped position in AUTO ECO
F-007: Instance has no name mapping in AUTO ECO
F-008: No net found for ECO instance/pin
F-009: Unknown connection type of instance/pin in AUTO ECO
F-010: Net has no name mapping in AUTO ECO
F-011: Failed to initialize database
F-012: MCell get sub-chains error
F-013: No tree has been defined
F-014: No ID for leaf cell pin
F-015: Undefined subroutine in GofCall script
F-016: Global symbol requires explicit package name
F-017: Syntax Error
F-018: Illegal Division by zero
F-019: Bare word not allowed
F-020: Can't locate Perl module
F-021: File size too large for evaluation mode
F-022: Internal error in make miss
7.2 普通错误码
E-001: Reference netlist has not been loaded
E-002: DEF file has missing section
E-003: Command line needs an option for a switch
E-004: Liberty files have not been loaded
E-005: Library cell doesn't exist
E-006: Delete middle bit in a bus
E-007: Unknown command line option
E-008: Win32 doesn't support .gz file
E-009: DEF file doesn't have DIEAREA item
E-010: Files loading sequence
E-011: Instance or pin or port can't be found in module
E-012: Net doesn't exists in module
E-013: Tree name doesn't exist
E-014: Hierarchical module name doesn't exist
E-015: Miss argument
E-016: Module stack is empty, too many pop_top
E-017: 'instance/pin' has wrong format
E-018: Instance or module doesn't exist
E-019: Instance doesn't have pin
E-020: Item is a black box
E-021: Missing DEF file
E-022: No reference for instance
E-023: 'leaf/pin' doesn't exist
E-024: Power connection format is wrong
E-025: Spare cell pattern is not specified
E-026: Spare list file doesn't exist
E-027: 'get_spare_cells' run before 'map_spare_cells'
E-028: 'instance/pin' is floating
E-029: New instance conflicts with existing one
E-030: Specify leaf:num in more than one output leaf
E-031: Instance should be leaf in change_gate
E-032: Syntax error in pin mapping
E-033: The new gate type should be different from the old one in change_gate
E-034: Leaf cell doesn't exist in libraries
E-035: Net doesn't have a driver
E-036: Instance name has special character that the tool doesn't support
E-037: Wrong argument in ECO APIs
E-038: Net has multiple drivers
E-039: Not a port
E-040: New port conflicts with existing one
E-041: Single bit wire can't be expanded to a bus
E-042: New port direction conflicts with existing one
E-043: Commands loading sequence
E-044: Nets in one ECO command should be in the same hierarchy
E-045: Missing scan control pins
E-046: Reference netlist is not loaded
E-047: Fail to open file for write
E-048: Fail to open file for read
E-049: Unable to recognize file format
E-050: Command line option needs a value
E-051: Path doesn't exist
E-052: Leaf should have only one output pin
E-053: New net conflicts with existing one
E-054: Instance ECO result not consistent
E-056: Net has no driver
E-057: Net has invalid BDD
E-059: Not enough resource to run synthesis
E-060: Not valid patch file
E-061: No spare cell for one gate type
E-062: Output port is driven by input port
E-063: Reference register doesn't exist in implementation netlist
E-064: No inverter in the database
E-067: Should add instance into fix_logic argument
E-071: Port doesn't exist in hierarchical instance
E-072: Black box instance doesn't exist in implementation netlist in AUTO ECO
E-076: Spare cells list file has Wrong format
E-080: GOF_KEY_FILE variable has not been defined
E-081: Use '-run' to run Perl script
E-082: Gtech file doesn't exist
E-085: Syntax error in netlist
E-101: No hierarchical path is used
E-102: Interrupt GUI operation by user
E-103: 'read_def' should be run before 'get_spare_cells'
E-105: Load specific file without the right option
E-106: Source ID can't be deleted
E-109: Found combinational loop
E-110: Implementation Netlist has not been loaded
E-112: Can't find pin direction
7.3 警告码
W-001: Bypass already loaded file
W-002: DEF has some section missing
W-003: DEF has module not resolved
W-004: No ECO pin specified for ECO instance
W-005: Not enough spare cells
W-006: DEF file not loaded
W-007: Leaf cell doesn't have timing table
W-023: 'leaf/pin' doesn't exist
W-028: 'instance/pin' is floating
W-038: Net has multiple drivers
W-054: Instance ECO result not consistent
W-055: Net ECO result not consistent
W-056: Net is not driven
W-060: Invalid patch file
W-061: No spare cell for one gate type
W-065: Tie floating input pin to zero
W-066: New port created in AUTO ECO
W-068: Hierarchical cell is created in AUTO ECO
W-069: Set don't touch Warning
W-070: Can't find repeaters
W-073: 'instance/pin' is inverted but being forced to be equal by user
W-074: 'instance/pin' is forced to be inverted by user
W-075: Net returned wrong BDD
W-077: No size information for a leaf
W-078: Module is redefined
W-079: Instance can't be resolved in GTECH
W-080: Leaf cell can't be resolved in module
W-083: Can't read MAC Address
W-084: Sub-module can't be resolved
W-086: Include file doesn't exist
W-087: Bit-width mismatch in instantiation
W-088: Zero fanin endpoint
W-089: Can't find ECO instance position
W-090: Empty instance name in patch file
W-091: ECO net has no fanout
W-092: New input port created and needs to be connected
W-093: New ID created for end point
W-094: Can't detect port phase in module
W-095: Port or net is forced to be equal by user
W-096: Port and net has mismatching bit-width
W-097: Schematic only feature
W-098: Force to use 1'b0/1'b1 in AUTO ECO
W-099: Can't fix timing, since lacking valid points
W-100: No lib name for a leaf cell
W-104: Module is defined as leaf cell but has definition in the netlist
W-107: Module is set as a leaf by user
W-108: Module is not uniquified
W-111: No need to set path prefix
W-112: Can't find pin direction
W-113: Different types of flops in IMP and REF
7.4 图形警告码
GW-001: Don't connect net to a new created connector
GW-002: Don't connect two ECO connectors
GW-003: Don't drive an output port by a cell in different hierarchy in ECO
GW-004: Forward trace a port's driver before insertion
GW-005: Net doesn't exist in design
GW-006: Can't load cell to schematic
GW-007: Trace output pin before delete the gate
GW-008: Can't delete a gate which drives an output port
GW-009: Can't delete a wire which drives an output port
GW-010: Need select a gate to do a operation
GW-011: Can't change ECO gate size
GW-012: No larger size gate in library
GW-013: No smaller size gate in library
GW-014: Connect other side of ECO port first
GW-015: Path is not allowed in port connection
GW-016: Can't disable ECO mode
GW-017: No more ECO operations in undo
GW-018: Need select a pin to do listing endpoints