DC NXT 库和设计对象介绍

发布时间 2023-05-20 18:04:07作者: luckylan

physical synthesis 

物理综合概念

三种启动方式

dcnxt_shell -topographical_mode   #交互式命令行

dcnxt_shell -topo -gui                       #图形界面

dcnxt_shell -topo -f  RUN.tcl | tee -i RUN.log        #批处理模式

物理综合就是将RTL综合为coarse-placement netlist网表;这需要让DC工作在TOPO mode' 并使用compile_ultra 命令;

需要一个布局文件,一般是由物理设计布局工具例如ICC(icc ii design planning)生成的;

TOPO mode'下的DC-NXT执行粗略布局(coarse-placement ),并在综合过程中使用虚拟布线来估计net线长度

RCs的计算基于合理的net长度估计(而不是扇出fanout)

生成的RCs与布局后的结果关联更紧密→网表更好的优化

ICC II可以将placement作为一个起点->减少ICC Il布局运行时间并改进时序拥堵

建议采用两个阶段(预布局、后布局图)综合流程

layout工具(ICC-II-DP)使用第一个网表(pre-floorplan)来设计floorplan

placeandroutepost-floorplannetlist(基于ICC II DP的floorplan)

DC NTX in topological  mode 使用virtual routing 去估计net的长度; virtual routing 使用 Manhattan distance估计两个pin之间的线网的长度;

Virtual routing ( VR ) uses Manhattan 距离来估计connected pins之间的net长度。VR不知道拥塞或route阻塞,也不知道net最终将布线到哪个金属层。

VR用于估计net长度,默认情况下,DC NXT使用所有可用布线层的平均电阻和电容

开始 DC NXT, the GUI interface 提供了学习DC NXT命令和流程的环境. 大部分使用的命令都在下拉菜单中。也可以通过运行脚本和约束文件进行编译。利用batch mode执行综合是很方便的

综合过程

GTECH 元件没有时序或者负载特性,只能被DC NXT使用。

write_icc2_files 命令被用于以ASCII 文件的格式写出所有要求的数据(网表,约束,UPF,floorplan,placement,scanchains)

由RTL设计综合为网表的过程包括:加载RTL设计和逻辑库

加载物理库和technology data 包括: physical 或 layout library (ndm directories) technology routing layer definition file (tf file) RC modeling files (TLUplus & map files)

加载布局的信息; TCL的物理约束或者来自ICCII的DEF文件

所以整个NXT topo mode flow的输入包括: RTL design .v文件,design constraints 设计约束文件,db库文件,物理库文件 ,floorplan的DEF文件

综合流程

查找文件的位置和/或名称:pwd;cd;ls

显示输入命令的历史记录: history

重复上一个命令:!!

执行历史列表中的第7个命令:dcnxt_shell -topo>!7

执行上一个报告命令:>!rep

执行任何UNIX命令: sh<UNIX_command>

获取任何UNIX变量值:get_unix_variable<UNIX_env_variable>

Use cd very carefully, because you will change the relative starting point (.) for your directory search_path.Bydefault".", the current working directory, is set to the directory in which you invoked DC NXT(Shell or GUI)

完成本单元后,您应该能够为拓扑模式下的物理综合准备一个设计,包括加载要综合的RTL设计(Verilog/System Verilog/VHDL RTL files)和逻辑库Logic libraries文件(.db file)

