2013年10月13日星期日

congestion related command

1.

set_congestion_options
-max_util valueMT7505: 0.85
设置最大的std cell placement密度,防止placement密度太大导致congestion


2.
placer_max_cell_density_threshold
set placer_max_cell_density_threshold valueMT7505: 0.8
设一个整体design的std cell大概的密度值,来防止placement过于松散,也防止wire太长导致的timing边长
manual:
For placement that is not set up for congestion removal, you can control how densely cells
can be packed by using the placer_max_cell_density_threshold variableYou can set this variable to a value between 1 and the overall average utilization of your design.Choosing a value near one allows cells to clump together more densely. A value of one allows no gaps between cells. You should choose a high value for designs with low utilization to improve timing and a low value for congested designs to avoid cell clumping. By default, this variable is set to -1 to disable this feature.


3.set_app_var placer_reduce_high_density_regions true (MTK未用到)
用来优化channels & around macros这些容易出现congestion的high_density_regions 的std cell density。该variable的使用会增长place_opt, place_opt_feasibility, create_placement, refine_placement, psynopt -congestion, or clock_opt 这些 placement-based command 的 running time (比如 coarse placement runtime 会double)




2013年10月11日星期五

Synopsys基于UPF的低功耗设计流程

http://www.synopsys.com.cn/information/snug/2009/low-power-implementation-flow-based-ieee1801-upf

2.1 Synopsys基于UPF的低功耗设计流程

Synopsys公司提供了完整的基于UPF的低功耗综合、物理实现和验证流程,如图7所示。该流程始于寄存器传输级(RTL)描述的逻辑设计,加上一个独立的描述低功耗设计意图的UPF文件。RTL和UPF描述分别放在独立的文件中,使他们可以单独维护和修改。在这个示例中,最初的UPF文件标志为UPF。
Design Compiler读入RTL和初始UPF描述文件,基于它们综合出门级网表并产生一个更新了的UPF文件,这个Design Compiler输出的UPF文件在示例图中标志为UPF’。UPF’文件中包含了原始UPF文件的内容,并添加了综合时加入的对某些特殊cell(比如isolation cells、level shifters)的电源和地的连接关系。综合输出的门级网表已经被工具根据UPF的相应描述插入了一些低功耗所需的特殊电路单元,比如Level-Shifter,Isolation cells,Retention Register等。
IC Compiler读入综合输出的门级网表和UPF’描述文件,基于它们进行物理实现,包括:布局和布线以及电源关断特殊单元(Power-Gating cell)的插入、摆放和控制信号线的连接等步骤。输出一个新的门级网表,一个包括所有cell的电源和地连接关系的网表(俗称pg网表),以及一个更新了的UPF文件,标志为UPF’’。UPF’’文件包含了UPF’的内容,并添加了在物理实现阶段对低功耗电路结构的改变,比如添加了Power Switches(俗称MTCMOS)的连接关系。
这个flow中产生的数据可以用于做功能仿真(利用MVSIM、VCS),插入的低功耗单元的正确性检查(利用MVRC),形式验证(利用Formality),以及时序功耗检查(利用Prime Time-PX)和电压降(IR-Drop)(利用Prime Rail)的验证。
VCS仿真器和MVSIM多电压仿真工具可以在几个阶段用来做多电压的功能仿真:RTL级,综合后加入了低功耗相关器件(比如Isolation cell)的门级,以及PR之后加入了Power Switches的门级。MVRC用于检查多电压设计的规则是否正确实现,包括电源连接关系、电源结构、电源一致性等等,也适用于流程中的各个步骤。
Prime Time读入DC或ICC输出的门级网表以及对应的UPF文件。它利用UPF文件中的信息建立一个虚拟的电源网络模型,并将电压值反标到每个器件的电源端口,进行带电源信息的时序检查。
Prime Rail是基于带UPF信息的版图进行电压降以及电迁移的分析。如果设计中有电源关断单元,它还可以分析相关关断电路的瞬态电流以及动态的电压降分布。来帮助判断这些电源关断单元是否插入合理以及是否需要插入De-cap单元。

2.2 UPF所需要的特殊单元库

基于UPF的设计流程与传统流程相比,需要一些库中特殊单元的支持以及对传统的DB时序库添加电源地的信息。特殊单元包括Level-shifter,Isolation Cell,电源关断单元(Power Gating, 也叫MTCMOS),Retention-Register,以及Always-on单元。下面分别阐述:



2013年10月10日星期四

cat & sed & awk

cat:
cat a.tcl b.tcl                           : 在terminal显示 a.tcl & b.tcl 的内容
cat a.tcl > c.tcl:                       : 将a.tcl 内容覆盖到c.tcl
cat a.tcl >> c.tcl                      : 将 a.tcl 内容 append 到 c.tcl




2013年10月7日星期一

手机CPU spec

Iphone 5s:

apple A7 processor
dual-core chip,made on a 28nm HKMG process, manufactured by Samsung
two Cyclone cores clocked at up to 1.3GHz.
ARMv8 64-bit
doubled L1 cache 64KB/64KB.
L2 cache 1MB


