好长时间了想搞懂dc的脚本书写 终于让我找见一个好的教程 写的非常详细 弄过来给大家参考。
 
Design CompilerTutorial

--------------------------------------------------------------------------------

Before running synthesis the tool environmentfile must be sourced. If you have not done this please go back tothe environment setup page. All steps on this page may be completed from atelnet or ssh window.

1.Create a .synopsys_dc.setup environment file inyour home directory specifying the location of the technologylibrary files you want to use. Here is one premade that points toour open source technology libraries. Place a copy in your ~/ directory.

2.Write the verilog code for the part you wish to synthesize.For the purposes of this example we will use the same verilog asthe simulation tutorial:

module mux2_1 ( out, in0, in1, sel ) ;

input [3:0] in0, in1;
   input sel;

output [3:0] out;

// All the real work gets donehere in the assign.
   assign  ut =sel ? in1 : in0;

endmodule // mux2_1
   As you can seethis is a very simple four bit 2 to 1 mux. You may also copy thefile from here .

3.Next one must write a design complier script.The script. should do the following:

  • Load all the verilog files into dc_shell andtell dc_shell which module is the top level module.
  • Set up the constraints for compilation. Thecontraints tune how the dc_shell tool converts the behavioral RTLinto a netlist. For example one may set timing contraints or areacontraints dependent on which is more important for the design athand.
  • Issue the compile command and tell dc_shell toreport back on the resultant area and timing so the designer willget feedback on the resultant design.
  • Save the netlist back to a verilog format foruse in downstream tools.

Here is an example design compiler shell script. forthe mux2_1 that does all of these things:

# Load up the verilog files (when more files are includedthere
# 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 delayfrom
# input to output is alowable
set_max_delay .5 -to [all_outputs]

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

# If this were a clocked piece of logic we could set aclock
#  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 flattenedout
set_flatten true -effort high
uniquify

# This forces the compiler to spend as much effort (andtime)
# 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 verilogfile
write -f verilog mux2_1 -output mux2_1_post_synth.v -hierarchy

exit

A copy of thismay be downloaded from here .

4.Now everything is set to compile the mux. Do doso issue the command shown in red in the directory containing thefiles listed above.

pgratz@deskworkingdir $ dc_shell-t -f mux2_1.dc_cmd |tee output.txt

5.Assuming no errors occur there will be severalnew files in your directory once dc_shell is done. The first one tolook at is the output.txt file. This is the log of the compileoutput. Looking at this copy for comparison you should look over the warnings and errors anddetermine if there were any problems durning compile. Note: somewarnings are not indicative of a problem with your design. If thewarning appears in the sample output.txt then it can safely beignored.

6.Once satisfied that there are no errors in therun you should skim down nearly to the bottom of output.txt whereyou will find some text like the following:

...
report_area
Information: Updating design information... (UID-85)
 
****************************************
Report : area
Design : mux2_1
Version: V-2004.06-SP1
Date   : Mon Nov 27 00:54:532006
****************************************

Library(s) Used:

osu018_stdcells (File:/projects/cad/open_source_synth_libs/osu_stdcells/lib/tsmc018/lib/osu018_stdcells.db)

Number ofports:              13
Number ofnets:               17
Number ofcells:               8
Number ofreferences:          2

Combinationalarea:       256.000000
Noncombinationalarea:      0.000000
Net Interconnectarea:     undefined  (No wire load specified)

Total cellarea:          256.000000
Totalarea:                undefined
1
...
   This is the area report fromthe synthesis run. The important data here is the "Total cell area:256.000000". This states that the total area used by the

design is 256 "cell units".

7.Skimming further down in output.txt you will find thefollowing output: ...
report_timing
 
****************************************
Report : timing
       -path full
       -delay max
       -max_paths 1
Design : mux2_1
Version: V-2004.06-SP1
Date   : Mon Nov 27 00:54:532006
****************************************

Operating Conditions:typical   Library:osu018_stdcells
Wire Load Model Mode: top

Startpoint: sel (input port)
  Endpoint: out[0] (output port)
  Path Group: default
  Path Type: max