加载物理库和技术数据物理或布局库(NDM目录技术或路由层定义文件(tf文件)RC建模文件(Tluplus地图文件)从ICC加载平面图数据TCL物理约束或DEF文件

DC-NXT需要在读取RTL代码之前读取所有逻辑和物理库以及技术数据,但是,出于培训目的,物理库和技术数据的加载将在RTL之后进行讲解。

 加载库

and、or、inv等cell area timing function

例化的memory,无需优化,

IP library:直接读取db,无需优化

technology library source是一个ASCII文件(.lib file),由SynopsysLibrary Compiler编译以创建编译的二进制版本(. db file)

使用以下命令列出从默认设置修改的应用程序变量:

get_app_var-list-only_changed_vars *

reference 是在设计中例化的任何gate,blovkorsub-design

object : designs 和librarycells

顶层为design.v,design.v下面有A.v和B.v还有memory.v, *代表A.v和B.v等subdesign,在DC NXT内存中找完这些subdesign后,去library中找IP或者ram.db等硬核db文件,

Link Library:用于链接设计:解析RTL设计或门级网表中的实例化引用,首先在DC NXT内存中查找匹配的designname(RTL中的module或entity)

然后在列出的库中查找匹配的librarycellname

在linkdesign之前,需指定standardcell和IP logiclibrary名字(*应始终首先给出)

要显示linklibrary变量的值,可以用printvar_link_library命令

TCL:{…}被视为“硬引号”:不执行变量替换或表达式计算。大括号将不起作用,因为target_library变量的值将不会被替换。link_library将被直接设置为字符串:*$target library..

*libs/20nm_wc.db  …

TCL:变量替换语法:$varname。变量名称可以是字母、数字、下划线:a-zA-Z0-9

变量不需要声明:所有类型都是任意长度的“string”。替换可以发生在一个词中的任何地方:

将搜索目录添加到默认列表-而不是覆盖重写:set_app_var search_path "$search_path \

mapped libs cons”

退出dc变成default值

首先source1,然后是2,最后是3,所以如果把3的修改了,执行完3会把1,2的内容覆盖

CWD=current working directory:当前工作目录,后面将使用这个首字母缩略词来表示调用DC NXT会话的UNIX目录。安装路径下的启动文件:不要修改

用户工作目录下的启动文件:

 读设计

直接TOP.v是因为已经把TOP.v的路径添加到了搜索路径中

sverilog是可以支持2005版本的verilog版本代码的,如果写的verilog代码是2005标准的,-format那里用sverilog,就既可以读取verilog代码,又可以读取sverilog代码

+libext+.v:搜索读取文件扩展名为.v的文件

analyze:读取源代码文件(Verilog或VHDL RTL)

检查语法并发出错误/警告

将Verilog和VHDL文件转换为中间二进制格式的文件,默认情况下放置在当前工作目录(CWD)中.

define_design_lib WORK -path "work"

 

analyze命令创建许多中间文件。这些文件存储在由applocation carriable “WORK”控制的目录中,work变量默认为CWD,从而在CWD中造成混乱。利用命令:define_design_lib WORK -path./work  

analyze -f verilog  TOP.v 将这些文件重定向,使得CWD更干净。

也在analysis过程中指定单个库名称,

define_design_lib-path ./ mid

define_design_lib BOT  - path ./bot

analyze - format sverilog -library BOT bot .sv

analyze - format sverilog-library MID mid.sv

elaborate可以做隐性的link操作

currentdesign可以指定topdesign

elaborate加入-parameter选项,可以改变parameter值

elaborate is the only way to change parameter values while reading in a design

In older DC scripts , one may find the following commands used to read in the RTL code:

read_verilog A.v   read_sverilog  “B.SV  TOP.sv”

current design Top ; #elaborate command does this automatically

link

For backward compatibility reasons , these commands are still supported but not recommended . The analyze +elaborate commands are much more flexible , future proof and are recommended for reading of RTL codes.

Example : The read vhdl command ignores configurations while analyze + elaborate does not

There is one exception to this recommendation : If one is reading a mapped netlist ( not RTL ) , then theread verilog command can be used

Please see appendix for example of the older read commands

elaborate后推荐做显性的link操作,如果link返回值为0,说明link操作存在错误。

“link”命令的目的是定位当前设计中引用的所有design和library components,并将它们连接(link)到当前设计。如果“link”命令无法完全link the design,则返回0值,大多数check_,report_,compile and optimization命令将执行隐式link,因此严格来说,没有必要执行显式link。但是,推荐执行,如果设计有link问题,您将能够明确地找到问题并在执行report或compile之前纠正它。另一方面,隐式link期间的link问题不会中止该命令,因此可能会compile或report不完整的设计。

 

elaborate后推荐用check_design ,检查代码问题, check design命令与link命令一样,返回一个“1”或“0”值,分别指示操作是在没有或有任何严重问题的情况下完成的

sourcecons之前存一个ddc文件,下次可以直接从unmapped.ddc文件开始,如果像写出完整的ddc/Verilog 代码,加hierarchy,

保存分层设计有两种方法:在这两个示例中,current_design都是MY_TOP

一个包含整个设计层次结构的文件:write_file-format ddc-hier-out unmapped/MY_TOP.ddc

包含部分设计层次结构的单个文件:write_file -format ddc-out MY_TOP.ddc(默认情况下写入current_design)

write_file -format ddc MY_A -out MY_A.ddc

write_file -format ddc MY_B -out MY_B.ddc

原始RTL代码更新后,需要重新读取RTL并重新保存ddc文件 

物理综合中,remove_design 也会移掉compileplacement信息

remove_sdc

globalvariable如applicationvariable是不存在ddc中的,在退出dc后被遗失,ICC II 不支持读ddc格式文件 write_environment  -option environment_only只写出环境变量settiong

Verilog netlist输出文件用于第三方工具,例如: Place & Route or simulator。这些第三方工具可能在netlist内存在字符限制。因此,在写出netlist之前,有必要调用更改名称命令。write_icc_files命令为当前设计写出ASCII格式设计文件和TCL scripts用于写入ICCII。文件被写入到由-output选项指定的目录中,这些文件包括:

verilog格式的Netlist,Tcl floorplan和DEF files,

SCANDEF格式的Scan chain信息,SDC 格式的约束

libscons new_20nm_wc.db   * old_45nm_wc.db(老工艺的library把netlist的cell名字link起来)

new.con  * new_20nm_wc.db

退出dc,重新读ddc文件的话,需要设置新的link_library,即最后一行的设置。

在上面的例子中,旧的NETL.v被假定为只有一个顶层模块的flat design。进一步假设原始RTL代码不可用,否则最好从RTL重新编译,而不是从gate level netlist重新编译

注意:只要compile后不退出DC NXT,就不必更改link library变量。DC NXTmemory中的mapped design已link到新的technology library,因此,任何后续的设计分析都将使用新的库特征。

但是,一旦退出DC NXT,后续重新调用DC NXT以读入并分析新的netlist,则需要首先将新的technology library指定为linklibrary。

1.T 2.F(通过*在DC-NXT内存中找 ),它首先在DC NXT内存中查找匹配的设计,然后在列出的link_library中查找匹配的cell

3.F,只有退出DC 才需要重新applied,读取新的设计时,如果变量设置保持不变,假设正在读取的新设计使用与之前设计相同的库,不需要重新应用库变量,但是,当重新启动DC时,变量设置将恢复为其默认值,变量不会与设计一起保存,需要重新应用库变量。

 

4.如果用户拼错了application variable,set命令不会发出任何警告。它只是用指定的值创建一个新的“userdefined”变量。另一方面,set_app_variable发出一条错误消息,通知用户这不是application variable,然后创建一个用户定义的变量

5。C、E和H:

C和H在相应的“physical”cell library(NDM format)中定义,

E,设计规则检查“如最小间距、宽度、间距等”在“technology file”中定义。

加载物理库

topo模式下粗略摆放cell,利用virtualrouting计算netdelay,milkway和ndm(physicalcelllibrary)是提供cellframeview信息的物理综合,给出cell的大致框架,和cell的pin的location,通过cellpin的位置,就可以进行pin之间的连线,进而根据virtualrouting计算netdelay

NDM cell libraries”或CLIB包含frame视图和timingciew。frame view包含物理拓扑信息,定timing view包含最初在dblogic libraries中定义的所有信息,其中包括logic definition以及timing , power和其他characterization data

“Frame NDM库”仅包含frame views

DC NXT接受NDM格式库、frameNDM或CLIB,但DC NXT仅使用frameviewdata。如果向DC NXT提供了CLIB。还必须向DC NXT提供.db logic libraries,以便工具访问referencecell logic/timing data.

NDM由vender提供 technologyfile提供 physical DRC rule

Standard celllibraries描述了基本组合逻辑和时序逻辑门,如:inverters,nors,buffers,muxes,latches ors,flip-flops

除了Standard cell的physical libraries外,设计中使用的任何macro cells or IP block都需要physical libraries,如RAM、ROM和其他预先设计的标准复杂块。

DC NXT使用与ICC Il相同的NDM格式,:ICC使用另一种称为milkyway的physical library。

ROUTING direction必须在指定currentdesign后指定。

布线方向和trackoffset不取决于technology,而是取决于physical standard celllibraries。单元设计者以某种方式设计单元,并决定如何布线以实现thehighest yields

TLUPlus是存储RC系数的二进制表格式。 TLUPlus模型通过包括宽度,空间,密度和温度对电阻系数的影响,可以实现精确的RC提取结果。

UDSM : Ultra Deep Submicron

上面显示的数据是TLUplus文件顶部的示例,实际的TLUplus数据是二进制的,由ASCII“Interconnect Technology Format”(ITF)文件编译而成。上面显示的注释结构包含在ITF文件中。

ITF文件包含有关该technology的物理特性(层厚度、电介质等)的信息

Synopsys的RC提取工具(StarRC)用于“编译”ITF,并将数据转换为电容和电阻模型,这些模型被写成TLUplus文件。理想情况下,TLUplus数据应可从foundry或ASIC供应商处获得。或者,如果工具的license可用,用户可以执行“ITF到tluplus”转换。有关UDSM工艺效果建模的更多信息,参阅“StarRC用户指南”(在线文档)的“process Characterization Interface”部分

physicalcelllibrary并不在designlibrary中,但designlibrary含有指向physicalcelllibrary位置的pointer,但designlibrary包含technologyfile。

physical cell libraries ( standard cell macro cell or IP libraries ) , 以及technology file 都由工艺厂商提供。

指向physical cell libraries的箭头为虚线,表示physical libraries并未包含在designlibrary中,相反,design library contains " pointers " to the libraries。

check_library 需要library_compiler dc license

加载floorplan data

netlist和floorplan谁先产生的问题

ICC II DP:ICC II designplanning

上面的流程假设在执行初始综合时RTL代码是相当完整的。如果RTL包含相当数量的“黑匣子”(即未定义的部分)随着RTL代码的固化,您可能需要执行额外的设计规划和综合迭代。

ICC II placement ( place_opt 命令)执行以下五个步骤:

1 . initial placement:performs wire-length driven coarse placement and scan chain reordering

2 . High fanout net buffering : Removes buffer trees , performs high fanout synthesis and logic DRC fixing

3.Initial optimization : Performs quick timing optimization

4 . Final placement : Performs incremental and final timing-driven placement to improve timing and routability( global routing used for congestion removal )

5 . Final optimization : Performs final full-scale optimization and legalizes the design

SPG placement skips stages 1 and 2 . It start with stage 3 using the coarse placement from DC NXT as a starting。

The above flow assumes that the RTL code is fairly complete when performing the initial synthesis . If the RTL contains a fair number of " black boxes " (undefined sections ) you may need to perform additional iterations of design planning and synthesis , as the RTL code is solidified。

sdf,主要记录celldelay,用于反标和仿真

左边工具自己自动约束standardcellmacropin摆放的floorplan,右边经过调整添加floorplan约束后的摆放的floorplan,MACRO放在core的周围

不同physical约束对 RC interconnect计算有很大区别

(整个core的area减去blockage的area减去macrocell的area)/totalstandardcellarea

blockage的area:某个位置不允许摆放任何cell。

pad起连接作用,IO pad是一个芯片管脚处理模块,即可以将芯片管脚的信号经过处理送给芯片内部,又可以将芯片内部输出的信号经过处理送到芯片管脚;diearea为深绿色部分

 

floorplantcl文件有一些信息无法记录在def文件中

floorplan_dc是用户定义的文件名,用户在ICC II中通过write_floorplan -output <dir_name>指定。floorplan.tcl是由write_floorplan创建的默认文件。

design planning=创建一个floorplan的迭代过程,DEF=design exchange format

DC NXT支持DEF版本到5.8。extract_physical_constraints命令忽略DEF文件中的无关信息。导入的物理约束列表可以在man page中找到.

ICC II使用write_floorplan命令写出floorplan数据,该命令会自动创建一个DEF文件、和提供补充信息的floorplan.tcl文件。以下ICC II floorplan命令、命令选项和设置未保存在DEF中,因此如果使用,则必须包含在补充的Tcl文件中,以便通过read_floorplan在DC NXT中读取。

注:DC-NXT理解ICC格式命令;当ICC II语法不同于ICC(标记如下)时,ICC II命令必须转换为ICC格式,DCNXT了解的格式是:

create_voltage_area
create_rp_group
create_bounds -dimension
create_placement_blockage-no register | -no rp group | -no_pin | -buffer_only | -no_hard_macro create_placement_blockage - type ( ICC II )
set_ignored_layers
set_app_var placer_max_cell_density_threshold (ICC/DC NXT )
set_app_options -name place.coarse.maxdensity ( ICC II )

Physical constraints

set_aspect_ratio
set_utilization
create_die_area
create site_row
set_port_side create_terminal
set_cell_location
create_placement_blockage
create_voltage_area create_bounds
create_route_guide
create_net_shape
create_user_shape set_pin_physical_constraints
create_pin_guide
create_via_master create_via
create_track
set_keepout_margin
compute_polygons

 

推荐创建一个记录变量的common_setup.tcl

link_library:例如在design中例化了mem.v,dc就会在MEM.db、

 

design和library object

存在module和endmodule结构的就是design

U1,U2,U3:cell名字,ENCODER,INVX1,REGFILE 为reference name,

INVX1不能称之为design,由于没有module和endmodule RTL结构,直接例化的targetlibrarycell的leafcell,称之为referencename

如果在get_cells 加-hier,就可以得到subdesign的cell

PORT 最顶层的IO信号

get_command

wildcards:通配符

 

加-hier :”/”不作为层次的划分;不加-hier :”/” d作为层次的划分

get_cells - hierarchical returns leaf and hierarchy cells with the name attribute matching the patternat all levels of hierarchy : get_cells - hierarchical *mux*

leaf_clk_muxHIER1/leaf_mux_sel _reg[0]…[3]HIER1/HIER2/leaf_mux_dq

HIER/HIER2_mux

to return only_leaf_cells : get_cells -hierarchical *mux* -filter !is_hierarchical

leaf_clk_mux HIER1/leaf_mux_sel _reg[0]…[3]HIER1/HIER2/leaf_mux_dq

To return cells that are at a particular hierarchy

get_cells HIER1/ *mux*

HIER1/leaf_mux_sel_reg [0]…[3]HIER1/HIER2 mux

获取library内容

1.TOP REGFILE ENCODER PLL

2.ZOUT[0],ZOUT[1]

3.20nm的library,gtech库文件名字,standard.sldb库文件名字

4.get_lib_cells 20nm.db/INV*

5.get_cells -hier  *_* :I_ENC  I_REG  Z_reg

6. get_pins  */Q*  Q0,Q1 Q[0],Q[1]

7.get_pins I_REG/*/Q  (写cellname I_REG)

all command

一些更有用的all命令:a1l_ideal_nets;all_fanin;all_fanout;all_connected;all_dont_touch

all_high_fanout;查找更多all_*命令: help all_*

  1. A,B,C,D,CLK
  2. ZOUT[0],ZOUT[1]
  3. I_REG/Z_reg[0],I_REG/Z_reg[1]
  4. error

使用filter_collection命令获取您感兴趣的objects,

filter_collection [ get_cells *] “ref_name = ~ AN*”filter_collection [ get_cells *] “is_mapped!= true”

The-filter option is a nice short-cut:

get_cells * -filter “don’t_touch = = true”

get fastclks [get_clocks * -filter “period<10”]

 

filter_collection 创建一个新的集合,如果没有一个objects匹配这个表达式,则创建一个空的字符串。-fiiter选项更有效,因为集合不必读取两次

get_cells -hier  - filter " is_unmapped ! = true”

get_cells - hier -filter " is_hierarchical === true”

 

 collection

 

 

1.2 约束

 

 

 

 

6.bc  a:应该是virtulrouting

7. ndmfile:cell的物理信息,cell形状大小,

8.:ba:应该是在tf文件中的

 

9.T:

10. F, logic DRC 在logiclibrary中

11.prefloorplan:只知道macrocore摆放位置,时

已经在后端得到真正的floorplan信息用DEF、floorplan -tcl文件