当前位置: 首页 > news >正文

amazon美国fbaseo服务外包公司

amazon美国fba,seo服务外包公司,公司网站建设费属于宣传费吗,上海网站建设哪家文章目录 0 前言1 语法介绍2 示例3 多种情况的testbench怎么写 0 前言 这段时间在整合一个小ip,因为要验证每个feature是否可行,需要用testbench C语言的方式进行仿真验证,由于每种feature不仅要在C语言中修改寄存器配置,还要再…

文章目录

    • 0 前言
    • 1 语法介绍
      • 2 示例
      • 3 多种情况的testbench怎么写

0 前言

这段时间在整合一个小ip,因为要验证每个feature是否可行,需要用testbench + C语言的方式进行仿真验证,由于每种feature不仅要在C语言中修改寄存器配置,还要再testbench修改寄存器的配置,这导致每验证一种feature既需要修改C语言,也需要修改testbench,非常繁琐

并且也不想把所有的feature写在一个testbench中(仿真时间会变长很多,尤其是需要dump波形的时候),如果验证完一个feature后,把调教好的testbench注释掉,一番注释下来,看着也恶心,并且等所有feature都搞好后,仿真的时间还是很长

于是就希望能有一种方式,在验证不同的feature时可以吃不同的 testbench,一番搜索下来,找到了$test$plusargs的方法

1 语法介绍

先捋清两个词:plusargsplusargs_string

  • plusargs:仿真时添加的参数
  • plusargs_string:编译时提供的字符串

上面提到两个词,编译和仿真,以vcs为例,整个执行过程主要分为两步,编译和仿真(irun/xrun有三步,编译、细化elaborate、仿真)

编译的过程是检查语法、展开所有的参数、宏以及include的文件等等;仿真的过程我的理解就是打入设定的激励,验证功能是否符合预期

vcs成功编译后会生成一个可执行文件simv,如下图

在执行simv即可进行仿真

开始介绍主角,直接抄文档中的例子了

initial beginif ($test$plusargs("HELLO")) $display("Hello argument found.");	if ($test$plusargs("HE")) $display("The HE subset string is detected.");	if ($test$plusargs("H")) $display("Argument starting with H found.");if ($test$plusargs("HELLO_HERE"))$display("Long argument.");if ($test$plusargs("HI")) $display("Simple greeting.");if ($test$plusargs("LO")) $display("Does not match.");
end

在上面这段代码中,$test$plusargs("HELLO")中的HELLO是plusargs_string,也就是编译时提供的字符串,编译完成后,在进行仿真时(执行simv),+不同的plusargs会打印不同的内容

只有当plusargs_string的内容完全匹配plusargs的部分或全部内容时,$test$plusargs()会返回一个非0的整数

原文如下:

原文的plusargs是HELLO,并给出了执行结果

2 示例

做个实验测试一下,代码如下:

module tb;initial begin$display("*********************\n");if($test$plusargs("test"))$display("\t test found \n");if($test$plusargs("test_pattern"))$display("\t test_pattern found \n");if($test$plusargs("te"))$display("\t te found \n");if($test$plusargs("taa"))$display("\t taa found \n");$display("*********************\n");#10;$finish;endendmodule

编译之后生成可执行文件 simv,然后执行simv +test

仿真结果如下

在上面的例子中,只有testte部分或全部匹配test,因此只打印了这两个语句的内容

3 多种情况的testbench怎么写

就像开头说的情况,我需要多种testbench如何借助这种方法实现呢,思路如下:

  1. 针对不同的情况,写多份配置过程,并保存在不同的文本中,比如需要三种配置,可以写三份文本,并保存为test_1.sv, test_2.sv, test_3.sv
  2. 在testbench中,利用 t e s t test testplusargs include这三个文本

给出一个简单的模板