Point                                   Incr      Path
 -----------------------------------------------------------
  input externaldelay                    0.00      0.00 r
  sel(in)                                0.13      0.13 r
  U20/Y(MUX2X1)                          0.15      0.28 f
  U19/Y(INVX2)                           0.03      0.31 r
  out[0](out)                            0.00      0.31 r
  data arrivaltime                                  0.31

max_delay                               0.50      0.50
  output externaldelay                   0.00      0.50
  data requiredtime                                 0.50
 -----------------------------------------------------------
  data requiredtime                                 0.50
  data arrivaltime                                 -0.31
 -----------------------------------------------------------
  slack(MET)                                        0.19

1
...

This piece of text is theoutput of the timing report. It details the worst case or slowestpath through the post synthesis design. Times are shown in

pico seconds. In this case it shows that the slowest paththrough the design takes .31ns. In the mux2_1.dc_cmd file we placeda constraint on the timing that

all outputs must be asserted by at least .500 ns after theinputs change and this is shown in the "data required time". The"slack" is the difference between

the worst case path and the required time. In this case timingis met so the slack is a positive .19 ps. If timing was not metthen the slack would be a

negative value.

8.Another file created during the synthesis step aboveis the "mux2_1_post_synth.v"file.

The contents of this file should be likethis:

module mux2_1 ( out, in0, in1, sel );
  output [3:0] out;
  input [3:0] in0;
  input [3:0] in1;
  input sel;
  wire   n7, n8,n9, n10;

INVX2 U13 ( .A(n7), .Y(out[3]) );
  MUX2X1 U14 ( .A(in1[3]), .B(in0[3]), .S(sel),.Y(n7) );
  INVX2 U15 ( .A(n8), .Y(out[2]) );
  MUX2X1 U16 ( .A(in1[2]), .B(in0[2]), .S(sel),.Y(n8) );
  INVX2 U17 ( .A(n9), .Y(out[1]) );
  MUX2X1 U18 ( .A(in1[1]), .B(in0[1]), .S(sel),.Y(n9) );
  INVX2 U19 ( .A(n10), .Y(out[0]) );
  MUX2X1 U20 ( .A(in1[0]), .B(in0[0]), .S(sel),.Y(n10) );
endmodule

  1. As you can see this is thepost synthesis netlist written out durning the final step in themux2_1.dc_cmd. In it the behavioral "assign" statment has beenreplaced with multiple instatiations of single bit library MUX2X1mux cells and some INVX2 inverter cells.

This completes the design compiler tutorial. Moreinformation on design compiler may be found on the main cad pageunder synthesis documentation.

Modified by Paul Gratz, pgratz@cs.utexas.edu

.synopsys_dc.setup

set search_path [list ".""/projects/cad/open_source_synth_libs/osu_stdcells/lib/tsmc018/lib""/projects/cad/synopsys/synth/libraries/syn/"

"/projects/cad/synopsys/synth/mc/lib/dp/dplite/""/projects/cad/synopsys/synth/mc/lib/dp""/projects/cad/synopsys/synth/dw/sim_ver/"]

set target_library [list osu018_stdcells.db]

set synthetic_library [list dw_foundation.sldb dw01.sldbdw02.sldb dw03.sldb dw04.sldb dw05.sldb dw06.sldb dw08.sldbdw07.sldb standard.sldb]

set link_library [concat  $target_library$synthetic_library]

set command_log_file "./command.log"

define_design_lib WORK -path ./work

脚本文件

# Load up the verilog files (when more files are includedthere
# 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 delayfrom
# input to output is alowable
set_max_delay .5 -to [all_outputs]

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

# If this were a clocked piece of logic we could set aclock
#  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 flattenedout
set_flatten true -effort high
uniquify

# This forces the compiler to spend as much effort (andtime)
# 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 verilogfile
write -f verilog mux2_1 -output mux2_1_post_synth.v -hierarchy

exit

写好以后 
在在当前目录里面运行 dc_shell-t -f mux2_1.dc_cmd |tee output.txt
就可以了

结果一般如下:

DC Professional (TM)
                          DC Expert (TM)
                           DC Ultra (TM)
                        VHDL Compiler (TM)
                         HDL Compiler (TM)
                       Library Compiler (TM)
                        Power Compiler (TM)
                         DFT Compiler (TM)
                           BSD Compiler
                     DesignWare Developer (TM)

