• 仿真 vcs/ncverilog


    仿真工具

    1. vcs

    # pin相关操作
    #   查找某个pin, 返回{top_tb.chip.vcss}, 如果不存在则返回空.
    ucli% search top_tb.chip.vss
    
    #   force时钟
    ucli% force top_tb.chip.SYS_CLK 0 0ns, 1 10ns -repeat 20ns
    
    #   获取某个pin的值, 得到的是'b0, 'b1, 'bz这种值
    ucli% get top_tb.chip.trstn
    
    # dump波形操作
    ucli% call {$fsdbDumpfile "./test.fsdb"}
    ucli% call {$fsdbDumpvars (0, top_tb.chip)}
    ucli% call {$fsdbDumpon}
    ucli% run 100ns
    ucli% call {$fsdbDumpflush}
    

    2. ncverilog

    2.1 ncsim接口

    # pin相关操作
    ncsim% find -scope top_tb.chip vss # 查找某个pin, 返回chip.vss
    ncsim% force top_tb.chip.SYS_CLK 0 -after 0ns 1 -after 10ns -repeat 20ns # force时钟
    ncsim% value top_tb.chip.trstn     # 获取某个pin的值
    ncsim% deposit top_tb.chip.xx_reg.Q 1'b0 # 给寄存器赋初值
    
    # dump波形操作
    ncsim% set fsdbfile "./test.fsdb"
    ncsim% call {$fsdbAutoSwitchDumpfile} 5000 $fsdbfile 20}
    ncsim% call {$fsdbDumpvars} {0} {top_tb.chip}
    ncsim% call {$fsdbDumpon}
    ncsim% run 100ns
    ncsim% run -absolute 200ns
    ncsim% call {$fsdbDumpflush}
    

    2.2 指定某几个inst为blackbox

    不需要指定top_tb.chip层次, 在nc的仿真选项中添加:
    -ncargs "-bbinst U_A/U_xx -bbinst U_B/U_yy" # 直接指定inst
    -ncargs "-bblist ip0.txt -bblist ip1.txt" # 指定通过filelist指定inst

    其中ip0.txt, ip1.txt是文本文件, 每行列出一个inst.

    3. cell只dump端口信号, 不dump单元内部信号

    +fsdb+skip_cell_instance=2

  • 相关阅读:
    angularJS之路由
    angularJS之ng-repeat
    智能算法之Matlab实现(1)——遗传算法(1)
    如何快速处理线上故障
    测试计划怎么写
    接口测试基础
    HTTP 的一些问题
    DevOps简介
    什么是DevOps?
    HTTPS 如何保证数据传输的安全性
  • 原文地址:https://www.cnblogs.com/gaiqingfeng/p/15343584.html
Copyright © 2020-2023  润新知