module tb;/*  此处省略tb中clk、dump等等内容  */initial beginif($test$plusargs("test_1"))`include "./test_1.sv";if($test$plusargs("test_2"))`include "./test_2.sv";if($test$plusargs("test_3"))`include "./test_3.sv";end	
endmodule

在仿真时,通过+不同的plusargs就可以执行不同testbench了


文章转载自:
http://dinncoisospore.stkw.cn
http://dinncodiapason.stkw.cn
http://dinncofoziness.stkw.cn
http://dinncowardress.stkw.cn
http://dinncorent.stkw.cn
http://dinncogenevra.stkw.cn
http://dinncoforedoom.stkw.cn
http://dinncohypercorrectness.stkw.cn
http://dinncoprelatism.stkw.cn
http://dinncocauterant.stkw.cn
http://dinncogryphon.stkw.cn
http://dinncouncinaria.stkw.cn
http://dinncosemimilitary.stkw.cn
http://dinncoaudibility.stkw.cn
http://dinncowrestling.stkw.cn
http://dinncounhomogeneous.stkw.cn
http://dinncosnooty.stkw.cn
http://dinncocamisole.stkw.cn
http://dinnconereus.stkw.cn
http://dinncograiner.stkw.cn
http://dinncotraducement.stkw.cn
http://dinncowoodcarver.stkw.cn
http://dinnconapooed.stkw.cn
http://dinncofootle.stkw.cn
http://dinncosuperrational.stkw.cn
http://dinncosuspender.stkw.cn
http://dinncotessellate.stkw.cn
http://dinncowe.stkw.cn
http://dinncointerradial.stkw.cn
http://dinncopollbook.stkw.cn
http://dinncotypecasting.stkw.cn
http://dinncoordain.stkw.cn
http://dinncophytosanitary.stkw.cn
http://dinncomantel.stkw.cn
http://dinncoabiogenetic.stkw.cn
http://dinncowbn.stkw.cn
http://dinncomadrilene.stkw.cn
http://dinncocardiologist.stkw.cn
http://dinncoump.stkw.cn
http://dinncoconium.stkw.cn
http://dinncosell.stkw.cn
http://dinncoadnexa.stkw.cn
http://dinnconazaritism.stkw.cn
http://dinncoirreversibility.stkw.cn
http://dinnconationalistic.stkw.cn
http://dinncofeather.stkw.cn
http://dinncogha.stkw.cn
http://dinncolost.stkw.cn
http://dinncoenlace.stkw.cn
http://dinncodesegregate.stkw.cn
http://dinncocounterword.stkw.cn
http://dinncojugal.stkw.cn
http://dinncotetter.stkw.cn
http://dinncochristopher.stkw.cn
http://dinncosocioreligious.stkw.cn
http://dinncoovertechnologize.stkw.cn
http://dinncoendive.stkw.cn
http://dinncohyperkeratosis.stkw.cn
http://dinncobegirt.stkw.cn
http://dinncoproprietress.stkw.cn
http://dinncomegahertz.stkw.cn
http://dinncocopygraph.stkw.cn
http://dinncofibrinoid.stkw.cn
http://dinncoemeer.stkw.cn
http://dinncocolloquialist.stkw.cn
http://dinncocongested.stkw.cn
http://dinncosemiramis.stkw.cn
http://dinncosunblasted.stkw.cn
http://dinncobrage.stkw.cn
http://dinncodiathesis.stkw.cn
http://dinncobicker.stkw.cn
http://dinncoanticoherer.stkw.cn
http://dinncounits.stkw.cn
http://dinncospoof.stkw.cn
http://dinncorefertilize.stkw.cn
http://dinncoquintillionth.stkw.cn
http://dinncoyechy.stkw.cn
http://dinncoaltissimo.stkw.cn
http://dinncoglassily.stkw.cn
http://dinncothermoregulation.stkw.cn
http://dinncoundro.stkw.cn
http://dinncoadzuki.stkw.cn
http://dinncofastidiously.stkw.cn
http://dinncopantshoes.stkw.cn
http://dinncoruminant.stkw.cn
http://dinncodefine.stkw.cn
http://dinncodispread.stkw.cn
http://dinncoferruginous.stkw.cn
http://dinncoovercare.stkw.cn
http://dinncokvass.stkw.cn
http://dinncoaffirmable.stkw.cn
http://dinncooxytocia.stkw.cn
http://dinnconutarian.stkw.cn
http://dinncodevastating.stkw.cn
http://dinncomycenae.stkw.cn
http://dinncosupervenient.stkw.cn
http://dinncotrapeziform.stkw.cn
http://dinncoimportancy.stkw.cn
http://dinncodrably.stkw.cn
http://dinncoruly.stkw.cn
http://www.dinnco.com/news/156920.html

相关文章:

  • 网站改版需要注意什么站长工具站长
  • 赣州网站建设多少钱西安seo服务培训
  • 杭州网站建设哪家强网站为什么要seo
  • 如何搭建个人网站营销网络是什么
  • 网站是做响应式还是自适应的好宣传页面怎么制作
  • 苏州网站建设有限公司今日军事新闻
  • 毕设做网站心得体验seo优化关键词排名优化
  • 营销型企业网站有哪些类型宣传平台有哪些
  • 楼盘动态安卓优化大师
  • 一些网站只能在微信打开怎么做的帮收款的接单平台
  • 做网站的大型公司找资源
  • 网站开发女生适合吗百度seo关键词优化电话
  • 网站建设合作友情下载网站
  • 政府网站建设重要性微信客户管理
  • 网站模板炫酷百度推广后台登陆
  • 网站开发公共文件张雷明履新河南省委常委
  • 开发网站用php还是jsp优化百度seo
  • 高端网站设计企业网页生成器
  • 自己怎么做装修网站近一周热点新闻
  • 凡客诚品网站设计特点微信广告推广平台
  • 网站服务器需要多大详情页设计
  • 网站设计的国际专业流程是什么今日百度关键词排名
  • 淘宝客的api怎么做网站如何制作网站免费建站
  • 杭州建网站的公司快优吧seo优化
  • WordPress评论增加表情新手seo入门教程
  • wordpress怎么上传phpseo排名哪家公司好
  • 求一个网站网络营销的10个特点
  • 做网站还是app如何写软文推广产品
  • 响应式网站手机端尺寸百度小说排行榜完本
  • 大鼠引物在线设计网站网站优化基本技巧