Version V-2004.06-SP1 for linux -- Jul 15, 2004
             Copyright (c) 1988-2004 by Synopsys, Inc.
                        ALL RIGHTS RESERVED

This program is proprietary and confidential information ofSynopsys, Inc.
and may be used and disclosed only as authorized in a licenseagreement
controlling such use and disclosure.

Initializing...
# Load up the verilog files (when more files are includedthere
# will be more analyze lines)
analyze -format verilog ./mux2_1.v
Running PRESTO HDLC
Compiling source file ./mux2_1.v
Presto compilation completed successfully.
1
# Tell dc_shell the name of the top level module
elaborate mux2_1
Running PRESTO HDLC
Loading db file'/projects/cad/synopsys/synth/libraries/syn/gtech.db'
Loading db file'/projects/cad/synopsys/synth/libraries/syn/standard.sldb'
Loading db file'/projects/cad/synopsys/synth/libraries/syn/dw_foundation.sldb'
Loading db file'/projects/cad/synopsys/synth/libraries/syn/dw01.sldb'
Loading db file'/projects/cad/synopsys/synth/libraries/syn/dw02.sldb'
Loading db file'/projects/cad/synopsys/synth/libraries/syn/dw03.sldb'
Loading db file'/projects/cad/synopsys/synth/libraries/syn/dw04.sldb'
Loading db file'/projects/cad/synopsys/synth/libraries/syn/dw05.sldb'
Loading db file'/projects/cad/synopsys/synth/libraries/syn/dw06.sldb'
Loading db file'/projects/cad/synopsys/synth/libraries/syn/dw08.sldb'
Loading db file'/projects/cad/synopsys/synth/libraries/syn/dw07.sldb'
Loading db file'/projects/cad/open_source_synth_libs/osu_stdcells/lib/tsmc018/lib/osu018_stdcells.db'
Presto compilation completed successfully.
Current design is now 'mux2_1'
1
# Set timing constaints, this says that a max of .5ns of delayfrom
# input to output is alowable
set_max_delay .5 -to [all_outputs]
1
# Set the characteristics of the driving cell for all inputs
set_driving_cell -lib_cell INVX1 -pin Y [all_inputs]
Warning: Design rule attributes from the driving cell will be
 set on the port. (UID-401)
1
# 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
1
# Use module compiler for arth. DW components
set dw_prefer_mc_inside true
true
# ungroup everything
ungroup -flatten -all
Current instance is the top-level of design 'mux2_1'.
Information: Updating design information... (UID-85)
Warning: Design has no hierarchy.  No cells can beungrouped. (UID-228)
0
# flatten it all, this forces all the hierarchy to be flattenedout
set_flatten true -effort high
1
uniquify
1
# This forces the compiler to spend as much effort (and time)
# compiling this RTL to achieve timing possible.
compile_ultra
Information: Data-path optimization is enabled. (DP-1)
Information: Evaluating DesignWare library utilization.(UISN-27)

============================================================================
| DesignWare Building BlockLibrary      |     Version      | Available |
============================================================================
| Basic DW BuildingBlocks               | V-2004.06-DWF_0406|    *    |
| Licensed DW BuildingBlocks            | V-2004.06-DWF_0406|    *    |
============================================================================

Beginning Pass 1 Mapping
  ------------------------
  Processing 'mux2_1'

Updating timing information

Beginning MappingOptimizations  (Ultra High effort)
  -------------------------------
Information: There is no timing violation in design mux2_1.Delay-based auto_ungroup will not be performed. (OPT-780)
  Flattening 'mux2_1'  (Higheffort)  (Single Output Minimization)
  Structuring 'mux2_1'
  Mapping 'mux2_1'

ELAPSED           WORST NEG TOTAL NEG DESIGN                           
   TIME     AREA     SLACK    SLACK   RULECOST        ENDPOINT        
  --------- --------- --------- ------------------ -------------------------
   0:00:00    256.0     0.00      0.0      0.0                         
   0:00:00    256.0     0.00      0.0      0.0

Beginning Delay Optimization Phase
  ----------------------------------

