码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • Pass cfg from cmd to test


    Pass cfg from cmd to test

    • 1 Pass cfg from sh to case
    • 1.1 v a l u e value valueplusargs()`
    • 1.2 uvm_config_int::get()<--->uvm_set_config_int/string/

    The article’s purpose is to solve the flexity; you can pass cfg to test by cmd directly; this is convinent for you to control or constraint the case;
    Now,there are two common ways to do it;

    1 Pass cfg from sh to case

    1.1 v a l u e value valueplusargs()`

    In any compenent,you use the usage;

            function void base_test:build_phase();
                    super.build_phase(phase);
                    if(!$value$plusargs("mask_mode=%0d",mask_mode)) begin
                            `uvm_error("base_test","mask_mode is set to default");
                    end
            endfunction:build_phase
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
            #在末尾添加参数run_opt;
            -run_opt  +mask_mode=9
    
    • 1
    • 2

    1.2 uvm_config_int::get()<—>uvm_set_config_int/string/

    In any component,you should code in it; Principle: It will creats a diction,then put it in pool; you will use get it at any time;
    you can put the code anywhere;

            function void base_test:build_phase();
                    super.build_phase(phase);
                    if(!uvm_config_int::get(this,"","mask_mode",mask_mode)) begin
                            `uvm_error("base_test","mask_mode is set to default");
                    end
            endfunction:build_phase 
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    #末尾添加参数
    -run_opt  +uvm_set_config_int="uvm_test_top,mask_mode,12" &
    
    • 1
    • 2

    Note the difference between the two ways;
    Advantage: you can use it even under regression;

    # Add in the regression.txt
    TESTS += xx_test;+uvm_set_config_int="uvm_test_top,mask_mode,12"
    
    • 1
    • 2
  • 相关阅读:
    adb安装及使用大全
    毕业设计之基于Vue的数据可视化平台
    uniapp获取一周日期和星期
    错题汇总11 12
    用FIR滤波器设计数字微分器和数字希尔伯特变换器
    云原生之PVE虚拟化平台创建LXC容器
    R语言使用马尔可夫链对营销中的渠道归因建模
    程序员的数学课11 灰度实验:如何设计灰度实验并计算实验的收益?
    赋能中国制造,大道云行发布智能制造分布式存储解决方案
    四、Docker镜像与仓库(一)
  • 原文地址:https://blog.csdn.net/li_kin/article/details/134317254
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号