DC脚本有大神懂吗?
时间:10-02
整理:3721RD
点击:
以下脚本生成的网表,本来端口是17位数据比如 [16:0] data,综合后就成了data_1_,data_2_,现在后仿时modelsim报错说是没找到sdf里面的 data_reg[1]....data_reg[2]... 我想知道怎么让他们匹配啊?
###################################### Current Design: TOP1553
# Load up design files
# uncomment one of the following
#analyze -format verilog TOP1553.v
analyze -format vhdl {decode10m.vhd decode.vhd TOP1553.vhd}
# Tell dc_shell the name of the top level module
elaborate TOP1553
# set a clock
create_clock {ext_clk clk}
# Check for warnings/errorsa
check_design -multiple_designs
# ungroup everything
ungroup -flatten -all
# flatten it all, this forces all the hierarchy to be flattened out
set_flatten true -effort high
uniquify
# compile the design
compile_ultra -area_high_effort_script
#compile_ultra -timing_high_effort_script
#compile_ultra
# Now that the compile is complete report on the results
report_area
report_timing
report_power
write_sdf TOP1553.sdf
############################### begin: renaming section
# remove the following renaming section when not needed
# define the name rules for rename
define_name_rules verilog -remove_port_bus
define_name_rules verilog -remove_internal_net_bus
# name rule for nets
define_name_rules verilog -type net -allowed "a-z A-Z 0-9 _" \
-first_restricted "_ 0-9 N" \
-replacement_char "_" \
-prefix "n"
# name rule for cells
define_name_rules verilog -type cell -allowed "a-z A-Z 0-9 _" \
-first_restricted "_ 0-9" \
-replacement_char "_" \
-prefix "u"
# name rule for ports
define_name_rules verilog -type port -allowed "a-z A-Z 0-9 _" \
-first_restricted "_ 0-9" \
-replacement_char "_" \
-prefix "p"
# change names of variables
change_names -rule verilog -hierarchy
################################ end: renaming section
# Write out the design
write -f verilog TOP1553 -output TOP1553_syn.v
remove_design -all
exit
###################################### Current Design: TOP1553
# Load up design files
# uncomment one of the following
#analyze -format verilog TOP1553.v
analyze -format vhdl {decode10m.vhd decode.vhd TOP1553.vhd}
# Tell dc_shell the name of the top level module
elaborate TOP1553
# set a clock
create_clock {ext_clk clk}
# Check for warnings/errorsa
check_design -multiple_designs
# ungroup everything
ungroup -flatten -all
# flatten it all, this forces all the hierarchy to be flattened out
set_flatten true -effort high
uniquify
# compile the design
compile_ultra -area_high_effort_script
#compile_ultra -timing_high_effort_script
#compile_ultra
# Now that the compile is complete report on the results
report_area
report_timing
report_power
write_sdf TOP1553.sdf
############################### begin: renaming section
# remove the following renaming section when not needed
# define the name rules for rename
define_name_rules verilog -remove_port_bus
define_name_rules verilog -remove_internal_net_bus
# name rule for nets
define_name_rules verilog -type net -allowed "a-z A-Z 0-9 _" \
-first_restricted "_ 0-9 N" \
-replacement_char "_" \
-prefix "n"
# name rule for cells
define_name_rules verilog -type cell -allowed "a-z A-Z 0-9 _" \
-first_restricted "_ 0-9" \
-replacement_char "_" \
-prefix "u"
# name rule for ports
define_name_rules verilog -type port -allowed "a-z A-Z 0-9 _" \
-first_restricted "_ 0-9" \
-replacement_char "_" \
-prefix "p"
# change names of variables
change_names -rule verilog -hierarchy
################################ end: renaming section
# Write out the design
write -f verilog TOP1553 -output TOP1553_syn.v
remove_design -all
exit
这个得自己改,tb里面一般用define分开,功能验证用verilog里面描述的形式,后防得找网表里面的表现形式。这是个体力活。不知道有没有其他人有其他好办法。我们做芯片验证目前就只能这么做。
你是说后仿需要手动上去搜索然后修改?。是改sdf里面的,让他匹配网表?
只能改tb
sdf不要动
额。我意思是网表文件里面的数据格式,和sdf里面的不匹配啊。tb改过了,前仿真用的reg [16:0] data,早手动改成了一堆reg data_1_,data_2_.......
我搜索了sdf,里面的某个数据格式是data_reg_[1]...
好像是DC不认[]中括号的形式,我以前是改了总线的命名规则。
现在也忘了是改的源代码还是DC有一个命令了,就把总线改为不含[]就可以了好像。
你可以去找找是不是有这么一个约束命令。
sdf里的端口和cell是根据网表信息吐出来的,跟网表一定是对应的。出现不对应的应该是你的testbench里面有关某个信号的名字在DC之后被改变,而你还是用的RTL里的命名。
出现这些问题很正常,所以一般为了前后仿一致,在RTL仿真时,参考信号尽量指定到module的port上,或者DFF上。这些信号名字DC前后一般不会改变,内部wire类型的信号名字一般都会改变