LEF & DEF & GDSII

LEF:

Definition:
A Library Exchange Format (LEF) file contains library information for a class of designs.
Library data includes layer, via, placement site type, and macro cell definitions.

Place and route tools do not require the full cell layout.
Another view of the standard cells called the abstract view needs to generated
The abstract view provides information like:
1. Cell name, site name, cell orientation„
2. Cell PR boundary
3. Pin names, locations, pin metal layer, type and direction (input/output/input-output)
4. Also provides location of all metal track and vias in the layout (obstructions)
This information is passed to the P & R tool in the LEF format

LEF & Milkyway 
When an outside source provides library cell information in LEF format, you need to read the data file into the Milkyway Environment and convert the data into a cell library in the Milkyway database.

DEF:
A Design Exchange Format (DEF) file contains the design-specific information of a circuit and
is a representation of the design at any point during the layout process.
The DEF format defines the elements of a specific design that are related to physical layout, including the placement and routing information, design netlist, and design constraints.

DEF conveys logical design data to place-and-route tools, and get physical design data from place-and-route tools.
Logical design data can include internal connectivity (represented by a netlist), grouping
information, and physical constraints. Physical data includes placement locations and
orientations, routing geometry data, and logical design changes for backannotation. Placeand-
route tools also can read physical design data, for example, to perform ECO changes.

GDSII:

The GDSII stream format is an industry-standard data exchange format for integrated circuit layout information. A GDSII file contains information about layers, wire paths, boundaries, structures, arrays, and text labels in the cell or chip layout.
A GDSII or OASIS stream file contains physical information about library cells, but it does not specify the cell types.
Each geometric object in a layout database has an associated layer number and data type number. In the GDSII and OASIS formats, the layer number and data type are integers ranging from 0 to 32767.

GDSII & Milkyway library

read_gds:
When an outside source provides library cell information in GDSII format, you need to read the data file into the Milkyway Environment and convert the data stream into a cell library in the Milkyway database.
In addition to the GDSII file, you typically provide a cell-type definition file and a layer mapping file to specify how to translate the data.

VIM_开多窗口&操作

:split             当前窗口一分为二,两个窗口显示相同内容。 
:sp                split的缩写形式  
:new               split 一个新文本窗口
:vsplit 以上所有命令都适用于打开垂直分割窗口,只要在前面加v(vetical)

: vsplit file_name       打开垂直窗口2并在其中打开file_name文件
或者用 : vsp file_name   结果一样,vsp为vsplit缩写

在多窗口情况下
01# 打开文件
02:e ../myFile.pl
03
04# 显示缓存
05:ls
06
07# 切换
08:b [filename]
09:bn (n a number) move to nth buffer
10:bp previous buffer
11:bn next buffer
:set diff 此命令用于比较两个文件

2013年9月29日星期日

VIM 用正则表达式 批量替换文本,多行删除,复制,移动


在VIM中 用正则表达式 批量替换文本,多行删除,复制,移动
:n1,n2 m n3     移动n1-n2行(包括n1,n2)到n3行之下;
:n1,n2 co n3    复制n1-n2行(包括n1,n2)到n3行之下;
:n1,n2 d        删除n1-n2行(包括n1,n2)行;