ELAPSED           WORST NEG TOTAL NEG DESIGN                           
   TIME     AREA     SLACK    SLACK   RULECOST        ENDPOINT        
  --------- --------- --------- ------------------ -------------------------
   0:00:00    256.0     0.00      0.0      0.0                         
   0:00:00    256.0     0.00      0.0      0.0                         
   0:00:00    256.0     0.00      0.0      0.0

Beginning MappingOptimizations  (Ultra Higheffort)  (Incremental)
  -------------------------------

Beginning Delay Optimization Phase
  ----------------------------------

ELAPSED           WORST NEG TOTAL NEG DESIGN                           
   TIME     AREA     SLACK    SLACK   RULECOST        ENDPOINT        
  --------- --------- --------- ------------------ -------------------------
   0:00:00    256.0     0.00      0.0      0.0

Beginning Area-Recovery Phase (max_area 0)
  -----------------------------

ELAPSED           WORST NEG TOTAL NEG DESIGN                           
   TIME     AREA     SLACK    SLACK   RULECOST        ENDPOINT        
  --------- --------- --------- ------------------ -------------------------
   0:00:00    256.0     0.00      0.0      0.0                         
   0:00:00    256.0     0.00      0.0      0.0                         
   0:00:00    256.0     0.00      0.0      0.0                         
   0:00:00    256.0     0.00      0.0      0.0                         
   0:00:00    256.0     0.00      0.0      0.0                         
   0:00:00    256.0     0.00      0.0      0.0

Optimization Complete
  ---------------------
  Transferring design 'mux2_1' to database'mux2_1.db'

Current design is 'mux2_1'.
1
# Now that the compile is complete report on the results
report_area
Information: Updating design information... (UID-85)
 
****************************************
Report : area
Design : mux2_1
Version: V-2004.06-SP1
Date   : Mon Nov 27 00:54:532006
****************************************

Library(s) Used:

osu018_stdcells (File:/projects/cad/open_source_synth_libs/osu_stdcells/lib/tsmc018/lib/osu018_stdcells.db)

Number ofports:              13
Number ofnets:               17
Number ofcells:               8
Number ofreferences:          2

Combinationalarea:       256.000000
Noncombinationalarea:      0.000000
Net Interconnectarea:     undefined  (No wire load specified)

Total cellarea:          256.000000
Totalarea:                undefined
1
report_timing
 
****************************************
Report : timing
       -path full
       -delay max
       -max_paths 1
Design : mux2_1
Version: V-2004.06-SP1
Date   : Mon Nov 27 00:54:532006
****************************************

Operating Conditions:typical   Library:osu018_stdcells
Wire Load Model Mode: top

Startpoint: sel (input port)
  Endpoint: out[0] (output port)
  Path Group: default
  Path Type: max

Point                                   Incr      Path
 -----------------------------------------------------------
  input externaldelay                    0.00      0.00 r
  sel(in)                                0.13      0.13 r
  U20/Y(MUX2X1)                          0.15      0.28 f
  U19/Y(INVX2)                           0.03      0.31 r
  out[0](out)                            0.00      0.31 r
  data arrivaltime                                  0.31

max_delay                               0.50      0.50
  output externaldelay                   0.00      0.50
  data requiredtime                                 0.50
 -----------------------------------------------------------
  data requiredtime                                 0.50
  data arrivaltime                                 -0.31
 -----------------------------------------------------------
  slack(MET)                                        0.19

1
# Finally write the post synthesis netlist out to a verilogfile
write -f verilog mux2_1 -output mux2_1_post_synth.v-hierarchy
1
exitInformation: Defining new variable'synlib_iis_accept_all_gened_impl'. (CMD-041)

Thank you...

基本就可以了  成功后可以分析一下代码写的过程 基本就可以搞懂怎么实现脚本的书写了
要注意的有两点 
首先要修改设置里面的目录。
其次是脚本语言的后缀要写对
这样在没有问题执行以后

