junmin's profileAmeng spacePhotosBlogLists Tools Help

Blog


    July 03

    关于扫描链的一点体会

    set test_disable_find_best_scan_out "true"
    set test_dont_fix_constraint_violations "true"
    set test_dedicated_subdesign_scan_outs "false"

     

    这三句一定要加在脚本的最前面,千万不能省事的认为加载dc_setup文件中就可以了,事实证明是不行的。

    加了这三句话,可以保证扫描链在串连时非常干净,中间都是上级输出直接连接到本级SI端,中间没有buf等。

    还有要注意的是:

    在dc的xg模式下,扫描链时钟的周期不用设置成100,如果是100,会引起串连后drc校验不过。从而引起

    不能检查覆盖率,不能产生spf文件,tmax不能使用。

    好像连扫描链的def文件都不能生成了。

     

    具体原因还不清楚,以后慢慢摸索着补上。

    成功解决 measure_sco 问题的DFT脚本流程

    Pls ans the following.
    Is this test-ready design?
    Sunil Budumuru
    Added after 3 hours 38 minutes:
    Dear Friend,
    U can try the following flow.
    read_file -format ddc mapped/compile_top.ddc
    Current_design xxxxxx
    Link
    compile_ultra -num_cpus 4 –scan
    create_port -direction "in" {Reset TEST_MODE}
    Current_design xxxxxx
    Link
    change_names -rules verilog -verbose -hierarchy
    write -f verilog -h -o mapped/scan_replaced.v
    # DFT variable declaration
    set test_default_period 10
    set test_default_bidir_delay 0
    set test_default_delay 0
    set test_default_min_fault_coverage 98
    set test_default_scan_style "multiplexed_flip_flop"
    set test_default_strobe 4
    test_stil_multiclock_capture_procedures = true
    set_scan_configuration -chain_count 6 \
    -add_lockup true \
    -internal_clocks multi\
    -clock_mixing mix_clocks \
    -style multiplexed_flip_flop
    ##############scan path #############
    set_dft_signal -view spec \
    -hookup_pin [get_pins p0in_pad/DI] \
    -port [get_ports Pin_PAD] \
    -hookup_sense non_inverted \
    -type ScanDataIn
    set_dft_signal -view spec \
    -hookup_pin [get_pins p0out_pad/DO] \
    -port Pout_PAD \
    -hookup_sense non_inverted \
    -type ScanDataOut
    set_scan_path chain0 -view spec \
    -scan_data_in [get_ports Pin_PAD] \
    -scan_data_out [get_ports Pout_PAD]
    set_dft_signal -view existing_dft -type ScanClock -timing {4.5 5.5} -port clk
    set_dft_signal -view existing_dft -type ScanClock -timing {4.5 5.5} -port wb_clk_lower
    set_dft_signal -view existing_dft -type Reset -active 0 -port Reset
    set_dft_signal -view existing_dft -type Constant -active 1 -port TEST_MODE
    set_dft_signal -view existing_dft \
    -port [get_ports [list TEST_MODE]] \
    -hookup_sense non_inverted \
    -type TestMode \
    -active_state 1
    set_dft_signal -view spec \
    -port [get_ports [list TEST_MODE]] \
    -hookup_sense non_inverted \
    -type TestMode \
    -active_state 1
    #autofix
    #set the signal to use
    set_dft_signal -type TestMode -port TEST_MODE
    set_dft_signal -type TestData -port clk
    set_dft_signal -type TestData -port wb_clk_lower
    set_dft_signal -type TestData -port Reset
    set_dft_configuration \
    -fix_bidirectional disable \
    -scan enable \
    -fix_clock enable \
    -fix_set enable \
    -fix_reset enable
    set_autofix_configuration -type clock \
    -include_elements [get_object_name [all_registers ] ] \
    -method mux \
    -control_signal TEST_MODE \
    -test_data wb_clk_lower
    set_autofix_configuration -type clock \
    -include_elements [get_object_name [all_registers ] ] \
    -method mux \
    -control_signal TEST_MODE \
    -test_data clk
    set_autofix_configuration -type reset \
    -method mux \
    -control_signal TEST_MODE \
    -test_data Reset
    set_autofix_configuration -type set \
    -method mux \
    -control_signal TEST_MODE \
    -test_data Reset
    ######## Test Protocal creation ######################
    create_test_protocol -infer_clock -capture_procedure multi_clock
    write_test_protocol -out protocol.spf
    dft_drc -pre_dft -verbose > reports/dftdrc_prescan.rpt
    ################ preview dft ###########################
    preview_dft -test_points all > reports/preview_dft_tp.rpt
    preview_dft -show all > reports/preview_dft_all.rpt
    ################ Stritch the Scan Cells #################
    insert_dft
    # postscan drc
    dft_drc -verbose > reports/dft_drc_postscan.rpt
    # output netlist
    change_names -rules verilog -verbose -hierarchy
    write -f verilog -h -o output/top_postscan.vs
    write_scan_def -o vpc_top.def
    # coverage
    estimate_test_coverage -sample 99 > reports/dft_coverage.rpt
    pls update the results.
    asic-dft.com
    Added after 3 minutes:
    once u r done with the above run, from next time onwards, u can use "scan_replaced.v"
    to avoid your compile.
    Just read the scan replaced netlsit and do the R&D on that.

    ic610启动时X11问题

    不知道有没有大侠在Red hat enterprise 5下安装ic610的?
    我在安装时遇到下面的问题:
    Initializing InstallScape using JVM at /eda_soft/Cadence/InstallScape/iscape/runtime/LNX86/bin/java. This might take some time...
    Exception in thread "main" java.lang.UnsatisfiedLinkError: /eda_soft/Cadence/InstallScape/iscape/runtime/LNX86/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory

    at java.lang.ClassLoader$NativeLibrary.load(Native Method)

    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)

    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503)

    at java.lang.Runtime.loadLibrary0(Runtime.java:788)

    at java.lang.System.loadLibrary(System.java:834)

    at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)

    at java.security.AccessController.doPrivileged(Native Method)

    at java.awt.Toolkit.loadLibraries(Toolkit.java:1437)

    at java.awt.Toolkit.<clinit>(Toolkit.java:1458)

    at com.khanpur.installer.gui.InstallerUI.main(InstallerUI.java:70)

    然后就退出了,不知道如何解决?

    *************************************

    下载libXp.so.6安装可解决这个在RHEL5上安装ic610的问题!

    **************************************

    启动icfb时出现如下错误:
    \e Display :0.0 Error "BadWindow (invalid Window parameter)"
    \e
    request 12 error 3 serial 1738
    \e Display :0.0 Error "BadWindow (invalid Window parameter)"
    \e
    request 10 error 3 serial 1739
    \e Display :0.0 Error "BadWindow (invalid Window parameter)"
    \e
    request 10 error 3 serial 1740
    \e Display :0.0 Error "BadWindow (invalid Window parameter)"
    \e
    request 15 error 3 serial 1741
    \o
    © 1992-2006
    UNIX SYSTEMS Laboratories INC.,
    \e Display :0.0 Error "BadDrawable (invalid Pixmap or Window parameter)"
    \e
    request 62 error 9 serial 1764
    \e Display :0.0 Error "BadMatch (invalid parameter attributes)"
    \e
    request 1 error 8 serial 1766
    \e Display :0.0 Error "BadDrawable (invalid Pixmap or Window parameter)"
    \e
    request 155 error 9 serial 1767
    \e Display :0.0 Error "BadWindow (invalid Window parameter)"
    \e
    request 18 error 3 serial 1768
    \e Display :0.0 Error "BadWindow (invalid Window parameter)"
    \e
    request 18 error 3 serial 1769
    \e Display :0.0 Error "BadWindow (invalid Window parameter)"
    \e
    request 18 error 3 serial 1770
    \e Display :0.0 Error "BadWindow (invalid Window parameter)"
    \e
    request 18 error 3 serial 1771
    \e Display :0.0 Error "BadWindow (invalid Window parameter)"
    \e
    request 18 error 3 serial 1772
    \e Display :0.0 Error "BadWindow (invalid Window parameter)"
    \e
    request 12 error 3 serial 1773
    \e Display :0.0 Error "BadWindow (invalid Window parameter)"
    \e
    request 18 error 3 serial 1774
    \e Display :0.0 Error "BadWindow (invalid Window parameter)"
    \e
    request 18 error 3 serial 1775
    \e Display :0.0 Error "BadWindow (invalid Window parameter)"
    \e
    request 18 error 3 serial 1776
    不知道是什么情况?请大家指教!多谢!
    ******************************************

    我遇到过相同的问题,好像是在xorg.conf里面加上下面一段就可以了,试试看
    Section "Extensions"
    Option "Composite" "Disable"
    EndSection

    *****************************************

    果然,下载libxp
    修改下Xorg.conf
    重启X就好了

    *******************************************
    在red hat enterprise 5下安装ic610的问题,查到这样一个解决的帖子,转过来大家看看,待验证.

    转自:http://bbs.stirf.com/viewthread.php?tid=12

    Downloaded the Cadence IC Design - Virtuoso (Ver 6.10) from the following site:
    http://www.verycd.com/topics/148755/
    Installed IC610 Base on the system ubuntu 7.10 using installscape. Succeeded in intel X86 system but failed in AMD64 system.
    You could install the software following the instructions from here:
    http://www.et.byu.edu/groups/ece451web/cadence-help/getstarted.html
    The installation is very easy, setup the environment after the installation.
    export LM_LICENSE_FILE= (put here where your license server or file is located)
    export CDS_LIC_FILE = (put here where your license server or file is located)
    export LD_LIBRARY_PATH = (library paths of ic and ldv ic/tools/lib, ldv/tools/lib, spr/tools/lib, soc/tools/lib)
    export OA_HOME = (OA installed directory)
    export CDS_SITE = (location of NCSU design kit installation directory - …/NCSU/local)
    export CDS_Netlisting_Mode=Analog
    export USE_NCSU_CDK
    export CDS = (NCSU design kit directory …/NCSU/local/cdssetup)
    export PATH=$PATHall cadence tool directories that are required are listed below)

    …/ic/tools/bin
    …/ic/tools/dfII/bin
    …/ic/tools/concice/bin
    …/ic/tools/dracula/bin
    …/ic/tools/plot/bin
    …/ldv/tools/bin
    …/spr/tools/bin
    …/soc/tools/bin
    …/icc/tools/iccraft/bin

    The problems I’ve met when I tried to run icfb:
    1. Code:
    Qt Warning: X Error: BadWindow (invalid Window parameter) 3
    Major opcode: 2 (X_ChangeWindowAttributes)
    Resource id: 0×2e00011

    and
    Code:
    Display :0.0 Error “BadWindow (invalid Window parameter)”
    \e request 18 error 3 serial 1392
    It will not be appeared when using ssh connection from windows client, so it seems to be the linux display problems. You could simply solve this promblem by adding following scripts in the /etc/X11/Xorg.conf file:
    Code:
    Section “Extensions”
    Option “Composite” “Disable”
    EndSection
    2.
    Quote:
    /usr/local/cadence/IC610/tools/dfII/bin/icfb: 97: cds_plat: not found
    /usr/local/cadence/IC610/share/oa/bin/sysname: 328: /bin/awk: not found
    /usr/local/cadence/IC610/tools/dfII/bin/32bit/icfb.exe: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory

    Ignored the first problem first.
    The sencond problem could be solved easily: make a awk link in /bin using this command
    Quote:
    sudo ln -s /usr/bin/awk /bin/awk
    apt-cache search libelf and apt-get install libelf**
    If the error still existed, make a link libelf.so.1, first find available libelf useing
    Quote:
    ls -l libelf*
    some file name will show up, then make a link to it using
    Quote:
    ln -s /use/lib/ /usr/lib/libelf.so.1
    In AMD64 system require liblbss.so* rather than libelf.so.1. Haven’t solved this problem yet.
    Then the icfb could be started up now, but the first problem will still exist. I dont know how to solve but just adding a comment at the begin of the sentence where calling for cds_plat.
    3. The other problem met: cant open online help document.
    export MOZILLA_HOME=/usr/bin/netscape , but it seems not working on my machine.

    [ 本帖最后由 castlerock 于 2008-8-1 18:08 编辑 ]

    July 02

    关于DFT插入时,扫描链上传入很多BUF的问题

    最近研究DFT的时候发现在产生的def文件中有大量的BUF问题。这说明串连的时候不是从

    前一个触发器的Q端直接到本触发器的SI端,而是中间进过了BUF。

    在ASTRO中,网表读入后,总是会先删除BUF和成对出现的INV,因此,

    在ASTRO串连的时候经常会出现 找不到触发器的下一级 的问题

    经过研究,找到的解决办法如下

    在脚本文件的开头,添加下面的参数

     

    set test_disable_find_best_scan_out "true"   ;#不允许寻找最佳的scan out点,直接串连触发器
    set test_dont_fix_constraint_violations "true";# 不允许对串连后引起的约束告警进行修理,因为ASTRO会自己打断链,修理没有必要
    set test_dedicated_subdesign_scan_outs "false" ;#禁止对子模块添加专门的测试输出口。这个是引入BUF的重要原因。

     

     

    完整的脚本如下

    set test_disable_find_best_scan_out "true"
    set test_dont_fix_constraint_violations "true"
    set test_dedicated_subdesign_scan_outs "false"

    set mdir /home/source
    source $mdir/script/micro.tcl

    read_file -format db $mdir/netlist/mapped/$Isp_rfilename.db
    set verilogout_no_tri true
    set_fix_multiple_port_nets -all -buffer_constants [get_designs *]

    source $mdir/script/nouse.tcl

    set_scan_configuration -style multiplexed_flip_flop -clock_mixing  no_mix -internal_clocks false
    set_scan_configuration -add_lockup true -chain_count 6 -dedicated_scan_ports true
    set_scan_configuration -prtool avant

    create_test_clock CLK -internal_clocks false -period 100 -waveform " 45 55"

    set_dft_signal test_mode  -port SCAN_TEST -hookup IN02/D
    set_test_hold 1 SCAN_TEST

    set_scan_signal test_scan_enable -port SCAN_ENA -hookup IN04/D

    set_signal_type test_asynch_inverted RESET_N

    set_scan_path chain1 -insert_terminal_lockup true 

    set_scan_signal test_scan_in  -port PIN_SI0 -chain chain1 -hookup IN05/D
    set_scan_signal test_scan_out -port PIN_SO0 -chain chain1 -hookup OUT01/A

    set_scan_path chain2 -insert_terminal_lockup true

    set_scan_signal test_scan_in  -port PIN_SI1 -chain chain2  -hookup IN74/D
    set_scan_signal test_scan_out -port PIN_SO1 -chain chain2  -hookup OUT38/A

    set_scan_path chain3 -insert_terminal_lockup true
    set_scan_signal test_scan_in  -port PIN_SI2 -chain chain3 -hookup IN75/D
    set_scan_signal test_scan_out -port PIN_SO2 -chain chain3  -hookup OUT39/A

    create_test_protocol

    preview_dft
    dft_drc

    insert_dft
    dft_drc -coverage_estimate
    write_test_protocol -output    $mdir/netlist/mapped/$Isp_wfilename.unflatten.spf
       write_layout_scan

       define_name_rules verilog -equal_ports_nets -inout_ports_equal_nets -remove_internal_net_bus -remove_port_bus
       change_names -rules verilog -hierarchy -verbose

       write -hierarchy -f db -o      $mdir/netlist/mapped/$Isp_wfilename.db
       write -hierarchy -f verilog -o $mdir/netlist/mapped/$Isp_wfilename.v
       write_sdc                      $mdir/netlist/mapped/$Isp_wfilename.sdc

       remove_unconnected_ports -blast_buses [find cell -hierarchy * ]
       write -hierarchy -f db -o      $mdir/netlist/mapped/$Isp_wfilename.rm-uc.db
       write -hierarchy -f verilog -o $mdir/netlist/mapped/$Isp_wfilename.rm-uc.v
       write_sdc                      $mdir/netlist/mapped/$Isp_wfilename.rm-uc.sdc

    exit

     

    June 22

    关于时钟的定义

    在综合后仿真的时候,发现时钟2选1的输出为亚稳态,

    在断开时钟输出以后,2选一输出正常。由此判断是因为

    输出负载过重引起。

    解决办法:

    重新定义时钟起始点。

    起始点重新定义在2选1的输出端Y上

    create_clock –name “aclk” –period 18 –waveform { 0 9}  systop/clkgen/aclk/Y

    也许这种定义方法明确了时钟的起始点,

    在定义复位等一类负载较大的线的时候应该也可以使用。

    June 19

    DC 配置输入输出管脚驱动问题

    命令为

    v1999.10 PrimeTime Commands

    set_driving_cell

    Sets the port driving cell.

    SYNTAX

    string set_driving_cell [-lib_cell lib_cell_name] [-rise] [-fall] [-min] [-max] [­library lib_name] [-pin pin_name] [-from_pin pin_name] [-multiply_by factor] [-dont_scale] [-no_design_rule] port_list stringlib_cell_name stringlib_name stringpin_name stringpin_name float factor float rtran float ftran list port_list

    ARGUMENTS

    -lib_cell lib_cell_name Specifies the name of the library cell used to drive the ports. If the cell has more than one output pin, -pin must be used. If different cells are needed for the rising and the falling cases, use separate commands with the -rise and -fall options. To choose between multiple input pins with arcs to this output pin, use -from_pin

    -rise Sets driving_cell information for the rising port transition only.

    -fall Sets driving_cell information for the falling port transition only.

    -min Sets driving_cell information for the minimum analysis only. This option is only valid in min-max mode.

    -max Sets driving_cell information for the minimum analysis only. This option is valid even when not in min-max mode. When not in min-max mode, the option is not required because this option is the default.

    -library lib_name Specifies the name of the library where to find library_cell_name; the library of the driving cell. By default, the libraries in link_library are searched for the cell.

    -pin pin_name Specifies the output pin whose drive is used; the driving pin name. If you do not specify -from_pin, an arbitrary pin arc ending at the specified pin is used.

    HOME CONTENTS / 452

    v1999.10 PrimeTime Commands

    -from_pin pin_name Specifies an input pin on the specified cell so the drive of the timing arc from this pin to the specified pin is used.

    -multiply_by factor Multiplies the calculated transition time by the specified multiplier. Transition multiplier (Range: greater than or equla to 0).

    -dont_scale Prevents operating condition scaling. Indicates that the timing analyzer is not to scale the drive capability of the ports according to the current operating conditions. By default, the port drive capability is scaled for operating conditions exactly as the driving cell itself would have been scaled.

    -no_design_rule Specifies not to transfer design rules from the driving cell to the port. If you do not specify this option, the design rules (such as max_capacitance) of the library pin are applied to the port.

    -input_transition_rise rtranfp Specifies the input rising transition time associated with -from_pin. If this is not specified, the default value is 0. This and the -input_transition_fall option are used to capture the accurate transition time associated with ­from_pin, such that more acurate transition time and delay time at the output pin can be obtained.

    -input_transition_fall ftranfp Specifies the input falling transition time associated with -from_pin. If this is not specified, the default value is 0.

    port_list Provides a list of input ports. The list contains input or inout port names in the current design on which the driving cell information is set.

    DESCRIPTION

    Sets attributes on the specified input or inout ports in the current design to associate an external driving cell with the ports. The drive capability of the port is the same as if the specified driving cell were connected in the same context to allow accurate modeling of port drive capability for nonlinear delay models. Unless you specify -dont_scale, the drive capability of the port is scaled according to the current operating conditions.

    To view drive information on ports, use report_port -drive.

    The characterize_context command automatically sets driving cell information on subdesign ports based on their context in the entire design.

    Use the remove_driving_cell command to remove driving cell information from ports.

    Note: The set_driving_cell command removes any corresponding drive resistance or input transition attributes (from set_drive_resistance or set_input_transition) on the specified ports. If possible, always use set_driving_cell instead of

    HOME CONTENTS / 453

    v1999.10 PrimeTime Commands

    set_drive_resistance, because set_driving_cell allows accurate calculation of port delay and transition time for library cells with nonlinear dependence on capacitance.

    EXAMPLES

    pt_shell> set_driving_cell -lib_cell AND [get_ports A] pt_shell> report_port -drive A

    **************************************** Report : port -drive Design : counter Version: 1997.08 Date : Tue 1996 ****************************************

    Resistance Transition Input Port Rise Fall Rise Fall

    A -- -- -- -­

    Driving Cell Input Port Rise Fall Mult Attrs

    A AND AND -­

    SEE ALSO

    all_inputs (2), characterize_context (2), remove_driving_cell (2), report_port (2), reset_design (2), set_drive_resistance (2), set_input_transition (2), set_capacitance (2).

    HOME CONTENTS / 454

    实例为:

    set_driving_cell –lib_cell INVX8HS –pin Y –library sagehs_smic_013g_ss_1p08v_125c [all_inputs]

    pt2228_页面_1 pt2228_页面_2 pt2228_页面_3

    June 14

    终于解决了头痛的measure_sco必须在最后的问题了!!!

    注意: 我的dc版本是2007的,其他的不知道行不行。

    我是才开始学习dft的设计。电路很简单,就是1万多触发器要穿起来,memory不用管,在测试模式下直接用测试向量测试。

    机器用的是dell的755,4核cpu,8g内存。

    系统用的是suse11.1

    整个平台还可以,就是有时候容易不知不觉的死机,我估计和无线网络有关系。

    在做dft的覆盖率测试的时候,碰到了下面的问题

    dft_drc
    In mode: Internal_scan...
    Design has scan chains in this mode
      Design is scan routed
      Post-DFT DRC enabled
    Information: Starting test design rule checking. (TEST-222)
      Loading test protocol
      ...basic checks...
      ...basic sequential cell checks...
      ...checking vector rules...
    Error: illegal context (measure_sco must be the last event in procedure "shift"). (V8-1)
    Error: Could not perform design rule checking. (TEST-1311)
    0

     

    尝试了很多办法,为了不耽误工作,甚至更换了各种linux系统,

    还跑到unix下面用尝试了一下05版dc。

    结果发现在工作站上用05版dc可以跑通。没有错误。可是无奈工作站非常慢,至少要20小时才能出结果。

    只好在空闲的时候继续尝试在pc机的linux下面进行scan的插入。

    经过多种尝试,今天终于跑通了。

    下面说一下方法:

    首先,要用dc的db模式,不能用xg模式。方法是在命令后面加-db_mode

    其次,必须使用命令行模式,图形界面不太行(我也不太确定,毕竟没有其他的版本给我使用)

    命令为  dc_shell-t –db_mode

    最后,是各种命令的选择和搭配。

    在dc的不同版本,不同模式下面支持的scan命令是不一样的。大家要注意命令的选择。

    我使用的是下面的命令。scan用到得各种信号基本上都概括了。

    推荐大家看看几个文档

    第一个

    Test Automation Quick Reference
    Version 1999.10, October 1999

    image

     

    类似于 dft中复位信号的高低有效定义就是在这里找到的。

    第二个 这个文件没有名字 好像是cic的培训文档,大家可以找找看,

    我也发过这个文档 连接是 http://edacn.net/bbs/viewthread.php?tid=152802

    image

    这个文档里面讲了各种问题的处理方法。缺点是给出的命令例子不一定适合你的dc版本,需要改动。

    set_scan_configuration -style multiplexed_flip_flop -clock_mixing
    mix_clocks -internal_clocks false
    set_scan_configuration -add_lockup true -chain_count 3
    -dedicated_scan_ports true
    create_test_clock SCAN_CLK -internal_clocks true -period 100 -waveform "
    45 55"
    set_dft_signal test_mode  -port SCAN_TEST
    set_test_hold 1 SCAN_TEST
    set_signal_type test_asynch_inverted RESET_N
    set_scan_path chain1 -chain_length 5000 -clock SCAN_CLK
    set_scan_signal test_scan_enable -port SCAN_ENA -chain chain1
    set_scan_signal test_scan_in  -port PIN_SI0 -chain chain1
    set_scan_signal test_scan_out -port PIN_SO0 -chain chain1
    set_scan_path chain2 -chain_length 5000 -clock SCAN_CLK
    set_scan_signal test_scan_enable -port SCAN_ENA -chain chain2
    set_scan_signal test_scan_in  -port PIN_SI1 -chain chain2
    set_scan_signal test_scan_out -port PIN_SO1 -chain chain2
    set_scan_path chain3 -chain_length 5000 -clock SCAN_CLK
    set_scan_signal test_scan_enable -port SCAN_ENA -chain chain3
    set_scan_signal test_scan_in  -port PIN_SI2 -chain chain3
    set_scan_signal test_scan_out -port PIN_SO2 -chain chain3
    create_test_protocol
    preview_dft
    dft_drc
    insert_dft
    dft_drc -estimate_test_coverage
    write_test_protocol -output    $mdir/netlist/mapped/$Isp_wfilename.spf
    report_constraint -all_violators
    report_scan_path
    #estimate_test_coverage

    June 04

    使用循环语句对模块进行处理

    set mdir /home/source
    source $mdir/script/micro.tcl

    read_file -format ddc $mdir/netlist/unmapped/$Dcs_rfilename.ddc
    set verilogout_no_tri true                                                           #防止出现tri声明
    set_fix_multiple_port_nets -all -buffer_constants [get_designs *]
    set_dont_touch [find cell {PSBI* PSV*}]
    source /home/source/script/smic13_nouse.tcl

    foreach_in_collection itr [get_designs *] {        #对所有的design进行下面的处理
    current_design $itr
    set ctrdesign [get_object_name $itr]               #提取当前design的名称
    set ssize     [sizeof_collection [all_registers] ]   #提取当前design的触发器数目
    uniquify
    link
    echo "Number of registers of [get_object_name $itr] is [sizeof_collection [all_registers] ]" >> register.txt #输出所有design的触发器信息到文件
    compile -scan
    define_name_rules verilog -equal_ports_nets -inout_ports_equal_nets -remove_internal_net_bus -remove_port_bus
    change_names -rules verilog -hierarchy -verbose
    sizeof_collection [all_registers]   > $mdir/netlist/submodule/20090603.$ctrdesign.$ssize.txt
    report_resources                      > $mdir/netlist/submodule/20090603.$ctrdesign.resources.txt
    report_register -level_sensitive   > $mdir/netlist/submodule/20090603.$ctrdesign.latch_report.txt
    report_hierarchy                      > $mdir/netlist/submodule/20090603.$ctrdesign.celltype.txt
    write -format verilog -hierarchy -o $mdir/netlist/submodule/20090603.$ctrdesign.netlist.v

    }

    June 03

    查找综合后网表中的 锁存器

    使用下面的命令

    report_register –level_sensitive

    字面意思是报告电平敏感的触发器

    June 01

    在DC综合中要求打散总线

    #设置名称规则 verilog 中打散总线。包括 模块内部总线 和 模块端口总线

    define_name_rules verilog –remove_internal_net_bus –remove_port_bus

    #执行名称规则 verilog 在所有的层次中

    change_names –rules verilog –hierarchy -verbose

    May 30

    避免在综合后出现assign,脚本的顺序应该如下。

    #读入代码

    1 read_verilog rtl.v

    #防止出现tir类型

    2 set verilogout_no_tri true 
    #防止出现assign

    3 set_fix_multiple_port_nets -all -buffer_constants [get_designs *];
    4 compile

    #防止出现assign
    5 define_name_rules -equal_ports_nets -inout_ports_equal_nets verilog
    6 change_names -rules verilog –hierarchy
    #写回网表

    7 write_file -f verilog -hierarchy -output rtl.vnet

    May 12

    关于DFT的想法

    昨天看了一篇文档,突然有个想法。

    如果把SCAN CLK的频率设置的低一点,会不会对插入scan以后的电路的时序要求会降低呢?

    虽然用命令

    set_dft_signal -view existing_dft -type ScanClock   -port SCAN_CLK   -timing {40 70}

    设置了时钟的上升和下降沿,但是没有指定周期。本命令 默认的周期是100纳秒,但是还是不敢肯定,

    所以更改为下面的不知道合适不 。

    set_dft_signal -view existing_dft -type ScanClock   -port SCAN_CLK   -timing {50 100}  -period 100

    明确规定一下上升沿在50纳秒,下降沿在100纳秒位置,周期为100纳秒,频率为10兆,这样的时钟应该没有时序问题了。

    在设置插入scan链的时候,只考虑了插入命令insert_scan,并没有考虑插入的具体形式,

    试想 一下,电路中触发器大概有几万个,如果全靠软件自己插入的话,应该是一种无序的状态,有可能吧两个相隔

    非常遥远的触发器穿在一起,这样有可能引起电路本身时序的不满足,即电路主时钟的时序不满足。

    如果能够对每一条测试链的长度和所穿连的触发器进行规定。那么这种无序的状态就能得到改善。

    May 05

    set_input_delay/ set_output_delay之图解

    转贴: 来源 : http://blog.ednchina.com/codeman/198443/message.aspx

    set_input_delay/ set_output_delay

    在与时钟选项定义的时钟相关的输入port上定义data arrival time,可将输入延时定义与上升沿或下降沿相关。

    如果输入延时与简单的生成时钟相关,到生成时钟的clock arrival time要加到data arrival time上。

    输入延时可以定义与时钟网络中的port相关,到参考port的clock arrival time要加到data arrival time上。

    输入延时可以包含时钟源延时,默认条件下,相关的时钟源延时加到输入延时上;但是,当定义-source_latency_included选项时,时钟源延时不要相加,因为它并没有用作为input delay value的时序因素。

    max用在时钟建立时间或恢复(recovery)校验上,min用于时钟保持时钟或移除(removal)校验上。

    # Simple input delay with the same value for min/max and rise/fall:

    # 1) set on ports with names of the form myin*

    set_input_delay -clock clk 1.5 [get_ports myin*]

    # 2) set on all input ports

    set_input_delay -clock clk 1.5 [all_inputs]

    # Input delay with respect to the falling edge of clock

    set_input_delay -clock clk -clock_fall 1.5 [get_ports myin*]

    # Input delays for different min/max and rise/fall combinations

    set_input_delay -clock clk -max -rise 1.4 [get_ports myin*]

    set_input_delay -clock clk -max -fall 1.5 [get_ports myin*]

    set_input_delay -clock clk -min -rise 0.7 [get_ports myin*]

    set_input_delay -clock clk -min -fall 0.8 [get_ports myin*]

    ============================================

    以上内容摘自Quartus help,基本定义edn上很多仁兄已经讲的很清楚了。

    看下面简单的例子,两级触发器,来自

    http://www.altera.com.cn/support/examples/timequest/exm-timequest.html

    设计图:

    点击看大图

    很简单的例子,仅仅加时钟周期约束的条件下,用TimeQuest分析仅会得到一路path的分析,reg1 to reg2,时序图如下:

    点击看大图

    这张图已经有人做过了仔细的分析,可以清楚地看到各个参数的大小。
    下面三张图是加约束后的时序分析图,所加的条件是:

    set_input_delay -clock { clk_in } -add_delay 1.200 [get_ports {data_in}]

    set_output_delay -clock { clk_in } -add_delay 2.000 [get_ports data_out]

    重新运行TimeQuest,可以看到3个path分析
    1) data_in to reg1
    点击看大图
    2) reg1 to reg2
    点击看大图
    3) reg2 to data_out
    点击看大图

    可以看到,输入路径在data arrival time上加上了input delay;输出路径在data required time上减去了output delay;分别表现为对setup和hold时间的影响。

    April 29

    dft学习结果

    最近用了个小例子在学习dft,最后还是弄得不太清楚.

    放上来,以后接着研究.不能放附件,所以只好贴代码了

    下面是源代码

    module dfttest(clk,reset,            // SCAN PIN  SCAN
                       SCAN_TEST,
                       SCAN_CLK, SCAN_ENA,
                       PIN_SI,
                       PIN_SO,
    pulse);
    input clk,reset;
    output pulse;
    input SCAN_ENA,PIN_SI,SCAN_TEST,SCAN_CLK;//,SCAN_RST;
    output PIN_SO;
    reg [2:0] counter;
    wire clkin,resetin;
    reg [2:0]  puls;

    assign clkin   = SCAN_TEST ? SCAN_CLK : clk;

    always @(posedge clkin or negedge reset)
    begin
    if (~reset)
               counter <=0;
    else
      counter<=counter +1;
    end

    always @(posedge clkin)
    puls <={puls[1:0], &counter};
    assign pulse = puls[2];

    endmodule

     

    下面是脚本文件

    reset_design
    remove_design -all
    read_file -format verilog /home/test/dfttest.v
       current_design dfttest
       link
       uniquify

    set_operating_conditions -min_library sagehs_smic_013g_ff_1p32v_0c -min sagehs_smic_013g_ff_1p32v_0c  -max_library sagehs_smic_013g_ff_1p32v_0c -max sagehs_smic_013g_ff_1p32v_0c
    set auto_wire_load_selection true

    set bind_unused_hierarchical_pins true

    current_design dfttest
    create_clock -name "SCLK" -period 20 -waveform { 0.000 10.000  }  { clk  }
    set_dont_touch_network SCLK

    #******************************* insert scan **************************************
    set_scan_configuration -style multiplexed_flip_flop
    set_scan_configuration -clock_mixing no_mix
    set_scan_configuration -internal_clocks single
    set_dft_signal -view existing_dft -type TestMode    -port SCAN_TEST -active_state 1
    set_dft_signal -view existing_dft -type Reset       -port reset      -active_state 0
    set_dft_signal -view existing_dft -type ScanClock   -port SCAN_CLK   -timing {45 55}
    set_dft_signal -view existing_dft -type ScanEnable  -port SCAN_ENA   -active_state 1
    set_dft_signal -view spec         -type ScanDataIn  -port PIN_SI     -active_state 1
    set_dft_signal -view spec         -type ScanDataOut -port PIN_SO     -active_state 1

    set_scan_configuration -chain_count 1
    set_scan_path -view spec c0 -scan_data_in PIN_SI -scan_data_out PIN_SO

    set_dft_configuration -fix_clock enable -fix_reset enable -fix_set enable

    compile -scan

    create_test_protocol
    preview_dft
    insert_dft
    report_constraint -all_violators
    report_scan_path
    estimate_test_coverage
    # write_test_protocol -output /home/test/dfttest.spf
    #*********************** * end insert scan  *****************************
       write -hierarchy -f ddc -o     /home/test/dfttest.ddc
    #   write -hierarchy -f verilog -o /home/test/dfttest_post.v
    exit

    April 28

    基于Astro工具的ASIC时序分析

    摘要:在目前的ASIC设计中,时钟信号的质量对同步数字电路的影响越来越大。如何避免时序问题给电路造成的不利影响成为设计中的重要挑战。本文主要介绍了逻辑设计中值得注意的重要时序问题,以及如何克服这些问题。最后介绍了利用Astro工具进行时序分析的方法。
    关键词:ASIC;同步数字电路;时序;Astro

    引言
        随着系统时钟频率的提高,时钟偏斜和干扰开始成为IC工程师重点考虑的问题。增大时序电路的时钟频率,减小时序电路的容差能提升未来的系统性能。低偏斜时钟缓冲器和锁相环时钟驱动器将帮助设计人员设计出速度、偏斜和抗噪性能等指标满足要求的电路系统,但必须将时钟电路设计为一个时钟系统,考虑时钟分步网络的各个方面,包括驱动器、传输线路和信号布线等。

    时钟偏斜
         时钟偏斜定义为在时钟分布系统中到达各个时钟末端(即器件内部触发器的时钟输入端)的时钟相位不一致的现象。如果时钟偏斜超过所允许的最大值,电路的同步可能会发生失效。
         偏斜主要由两个因素造成:一是时钟源驱动器件的偏差,例如同一个PLL输出的不同时钟信号之间的偏斜;另一个是时钟分配网络的偏斜。由于时钟信号驱动系统中的大量元件为了达到同步必须同时接收到时钟信号,因此它们之间的任何时间差异都将直接影响系统性能。小的偏斜可以忽略,但大到一定程度就会严重影响设计的时序,因此需要在设计中尽量减小其影响。
         输出偏斜也叫做引脚到引脚的偏斜,它是指同一器件上同一跃迁的任何两个输出延时之间的差值。电子工程设计发展联合协会(JEDEC)将输出偏斜定义为单一器件输出之间的偏斜,该器件的所有驱动输入应连接在一起,输出部分在同一方向切换,并驱动相同的负载。目前,高性能时钟缓冲器中的常见输出偏斜约为200ps。
    器件到器件的偏斜也称为封装偏斜,被定义为在相同环境下工作的两个或多个独立器件的任何指定输出之间的传送延时之差。其中,相同的环境指的是相同的输入信号、电源电压、环境温度、封装、负载等。目前的高性能缓冲器中典型的元件到元件偏斜约为500ps。

    时序分析
         为了保证同步系统的正常运行,所有的时序单元必须在给定的时钟周期内正常工作。如果时序单元的总和超出了可用时间限制,系统就会发生故障。进行时序分析能够确定可能会占用时钟周期的所有因素并评估这些因素所带来的影响,令设计者了解其设计的电路能够以多快的速度运行,以及当前系统还有多大的宽裕度等。
         使用同步系统基本元件的简化设计电路如图1所示。寄存器FF1在时钟的每个上升沿驱动,输出Q1并将其作为组合逻辑电路C2的输入信号。寄存器FF2使用与FF1相同的时钟进行控制。来自于组合逻辑电路C2的数据必须先于时钟到达,即需要一定的建立时间;而且必须要持续足够的时间以便使寄存器FF2能够获得正确的输出,即需要一定的保持时间。


    图1  简单的同步系统

    解决时钟偏斜的常用方法
         时钟偏斜是不可避免的,关键问题是一个系统能够容忍多大的时钟偏斜。通常,可允许的时钟偏斜是由系统要求和工艺参数(例如时钟缓冲器与寄存器的延时)来决定的。设计思路不同,得到的时钟偏斜也不一样。用标准单元方法设计的电路通常要比全定制电路的时钟偏斜大一些。一般而言,一个系统中的流水线级越多,则由于时钟偏斜导致功能错误的可能性越大。
        在ASIC设计中,解决时钟偏斜的方法很多。比如:按与数据流相反的方向来分布时钟走线;控制时钟的非交迭时间来消除时钟偏斜;通过分析时钟分布网络来保证时钟偏斜在合理的范围内等。
        上面3种方法中最好的是通过分析时钟网络来保证合理的时钟偏斜。设计人员可以通过调整一些参数来控制时钟分布网络,以达到较好的效果。可调整的参数包括时钟网络的互连材料、时钟分布网络的形状、时钟驱动和所用的缓冲配置、时钟线上的负载(扇出)、时钟的上升和下降时间等。总之,时钟分布网络的目的就是使与时钟信号相连的功能子模块的互连线大致等长。

    Astro工具的使用
        Synopsys公司的Astro是在ASIC设计中流行的后端物理实现工具,是深亚微米芯片设计进行设计优化、布局、布线、计算时延的设计环境。Astro可以满足5千万门、GHz时钟频率、采用0.10um及以下工艺SoC设计的工程和技术需求,其基本流程如下:
    1. 读入网表,用晶圆厂提供的标准单元库、Pad库以及宏模块库进行映射; 
    2. 预布局,规定芯片的大致面积、引脚位置以及宏单元位置等粗略的布局信息;
    3. 读入时序约束文件,设置好时序建立的菜单,为后面进行时序驱动的布局布线做准备;
    4. 详细布局,力求使布线阶段能顺利满足布线布通率100%的要求和时序要求;
    5. 时钟树综合,为了降低时钟树偏斜而产生由许多驱动单元组成的时钟树;
    6. 布线,先对电源线和时钟信号布线,然后对信号线布线,目标是最大程度地满足时序;
    7. 为满足设计规则从而能成功制造出芯片而做的修补工作,如填充一些dummy单元等。
        上面7个步骤是Astro设计的基本流程,下面针对设计中的时序偏斜对第5部分时钟树综合进行重点分析。
        时钟树综合是时序优化处理中最重要的一步。时钟树综合的目的是为了减小时钟偏斜和传输延迟,通常是将最重要的时钟放到最后来综合,这是因为前面综合的时钟可能会因后面插入的缓冲器而受到影响。这些缓冲器在芯片内部应均匀分布,力求使时钟偏斜和传输延迟保持在设计范围之内。
        时钟树综合解决时钟偏斜的一般方法是:通过分析时钟线路延迟,在时钟树中插入不同尺寸不同驱动能力的缓冲器以改变时钟信号到达触发器的延时,使时钟信号能在同一时间到达各个触发器,让时钟偏斜近似为零。用这种方法可以使电路尽可能不受时钟偏斜的影响,而正确工作。时钟树综合对话框和做完时钟树优化后常见的时钟树结构模型如图2所示。


    图2  CTS对话框和生成的时钟树模型
        在进行完时钟树综合与优化之后,可得到电路的时钟树偏斜报告,报告包括全局偏斜(global skew),局部偏斜(local skew)和有用偏斜(useful skew)。此时的时序应为正,否则还要进行继续优化。

    结语
        对于复杂的同步系统而言,创建时序拓扑并进行时序分析是保证ASIC设计成功的基本因素。解决时钟偏斜的方法很多,主要目的是将时钟偏斜的影响降到最低。其实时钟偏斜并非总是给电路带来负面影响,我们还可以利用它来改进电路的时序,使电路工作在最优性能。

    参考文献
    1 Steve Furber. ARM SoC 体系结构[M] . 田泽译. 北京:北京 航空航天大学出版社,2003.
    2 Synopsys.Synopsys Astro user guide, Clock Tree Synthesis and Clock Tree
    3 Optimizations, V-2004.06
    4 潘松,黄继业. EDA 技术实用教程,北京,科学出版社,2002
    5 D. Harris, M. Horowitz, and D. Liu, “Timing analysis including clock skew,” IEEE Trans. Comput.-Aided Design, vol. 18, no. 11, Nov. 1999.
    6 E. G. Friedman, Clock Distribution Networks in VLSI Circuits and Systems.New York: IEEE, 1995

    谈论 半导体 | 术语表

     
    December 01

    应该干点什么了

    闲来无事,找点事情干。
    记得pmc有一款2路stm-1的交叉芯片,好像比较简单,试试看能不能仿制出来。
    April 09

    比较郁闷的事情

    今天真是很郁闷阿,原来以为自己的英文水平还可以,结果今天要用了才发现完全不是那么回事。
    唉,平时都是开着金山词霸看资料,现在要自己写点东西还真的写不出来。真是的,鄙视一下自己!!!
     
    i am very upset today.
    i think my english level is ok before.
    but ,when i use it ,i find it is very poor .
    usually ,when i read the english specific,i use the Xict.
    but when i want to writing something ,i can't writing.!!!