酒店网站的建设竞价推广账户托管费用
相关阅读
Design Compilerhttps://blog.csdn.net/weixin_45791458/category_12738116.html?spm=1001.2014.3001.5482
前言
默认情况下,Design Compiler在综合时不会跨越层次结构进行优化,这会导致一些关键路径的逻辑无法得到简化。边界优化(Boundary Optimization)技术允许在保留层次结构的同时,跨设计层次进行优化,本文就将对此进行讨论。
边界优化的分类
跨层次结构常量传播
如上图所示:当不使用边界优化时,Design Compiler无法使用通过引脚传播的常量信息对子设计中的逻辑进行优化;而使用边界优化时,通过引脚传播的常量信息将被用于优化逻辑,但常量引脚还是被保留了。
跨层次结构等价与反向等价信息传播
如上图所示:当不使用边界优化时,Design Compiler无法识别引脚之间的等价与反向等价关系从而对子设计中的逻辑进行优化;而使用边界优化时,引脚之间的等价与反向等价将被用于优化逻辑,但引脚还是被保留了。
跨层次结构未连接(不可读)信息传播
如上图所示:当不使用边界优化时,Design Compiler无法识别未连接的输入/输出引脚从而对子设计中的冗余逻辑进行优化;而使用边界优化时,与未连接的输入/输出引脚连接的冗余逻辑将被消除,但引脚还是被保留了。
跨层次结构相位反转
如上图所示:当不使用边界优化时,Design Compiler无法识别跨层次结构的反相器对从而对子设计中的逻辑进行优化;而使用边界优化时,反相器将可以被移动并穿越层次结构并进行优化。
控制边界优化
允许边界优化
1、使用compile_ultra命令,边界优化是自动开启的。
2、使用compile -boundary_optimization命令。
3、使用compile命令前使用set_boundary_optimization命令将需要进行边界优化的单元或设计的boundary_optimization属性设置为true。
4、使用compile_ultra -no_boundary_optimization命令,但使用set_boundary_optimization命令将需要进行边界优化的单元或设计的boundary_optimization属性设置为true。
注意:set_boundary_optimization属性优先级高于compile_ultra命令的-no_boundary_optimization选项。
禁止边界优化
1、使用compile_ultra -no_boundary_optimization命令。
2、使用compile命令。
3、使用compile -boundary_optimization命令前使用set_boundary_optimization命令将需要禁止边界优化的单元或设计的boundary_optimization属性设置为false。
4、使用compile_ultra命令前使用set_boundary_optimization命令将需要禁止边界优化的单元或设计的boundary_optimization属性设置为false。
5、使用compile_ultra命令前使用set_compile_directives命令将需要禁止边界优化的引脚、单元或设计的相应属性设置为false。
对于禁止“跨层次结构常量传播”的特殊处理
使用compile命令时
使用compile -boundary_optimization命令前使用set_boundary_optimization命令将需要禁止边界优化的单元或设计的boundary_optimization属性设置为false只能阻止常量从父设计传播到子设计,而子设计的常量还是能传播到父设计,如果想禁止所有情况的常量传播,需要将compile_preserve_subdesign_interfaces变量设置为true(默认为false),如下图所示。
使用compile_ultra命令时
使用compile_ultra -no_boundary_optimization命令或使用compile_ultra命令前使用set_boundary_optimization命令将需要禁止边界优化的单元或设计的boundary_optimization属性设置为false不足以禁止常量传播,需要将compile_enable_constant_propagation_with_no_boundary_opt变量设置为false(默认为true)。
在上面两种情况下,Design Compiler在综合时会提示以下信息。
Information: Starting from 2013.12 release, constant propagation is enabled even when boundary optimization is disabled. (OPT-1318)
举例说明
跨层次结构常量传播
module top_module (input wire a,input wire c,output wire out
);wire b = 0;logic_circuit uut (.a(a),.b(b),.c(c),.out(out));endmodulemodule logic_circuit (input wire a,input wire b,input wire c,output wire out
);assign out = ((a | b) & c);endmodule
图1为RTL代码的GTECH表示,图2为不使用边界优化的结果,图3为使用边界优化的结果。
图1 未综合网表
图2 不使用边界优化的结果
图3 使用边界优化的结果
跨层次结构等价与反向等价信息传播
module top_module (input wire a,input wire b,input wire c,output wire out
);wire d = !a;logic_circuit uut (.a(a),.b(b),.c(c),.d(d),.out(out));endmodulemodule logic_circuit (input wire a,input wire b,input wire c,input wire d,output wire out
);assign out = ((!a & b) | (c & d));endmodule
图4为RTL代码的GTECH表示,图5为不使用边界优化的结果,图6为使用边界优化的结果。
图4 未综合网表
图5 不使用边界优化的结果
图6 使用边界优化的结果
跨层次结构未连接(不可读)信息传播
module top_module (input wire a,input wire b,input wire c,output wire out
);logic_circuit uut (.a(a),.b(b),.c(c),.out1(),.out2(out));endmodulemodule logic_circuit (input wire a,input wire b,input wire c,output wire out1,output wire out2,
);assign out1 = (a & c) | b;assign out2 = (a | b) & c;endmodule
图7为RTL代码的GTECH表示,图8为不使用边界优化的结果,图9为使用边界优化的结果。
图7 未综合网表
图8 不使用边界优化的结果
图9 使用边界优化的结果
跨层次结构相位反转
module top_module (input wire clk,input wire rst,input wire In1,output wire out
);wire D, Q, QB;D_flip_flop dff (.clk(clk),.rst(rst),.D(In1),.Q(Q),.QB(QB));logic_gate lg (.Q(Q),.out(out));endmodulemodule D_flip_flop (input wire clk,input wire rst,input wire D,output reg Q,output wire QB
);assign QB = ~Q;always @(posedge clk or posedge rst) beginif (rst)Q <= 0;elseQ <= D;endendmodulemodule logic_gate (input wire Q,output wire out
);assign out = !Q;endmodule
图10为RTL代码的GTECH表示,图11为不使用边界优化的结果,图12为使用边界优化的结果。
图10 未综合网表
图11 不使用边界优化的结果
图12 使用边界优化的结果