dc_shell教程相关推荐

  1. 安装design compiler的教程

    安装design compiler的教程 教程开始 design compiler工具介绍和所需环境 准备工作 启动installer安装软件 安装DC和scl 在windows下生成license以 ...

  2. 使用Docker搭建svn服务器教程

    使用Docker搭建svn服务器教程 svn简介 SVN是Subversion的简称,是一个开放源代码的版本控制系统,相较于RCS.CVS,它采用了分支管理系统,它的设计目标就是取代CVS.互联网上很 ...

  3. mysql修改校对集_MySQL 教程之校对集问题

    本篇文章主要给大家介绍mysql中的校对集问题,希望对需要的朋友有所帮助! 推荐参考教程:<mysql教程> 校对集问题 校对集,其实就是数据的比较方式. 校对集,共有三种,分别为:_bi ...

  4. mysql备份psb文件怎么打开_Navicat for MySQL 数据备份教程

    原标题:Navicat for MySQL 数据备份教程 一个安全和可靠的服务器与定期运行备份有密切的关系,因为错误有可能随时发生,由攻击.硬件故障.人为错误.电力中断等都会照成数据丢失.备份功能为防 ...

  5. php rabbmq教程_RabbitMQ+PHP 教程一(Hello World)

    介绍 RabbitMQ是一个消息代理器:它接受和转发消息.你可以把它当作一个邮局:当你把邮件放在信箱里时,你可以肯定邮差先生最终会把邮件送到你的收件人那里.在这个比喻中,RabbitMQ就是这里的邮箱 ...

  6. 【置顶】利用 NLP 技术做简单数据可视化分析教程(实战)

    置顶 本人决定将过去一段时间在公司以及日常生活中关于自然语言处理的相关技术积累,将在gitbook做一个简单分享,内容应该会很丰富,希望对你有所帮助,欢迎大家支持. 内容介绍如下 你是否曾经在租房时因 ...

  7. Google Colab 免费GPU服务器使用教程 挂载云端硬盘

    一.前言 二.Google Colab特征 三.开始使用 3.1在谷歌云盘上创建文件夹 3.2创建Colaboratory 3.3创建完成 四.设置GPU运行 五.运行.py文件 5.1安装必要库 5 ...

  8. 理解和实现分布式TensorFlow集群完整教程

    手把手教你搭建分布式集群,进入生产环境的TensorFlow 分布式TensorFlow简介 前一篇<分布式TensorFlow集群local server使用详解>我们介绍了分布式Ten ...

  9. 高级教程: 作出动态决策和 Bi-LSTM CRF 重点

    https://www.zhihu.com/question/35866596 条件随机场 CRF(条件随机场)与Viterbi(维特比)算法原理详解 https://blog.csdn.net/qq ...

最新文章

  1. 硬件丨十大人工智能芯片厂商
  2. Hadoop应用实战100讲(二)-Hadoop常用命令汇总
  3. 易开发创始人潘俊勇:这些年我遇到的那些坑
  4. python多线程读取文件夹下的文件_是否可以使用python多线程从文件夹数读取文件数,并处理这些文件以获得组合结果?...
  5. LSI SAS 3108 配置操作
  6. Releasing Contexts 释放上下文
  7. CentOS 7中iptables服务暂停启动和保存备份
  8. python实现自动打电话软件_全自动手势联系软件 让你轻轻松松打电话
  9. javascript兼容性:IE6/7关闭浏览器操作
  10. 5天玩转C#并行和多线程编程 —— 第二天 并行集合和PLinq
  11. python处理access数据库教程_Python操作Access数据库基本操作步骤分析
  12. 【2022】APP-IOS客户端Android客户端安全性测试-常见问题
  13. Excel填充日期和星期
  14. cs1.6正版僵尸服务器ip,cs1.6僵尸服务器
  15. wifi网卡工作模式和iwconfig
  16. 2020-11-25
  17. 千牛2015卖家版官方电脑版
  18. python 树莓派实验一:跑马灯
  19. 智力开发(赛马问题)
  20. 奶爸英语学习课程要点(4-6课)

热门文章

  1. 集结产学研力量,openGauss南京用户组正式成立
  2. 有个厉害的程序员老婆是什么体验?,最新JAVA面试合集
  3. win10 设置webDav网络硬盘
  4. ventuz连接mysql8.0操作
  5. 图像 文本 列表 字体使用
  6. RabbitMQ work quene 模式
  7. 常见的激活函数(Sigmoid,tanh双曲正切,ReLU修正线性单元,Leaky ReLU函数)
  8. 【HuoLe的面试凉经】
  9. 练习1-10 人生若只如初见,何事秋风悲画扇
  10. Codeforces 1143C