vi替换使用规则:
:g/s1/s/s2/s3/g
第一个g表示对每一个包括s1的行都进行替换,第二个g表示对每一行包括s1的行所有的s2都用s3替换
s表示替换,s2是要被替换的字符串,他可以和s1相同(如果相同的话用//代替),s3是替换字符串
在vi界面下使用命令 :%s#/usr/bin#/bin#g 可以把文件中所有路径/usr/bin换成/bin。其中“#”是转义字符,表明其后的“/”字符是具有实际意义的字符,不是分隔符。

s/str1/str2/ 用字符串 str2 替换行中首次出现的字符串 str1
:s/str1/str2/g 用字符串 str2 替换行中所有出现的字符串 str1
:s/str1/str2/gi 用字符串 str2 替换行中所有出现的字符串 str1,在查找时不区分大小写

(本文出自php_sir的新浪博客,用户名php_sir,首页链接:http://blog.sina.com.cn/phpsir,未经本人(php_sir)同意禁止转载)

: .,$ s/str1/str2/g 用字符串 str2 替换正文当前行到末尾所有出现的字符串 str1
:1,$ s/str1/str2/g 用字符串 str2 替换正文中所有出现的字符串 str1
:1,$ s/^str1/str2/g 用字符串 str2 替换正文中所有出现的,每行以str1开头的字符串
:g/str1/s//str2/g 功能同上
:%s/str1/str2/g 功能同上
:g/foobar/s/bar/baz/g 首先搜寻foobar,然后把它变成foobaz. 它没有改变 jailbars, 而其他的一些命令可能会改变jailbars.
:%s/str1/str2/gc 替换全文所有符合的单词并让用户确认
:g/str1/s//str2/gi 用字符串 str2 替换正文中所有出现的字符串 str1,在查找时不区分大小写,此命令没有下面的严格,经测试显示,不能完全做到在查找时忽略大小写
:%s/str1/str2/gi 用字符串 str2 替换正文中所有出现的字符串 str1,在查找时不区分大小写,在查找时可以完全做到忽略大小写
:10,20s/^/ / 将第10行至第20行资料的最前面插入5个空白
:%s/$/str/g 在整个文件每一行的行尾添加“str”
:3,7s/str1/str2/g仅替换文件中的第3行到第7行中的“str1”成“str2”
:%s/:.*//g 删除/etc/passwd中用户名后面的从冒号开始直到行尾的所有部分(前提是已经打开了/etc/passwd文件)

从上述替换命令可以看到:g 放在命令末尾,表示对搜索字符串在光标所在行的每次出现进行替换;不加 g,表示只对搜索字符串的首次出现进行替换;g 放在命令开头,表示对正文中所有包含搜索字符串的行进行替换操作。上面的命令中的/只是起分隔作用,也可以用其他的字符代替。另外,可以在正规式里用\ (和\)来剥离一个序列。

例如:有些字符域使用得很频繁. Vim 为这些字符域提供了预定义域:
项 匹配 相当于
\d 数字 [0-9]
\D 非数字 [^0-9]
\x 十六进制数字 [0-9a-fA-F]
\X 非十六进制数字 [^0-9a-fA-F]
\s 空白字符 [ ] ( 和 )
\S 非空白字符 [^ ] (非 和 )
\l 小写字母 [a-z]
\L 非小写字母 [^a-z]
\u 大写字母 [A-Z]
\U 非大写字母 [^A-Z]
& 所有查找时匹配到的东西
\[Ee] 更改大小写的选择区域的终点
:%s/\s\+$// 删除行尾多余的空格
命令前面指明范围是“%”,所以这会作用于整个文件。“substitute”命令的样式是“\s\+$”。这表示行末($)一个或者多个(\+)空格(\s)。:g/\(foo\)\(bar\)/s/\2/\1baz/g 将foobar替换成foobaz
:0,$d   删除所有内容
:%s/r//g 删除DOS方式的回车^M
:%s= *$== 删除行尾空白
:%s/^(.*)n1/1$/ 删除重复行
:%s/^.{-}pdf/new.pdf/ 只是删除第一个pdf
:%s/// 又是删除多行注释(咦?为什么要说「又」呢?)
:g/s*^$/d 删除所有空行 :这个好用有没有人用过还有其他的方法吗?
:g!/^dd/d 删除不含字符串'dd'的行
:v/^dd/d 同上 (译释:v == g!,就是不匹配!)
:g/str1/,/str2/d 删除所有第一个含str1到第一个含str2之间的行
:v/./.,/./-1join 压缩空行
:g/^$/,/./-j 压缩空行
ndw 或 ndW 删除光标处开始及其后的 n-1 个字符。
d0 删至行首。
d$ 删至行尾。
ndd 删除当前行及其后 n-1 行。
x 或 X 删除一个字符。
Ctrl+u 删除输入方式下所输入的文本。
^R 恢复u的操作
J 把下一行合并到当前行尾
V 选择一行
^V 按下^V后即可进行矩形的选择了
aw 选择单词
iw 内部单词(无空格)
as 选择句子
is 选择句子(无空格)
ap 选择段落
ip 选择段落(无空格)
D 删除到行尾
x,y 删除与复制包含高亮区
dl 删除当前字符(与x命令功能相同)
d0 删除到某一行的开始位置
d^ 删除到某一行的第一个字符位置(不包括空格或TAB字符)
dw 删除到某个单词的结尾位置
d3w 删除到第三个单词的结尾位置
db 删除到某个单词的开始位置
dW 删除到某个以空格作为分隔符的单词的结尾位置
dB 删除到某个以空格作为分隔符的单词的开始位置
d7B 删除到前面7个以空格作为分隔符的单词的开始位置
d) 删除到某个语句的结尾位置
d4) 删除到第四个语句的结尾位置
d( 删除到某个语句的开始位置
d) 删除到某个段落的结尾位置
d{ 删除到某个段落的开始位置
d7{ 删除到当前段落起始位置之前的第7个段落位置
dd 删除当前行
d/text 删除从文本中出现“text”中所指定字样的位置,
一直向前直到下一个该字样所出现的位置(但不包括该字样)之间的内容
dfc 删除从文本中出现字符“c”的位置,一直向前直到下一个该字符所出现的位置(包括该字符)之间的内容
dtc 删除当前行直到下一个字符“c”所出现位置之间的内容
D 删除到某一行的结尾
d$ 删除到某一行的结尾
5dd 删除从当前行所开始的5行内容
dL 删除直到屏幕上最后一行的内容
dH 删除直到屏幕上第一行的内容
dG 删除直到工作缓存区结尾的内容
d1G 删除直到工作缓存区开始的内容