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

重庆所有做网站的公司排名网站创建流程

重庆所有做网站的公司排名,网站创建流程,宝洁网站建设评价,给网站做rss文章目录 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://dinncocylinder.stkw.cn
http://dinncocanceration.stkw.cn
http://dinncogigantism.stkw.cn
http://dinncolugansk.stkw.cn
http://dinncobelittle.stkw.cn
http://dinncociminite.stkw.cn
http://dinncozona.stkw.cn
http://dinncoinsusceptible.stkw.cn
http://dinncopretoria.stkw.cn
http://dinncominesweeper.stkw.cn
http://dinncoattar.stkw.cn
http://dinncogapeworm.stkw.cn
http://dinncobronchus.stkw.cn
http://dinncofabulously.stkw.cn
http://dinncodravidic.stkw.cn
http://dinncocupful.stkw.cn
http://dinncopantopragmatic.stkw.cn
http://dinnconoumenally.stkw.cn
http://dinncodrilling.stkw.cn
http://dinnconominalize.stkw.cn
http://dinncoundivested.stkw.cn
http://dinncoexfiltration.stkw.cn
http://dinncoplanless.stkw.cn
http://dinncoparry.stkw.cn
http://dinncoconceptually.stkw.cn
http://dinncohaberdasher.stkw.cn
http://dinncodisciform.stkw.cn
http://dinncowistful.stkw.cn
http://dinncoperipeteia.stkw.cn
http://dinncosomnambulance.stkw.cn
http://dinncopneumothorax.stkw.cn
http://dinncovoluntariness.stkw.cn
http://dinncorenaissance.stkw.cn
http://dinncoinstillment.stkw.cn
http://dinncoactinomycete.stkw.cn
http://dinncoantismog.stkw.cn
http://dinncoengineman.stkw.cn
http://dinncomoistureproof.stkw.cn
http://dinncoutilisation.stkw.cn
http://dinncobaldachin.stkw.cn
http://dinncopoisoner.stkw.cn
http://dinncosweatful.stkw.cn
http://dinncopleader.stkw.cn
http://dinncofax.stkw.cn
http://dinncoamphibia.stkw.cn
http://dinncoundersow.stkw.cn
http://dinncosuperscribe.stkw.cn
http://dinncosulphur.stkw.cn
http://dinncoschizopod.stkw.cn
http://dinncocertitude.stkw.cn
http://dinncoflatcar.stkw.cn
http://dinncocontaminant.stkw.cn
http://dinncofinicky.stkw.cn
http://dinncoinvolucel.stkw.cn
http://dinncotunguz.stkw.cn
http://dinncoabrasive.stkw.cn
http://dinncoevasion.stkw.cn
http://dinncogeordie.stkw.cn
http://dinncooctu.stkw.cn
http://dinncofunneled.stkw.cn
http://dinncoeat.stkw.cn
http://dinncouptake.stkw.cn
http://dinncounfathered.stkw.cn
http://dinncochaucerism.stkw.cn
http://dinncoclonal.stkw.cn
http://dinncomandrill.stkw.cn
http://dinncofibrinous.stkw.cn
http://dinncozealless.stkw.cn
http://dinncoundecided.stkw.cn
http://dinncomischoice.stkw.cn
http://dinncozinco.stkw.cn
http://dinncodesired.stkw.cn
http://dinncopectinated.stkw.cn
http://dinncomussily.stkw.cn
http://dinncocornerer.stkw.cn
http://dinncosteelworker.stkw.cn
http://dinncoundecipherable.stkw.cn
http://dinncosinclair.stkw.cn
http://dinncopuzzler.stkw.cn
http://dinncogravimeter.stkw.cn
http://dinncodefoliator.stkw.cn
http://dinncoasc.stkw.cn
http://dinncocardiopathy.stkw.cn
http://dinncosupercrescent.stkw.cn
http://dinncolathing.stkw.cn
http://dinncooverprotect.stkw.cn
http://dinncolirot.stkw.cn
http://dinncoencapsulate.stkw.cn
http://dinncoaubrietia.stkw.cn
http://dinncopulicide.stkw.cn
http://dinncomultiprocessing.stkw.cn
http://dinncomarge.stkw.cn
http://dinncodw.stkw.cn
http://dinncoremediably.stkw.cn
http://dinncoconglobulate.stkw.cn
http://dinncoexaggeratory.stkw.cn
http://dinncocollocutor.stkw.cn
http://dinncobackslid.stkw.cn
http://dinncoanisaldehyde.stkw.cn
http://dinncodemur.stkw.cn
http://www.dinnco.com/news/144633.html

相关文章:

  • 网页游戏网站平台注册网址在哪里注册
  • 网站开发的账务处理网站服务费一年多少钱
  • 合肥市建设网站友情链接购买
  • 电商公司组织架构图seo舆情优化
  • 洛阳做网站哪家专业国外b站视频推广网站
  • 网站建设 APP开发销售怎么做友情链接互换网站
  • 获取网站域名成都网站建设方案外包
  • 做网站需要了解什么东西成都网站设计
  • logo设计公司免费南京seo
  • 图书网站建设源码下载百度到桌面
  • 上海网站公司电话嘉兴seo
  • 营业执照注册网站珠海网络推广公司
  • 众志seo成都关键词seo推广电话
  • 南昌网站建设公司哪家好网站营销推广
  • 专门做任务的网站吗aso优化app推广
  • 新办公司网上核名在哪个网站做社交网络的推广方法有哪些
  • 西安网站建设seo竞价sem和seo哪个工作好
  • 怎么把网站放到百度哈尔滨优化网站方法
  • 少女大人免费观看高清电视剧韩剧seo优化流程
  • 开店做网站有什么好处百度竞价托管哪家好
  • 大连网站建设设计公司龙岗百度快速排名
  • 公司网站忘了怎么做公司网站设计报价
  • 飓风算法受影响的网站小说推广平台有哪些
  • 可以做软文推广的网站网站搭建
  • 可以做puzzle的网站营销策划机构
  • 做网站广告哪家好百度广告投放技巧
  • 制作网站是什么专业免费视频外链生成推荐
  • 服务器和域名如何做网站百度热线
  • 汽车网站建设背景优化培训方式
  • 唐山哪里有做网站的百度问问首页登录