本文已参与「新人创作礼」活动,一起开启掘金创作之路.
DC文件转换.lib->.db
read_lib xxx.lib # DC读lib文件
write_lib -format db xxx -output xxx.db #DC吐出相应的db文件
注:DC 的 K-2015.06 版本后自身不支持library compiler,可以使用之前的版本,或者自行安装library compiler。 安装library Compile 后使用help命令查看如何使用,也比较简单~
展平网表
将读入的.v文件展平
read_verilog Moor.v
set_flatten true -design Moor -effort high
读入.vhdl文件
将句中的read_verilog改为read_vhdl,后面的后缀改成.vhd。
read_vhdl Moor.vhd
使用typical库
使用的是typical经典库时,使用下面的语句。
set active_design FSM_master
set_min_library "lec25dscc25_TT_v3.db" -none
和之前用slow.db的区别,不指定最好和最差的库。
set active_design top
set_min_library "slow.db" -min_version "fast.db
面积约束
set_max_area 0 # 这种情况下,DC工具会尽可能缩小综合出的的面积
#如果不指定max-area,工具会进行最小的努力来减小面积,如果对面积要求不是那么严格这样是可取的,会缩短编译时间
其他命令
report_port –verbose ; #报告在当前设计中所有的输入输出端口属性和施加的约束值
report_clock ; #报告当前设计中定义的时钟及其属性情况
reset_design ; #删除当前设计中所有的属性值和约束(通常用在约束脚本的第一句)
report_lib slow ; #列出在当前的工艺库slow.lib里提供了哪几种工作条件,时间单位等
report_timing –delay max ; #报告基于建立时间检查的关键路径,每一个path group的关键路径都被报告出来
report_timing –delay min ; #报告基于保持时间检查的关键路径, 每一个path group的关键路径都被报告出来
report_net -connections -verbose ; #检查连线的连接情况
report_timing -net ; #检查连线的负载情况
read_lib ./home/.../slow.lib ; #读入工艺库文件
list_libs ; #列出内存中所有可用的库
check_timing ; #检查设计是否有路径没有加入约束
check_design ;
#Checking for Design Consistency, a design is consistent when it does not contain errors, such as unconnected ports, constant-valued ports, cells with no input or output pins, mismatches between a cell and itsreference, multiple driver nets, connection class violations, or recursive hierarchy definitions.
write_script ; #将施加的约束和属性写出到一个文件中,可以检查这个文件看看是否正确
compile -map_effort (low | medium | high) ; #对设计进行编译的时候,有三种编译级别可以选择,它们分别是低级、中级和高级
compile -incremental_mapping ; #重新编译,进行门级单元的替换
compile -inc -map high ; #让DC使用更多的优化算法优化电路,与上面的优化不同,这里需要把层次提高到结构级
compile -only_design_rule ; #修正设计规则的错误
set_critical_range 2 [current_design] ; #同时优化多条路径,假设电路中的 WNS 为-3.4ns,那么, 当前设计中的所有负裕量的绝对值大于 1.4 的路径都将被优化掉
report_constraint –all_violators ;#报告电路中所有没有满足的约束条件, 包括设计规则、 建立时间、 保持时间以及面积。通常这应该是最先执行的命令