当前位置:文档之家› DC脚本及解释

DC脚本及解释

#script for Design Compiler# Language : TCL# Usage :# 1) make sure the lib in the current directory# 2) if you...#script for Design Compiler# Language : TCL# Usage :# 1) make sure the lib in the current directory# 2) if you have the file .synopsys_dc.setup,# set synopsys_dc_setup_file 1,# if not, set synopsys_dc_setup_file 0# 3) change Step 3 : Variables to what you want# Especially : top module name, clock name,# reset name, all files name, and period# 4) typing dc_shell-t -f run_72.tcl | tee -i run.log##===================================================== ===set synopsys_dc_setup_file 0#-----------------------------------------------------# Step 1 :# Setting Up path and library:# If you have edited the file .synopsys_dc.setup, then you can skip over this step#-----------------------------------------------------if { $synopsys_dc_setup_file == 0} {set search_path [list /home/chanshi/dc/library/smic /home/chanshi/dc/rfid/source /home/chanshi/dc/script]set target_library {typical.db}#set target_library {CSM35OS142_typ.db};# if you want use typical library,change to typical.db#set link_library [list {*} ram_interp_typical_syn.db ram_458_typical_syn.db typical.db] set link_library [list {*} $target_library]}#set symbol_library {csm18ic.sdb csm18io.sdb}#set synthetic_library {dw_foundation.sldb};# Design Wareset command_log_file "command.log"#-----------------------------------------------------# Step 2 :# Compile Swithes#-----------------------------------------------------#set verilogout_no_tri true ;# if inout used, tri net will be used#通过将三态(tri)逻辑声明成线网(wire)来确保网表中不会出现三态逻辑,因为一些布线工具很难读取包含tri、tran源语、assign语句的网表,对于“inout”类型的port,DC产生tri wire 语句和tran 源语,对于tri,还会产生assign语句set test_default_scan_style multiplexed_flip_flop#设置扫描链的类型,还可以通过set_scan_configuration -style来设置set link_force_case case_insensitive#设置link命令是否区分大小写,默认是check_reference,就是根据产生reference的模块格式来判断是否大小写敏感,如果是vhdl格式就是不敏感,如果是verilog就敏感define_name_rules VLSI_NET -allowed "a-zA-Z0-9_" -first_restricted "0-9_" -type net -max_length 256define_name_rules VLSI_CELL -allowed "a-zA-Z0-9_" -first_restricted "0-9_" -type cell -max_length 256define_name_rules VLSI_PORT -allowed "a-zA-Z0-9_" -first_restricted "0-9_" -type port -max_length 256define_name_rules TAN_RULE -allowed "a-zA-Z0-9_" -first_restricted "0-9_\[]" -max_length 256 -map {{{"*cell*", "mycell"}, {"*-return", "myreturn"}}};set hdlin_check_no_latch "true"#设置如果推断出锁存器,是否报warning,默认是false,即不报。

set hdlin_merge_nested_conditional_statements "true"#顾名思义,是否把嵌套的if融合,默认值是false,就是对于嵌套的条件语句(if或case 语句)中的每一个if和case都推断出一个选择器,这种做法有利于把某些迟到的条件判断信号(late arriving signals)安排到离输出最近的选择器上(进而有利于减小延迟),如果设成true,就会把这些选择器融合成一个大的选择器,这样所有的选择信号到输出的距离都是相同的#-----------------------------------------------------# Step 3 :# Define Variables#-----------------------------------------------------set active_design "whole_modules";# Top module namesource files.tcl;# All RTL source_files (verilog)set clock_name "clk";# Name of clockset reset_name "reset";# Name of resetset clk_period 70.0#设置时钟周期,注意带小数点,这样计算出的值都带小数点,不然小于1的数都显示为0 # Desired Clock Period = 1000/Frequenceset clk_uncertainty_setup [expr $clk_period/200];#设置时钟不确定性,这里只设置了相对于建立时间的不确定性,就是时钟上升沿有可能提前clk_uncertainty_setup(时钟偏差和时钟抖动之和)到来,dc要提前clk_uncertainty_setup 检查建立时间是否满足# Uncertainty of clockset clk_latency [expr $clk_period/10];#设置时钟延迟,是时钟信号从其实际时钟原点到设计中时钟定义点的传输时间# Network Latency of clock#考虑reg1+combo1--------combo2_input+reg2+combo2_output-----------combo3+reg3的模型来解释input_delay和output_delay,中间的combo2_input+reg2+combo2_output 是要综合的模块set input_delay [expr $clk_period/4];#设置输入延迟,设置一个外部输入(组合逻辑combo1)用了多少时间(即从时钟上升沿到输入数据到来经历的延迟),dc计算还有多少时间留给内部组合逻辑combo2_input,例如时钟周期为10ns,input_delay是4ns,则还有(6-tsu)留给内部组合逻辑combo2_input # Input Delay of all input ports except clockset output_delay [expr $clk_period/4];#设置输出延迟,设置一个外部输出(组合逻辑combo3)用了多少时间(即外部组合逻辑的延迟),dc计算有多少时间留给内部组合逻辑combo2_output,例如时钟周期为10ns,output_delay为4ns,则还有(6-Tclk2Q)留给内部组合逻辑combo2_output# Output Delay of all output portsset area_desired 0;#设置面积的期望值,用于set_max_areaset wire_load_model "smic18_wl20";#为了精确地计算设置线载模型(DC支持三种模式:以此来决定如何选择用于跨层次边界的网线的线载模型),用于计算时序路径的延迟,用于set_wire_load_model# Model of the intra netset output_load "typical/NAND2BX1/AN" ;#为了精确地计算输出电路的时间,需要设置端口负载(输出或输入的外部电容负载),就是为所有输出端口指定一个负载,综合时dc就会认为这里有一个这样的负载(并不是说综合时在这里强制添加一个电容),dc综合时就会选择满足这个负载的器件,例如假设已经知道某输出端口要驱动的是一个反相器,那么把输出负载设置成这个反相器的输入负载即可,当然可以设置成很大,这样dc就会用驱动能力很大的器件,来满足所有单元被驱动。

相关主题