zoukankan      html  css  js  c++  java
  • vcs仿真的一个脚本

    网上搜索稀奇古怪的关键字  "+libext+.v", 看到别人的一个VCS跑方针用的脚本,不错。以下为【zz】

    ##############################################################

    #!/bin/csh -f

    time

    if (!(-e filelist.vrl)) cp -f ../code/sim/scr/filelist.vrl .
    if (!(-e picture.dat)) cp -f ../code/sim/scr/picture.dat .
    if (!(-d pic)) mkdir pic
    if (!(-d log)) mkdir log
    ##############################################################

    # for system simulation
    set current=$argv[1]

    # include search path for modules
    set INC_DIRS="+incdir+../code/rtl"

    # library search path for modules
    set LIB_DIRS="-y ../code/sim/vmodel/verilog/sdh_sram \
                 -y ../code/asic/lib/charlib/2000.3/cb35/v2.6/verilog/cb35os142/zero"

    # top rtl verilog file
    set RTL_TOP_FILE="../code/asic/lib/charlib/2000.3/cb35/v2.6/verilog/cb35os142/zero/mtb_verilog.v \
                   ../code/rtl/top/sdh_digital.v"

    set SEG_CTRL_FILE="../code/rtl/disp/sdh_seg_ctrl.v"

    # test top verilog file
    set TEST_TOP_FILE="../code/sim/vmodel/verilog/sdh_digital.test_top/sdh_digital.test_top.v"

    # vera main program file
    set VERA_MAIN_FILE="../code/sim/vmodel/vera/sdh_digital.vr"
    set VERA_PATTERN_FILE="../code/sim/tb/sys/$current/pattern.vr"

    # define vcs compile flags
    set os_uname = `/bin/uname`
    switch ( ${os_uname} )
    case SunOS:

       set VCS_FLAGS="\
                    -Mupdate -PP \
                    -timescale=1ns/10ps \
                    +libext+.v \
                    -P /opt/tools/novas/deb5.2v14/share/PLI/vcs/SOLARIS2/debussy.tab \
                    /opt/tools/novas/deb5.2v14/share/PLI/vcs/SOLARIS2/pli.a \
                    +nospecify \
                    +notimingcheck \
                    +vpdfile+vera.vpd \
                    +define+FSDB \
                    -f ../code/sim/scr/lib.vcs.c\
                    sdh_digital.vshell -vera"
    breaksw

    case Linux:
       set VCS_FLAGS="\
                    -Mupdate -PP \
                    -timescale=1ns/10ps \
                    +libext+.v \
                    -P /opt/tools/novas/deb5.2v24/share/PLI/vcs/LINUX/debussy.tab \
                    /opt/tools/novas/deb5.2v24/share/PLI/vcs/LINUX/pli.a \
                    +nospecify \
                    +notimingcheck \
                    +vpdfile+vera.vpd \
                    +define+FSDB \
                    -f ../code/sim/scr/lib.vcs.c\
                    sdh_digital.vshell -vera"
    breaksw

       default:
       echo "Unsupported platform ''${os_uname}''"
       exit ( 1 )
       breaksw
    endsw


    #define code coverage metrics
    set CM_COMPILE_FLAGS="\
    -cm line+cond+fsm+tgl"

    set CM_SIM_FLAGS="\
    -cm line+tgl+fsm+cond \
    -cm_name $argv[1]"

    # compile this file for debugging (includes symbol table)
    vera -cmp -g $VERA_MAIN_FILE
    if ($status) then
       exit 1
    endif

    vera -cmp -g $VERA_PATTERN_FILE
    if ($status) then
       exit 1
    endif

    # check the status of the compile and continue if successful

    if ($status == 0) then

    # compile using the HDL simulator to produce an executable
    vcs $VCS_FLAGS $INC_DIRS $LIB_DIRS $CM_COMPILE_FLAGS $RTL_TOP_FILE $TEST_TOP_FILE

    # printf systime before running
    time

    #./simv +vera_mload=filelist.vrl +vera_profile_start +vera_profile_limit=1000 +vera_profile_object \
    #                            +vera_profile_object_verbose tee simlog.log

    ./simv $CM_SIM_FLAGS +vera_mload=filelist.vrl tee simlog.log

    # printf systime after pattern over
    time

    endif

  • 相关阅读:
    【技术贴】每次打开excel表格都会弹出新excel。book1.xls解决方法
    【技术贴】鼠标右键盘符属性报错Volume filter WMI not found的解决办法
    解决QQ聊天QQ秀咒语为什么我不能施放咒语/看不到咒语效果?
    【java】servlet输出pdf文件到浏览器 教程
    C#抽象工厂模式的几种实现方法及比较(外摘)
    SQL 语句汇总With子句
    浅析.NET开发中代理模式的使用(外摘)
    使用设计模式构建通用数据库访问类(外摘)
    Cognos产品组件及各组件功能介绍
    游标Oracle游标汇总
  • 原文地址:https://www.cnblogs.com/azure_seu/p/2057237.html
Copyright © 2011-2022 走看看