#systemverilog# 关于关键字之 priority 分支执行语句

本文详细介绍了SystemVerilog中的`priority if`语句,强调了它与经典`if-else`结构的区别。当`priority if`中没有条件为真或缺少对应的`else`时,仿真器会发出运行时警告。通过多个示例,展示了`priority if`如何按顺序评估条件,并在找到第一个匹配条件时执行相应代码,而`if-else`结构在无匹配条件时保持静默。文章鼓励读者分享更多关于`priority if`的特殊用法,共同学习讨论。
摘要由CSDN通过智能技术生成

Priority if evaluates all the conditions in sequential order.In the following conditions simulator issue a run time error/warning

No condition is true or final if doesn’t have corresponding else
另一篇介绍unique if的文章(Link)


一、priority if 举例1

In the below example,No condition is true or final if doesn’t have corresponding else.value of a=50,b=20 and c=40. conditions a<b and a<c are false,therefore simulator issue a run time warning.“RT Warning: No condition matches in ‘priority if’ statement.”

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

那么菜

你的鼓励和批评是我最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值