DC综合教程

来源:互联网 发布:vr全景制作软件 编辑:程序博客网 时间:2024/05/13 01:19

今天看到一篇英文版的DC综合教程,想着翻译一下分享给大家,于我也是深化理解的过程。

1.完成设计的verilog书写。下面对其进行综合。

2.在你的主页目录下创建一个.synopsys_dc.setup环境文件确定你要使用的工艺库文件的位置。示例如下:

set_host_options -max_cores 4
source /home/liurr/test/scr/common_setup_65nm.tcl
set search_path "$ADDITIONAL_SEARCH_PATH /usr/software/synopsys/DC/J-2014.09_SP3/libraries/syn "
set link_library "* $TARGET_LIBRARY_FILES $ADDITIONAL_LINK_LIB_FILES dw_foundation.sldb"
set target_library "$TARGET_LIBRARY_FILES"
set synthetic_library "dw_foundation.sldb"

3.写一个综合脚本,这个脚本需要包括下面的内容:

a.加载所有的verilog文件给dc_shell,并且声明top模块;

b.设置约束条件,这里所添加的约束会指导dc_shell工具如何将RTL级转化为网表。约束包括时序上的约束和面积约束。

c.发布编译的指令,并且保存时序和面积报告,这可以给设计者一些反馈信息用于优化设计。

d.以verilog形式保存网编文件,用于后续的工具。这里verilog文件为mux2_1.v示例如下:

# Load up the verilog files (when more files are included there
# will be more analyze lines)
analyze -format verilog ./mux2_1.v

# Tell dc_shell the name of the top level module
elaborate mux2_1

# Set timing constaints, this says that a max of .5ns of delay from
# input to output is alowable
set_max_delay .5 -to [all_outputs]

# Set the characteristics of the driving cell for all inputs
set_driving_cell -lib_cell INVX1 -pin Y [all_inputs]

# If this were a clocked piece of logic we could set a clock
 period to shoot for like this

# create_clock clk -period 1.800

# Check for warnings/errors
check_design

# Use module compiler for arth. DW components
set dw_prefer_mc_inside true

# ungroup everything
ungroup -flatten -all

# flatten it all, this forces all the hierarchy to be flattened out
set_flatten true -effort high
uniquify

# This forces the compiler to spend as much effort (and time)
# compiling this RTL to achieve timing possible.
compile_ultra

# Now that the compile is complete report on the results
report_area
report_timing

# Finally write the post synthesis netlist out to a verilog file
write -f verilog mux2_1 -output mux2_1_post_synth.v -hierarchy

exit

如果没有任何错误发生的话,一旦DC_shell结束,在你主页的目录下会有一些新的文件。如output.txt,这个是编译输出的日志文件,通过查看这个文件,你可以看到编译过程中相关的warnings和errors,一般出现在这个文件中的warning可以忽略,因为通常不是你的设计问题。然后你还会看到timing 和area报告,根据这个可以反复去优化你的设计。
0 0