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

学校网站建设要求最近三天发生的重要新闻

学校网站建设要求,最近三天发生的重要新闻,科技软件公司网站模板,百度回收网站搭建1 基本概念 在 SystemVerilog 中,unique if是一种条件判断结构。它用于检查多个互斥的条件,以确保在给定的情况下只有一个条件分支被执行。这有助于提高代码的可读性和可维护性,同时也能帮助发现潜在的逻辑错误,报错原因有以下两个…

1 基本概念

        在 SystemVerilog 中,unique if是一种条件判断结构。它用于检查多个互斥的条件,以确保在给定的情况下只有一个条件分支被执行。这有助于提高代码的可读性和可维护性,同时也能帮助发现潜在的逻辑错误,报错原因有以下两个

        当所有的 “if” 条件都不匹配时且无else语句,会报错。
        当在 “if-else” 条件中发现有不止一个条件匹配时,会报错。

2 语法

unique if (condition1) begin// 执行语句块1
end else if (condition2) begin// 执行语句块2
end else if (condition3) begin// 执行语句块3
end else {// 可选的else语句块,当所有前面条件都不满足时执行
}

3 示例

1 No else block for unique-if(无else,且都不匹配)

module tb;int x = 4;initial begin// This if else if construct is declared to be "unique"// Error is not reported here because there is a "else"// clause in the end which will be triggered when none of// the conditions matchunique if (x == 3)$display ("x is %0d", x);else if (x == 5)$display ("x is %0d", x);else$display ("x is neither 3 nor 5");// When none of the conditions become true and there// is no "else" clause, then an error is reportedunique if (x == 3)$display ("x is %0d", x);else if (x == 5)$display ("x is %0d", x);end
endmodule//------------- simulation log-------------------//
ncsim> run
x is neither 3 nor 5
ncsim: *W,NOCOND: Unique if violation:  Every if clause was false.File: ./testbench.sv, line = 18, pos = 13Scope: tbTime: 0 FS + 1ncsim: *W,RNQUIE: Simulation is complete.

2 Multiple matches in unique-if(匹配多次)

module tb;int x = 4;initial begin// This if else if construct is declared to be "unique"// When multiple if blocks match, then error is reportedunique if (x == 4)$display ("1. x is %0d", x);else if (x == 4)$display ("2. x is %0d", x);else$display ("x is not 4");end
endmodule//--------------- simulation log-----------------//
ncsim> run
1. x is 4
ncsim: *W,MCONDE: Unique if violation:  Multiple true if clauses at {line=8:pos=15 and line=10:pos=13}.File: ./testbench.sv, line = 8, pos = 15Scope: tbTime: 0 FS + 1ncsim: *W,RNQUIE: Simulation is complete.

https://www.chipverify.com/systemverilog/systemverilog-unique-priority-if-ele

http://www.ritt.cn/news/885.html

相关文章:

  • 湖南做网站 都来磐石网络长春网站推广公司
  • 西安哪里有做网站的seo优化服务是什么
  • 龙口网站建设公司深圳网站搜索优化工具
  • 可以做思维导图的网站重庆seo黄智
  • 做网站的报价万能搜索引擎入口
  • 做网站需要啥备案之类的嘛最近三天的新闻大事摘抄
  • 网站开发设计哪家好免费入驻的卖货平台
  • 网站建设mfdos市场营销经典案例
  • wordpress文章页插件东莞百度seo推广公司
  • 国外优秀企业网站软件网站关键词优化
  • fireworks做网站怎么做好seo推广
  • win7 做网站好吗建网站有哪些步骤
  • 移动商城积分兑换seo排名工具外包
  • WordPress显示403网站优化公司推荐
  • 优质服务的网站设计制作销售推广的方法都有哪些
  • 阿里云网站全部清空怎么做seo经验
  • python自学网厦门百度seo排名
  • 怎么注册公司都需要什么手续济南优化seo公司
  • 电子商务项目策划书重庆seo外包平台
  • 网站建设流程六个步骤自助建站平台
  • 创建网站销售产品网上推广方式
  • 微信小程序可以做电影网站吗网络推广怎么推广
  • 上海企业宣传片制作哪家好搜索引擎的优化方法
  • 签订网站建设合同应注意seo查询系统源码
  • 电子商务网站功能特点编程培训班学费一般多少钱
  • 科技成就成都seo顾问
  • 网站建设的毕业设计选题管理系统聊城网站推广公司
  • 乌鲁木齐北京网站建设服装店营销策划方案
  • 国外网站怎样建设软件外包公司有哪些
  • 简单的网站制作代码长春网站建设定制