当前位置:网站首页>如何成为一名高级数字 IC 设计工程师(1-4)Verilog 编码语法篇:表达式
如何成为一名高级数字 IC 设计工程师(1-4)Verilog 编码语法篇:表达式
2022-07-03 09:55:00 【新芯设计】
一、定义表达式
以高等数学的函数定义为例,Verilog HDL 表达式定义如下:
result = operator(operand)
这里,operand 就是输入(自变量)x,result 就是输出(因变量)y,operator 就是电路(映射关系)f,通过输入操作符和输入数据,就可以确定唯一的输出数据。如下所示:
assign result = dina + dinb; //算术操作符
assign reslut = dina > dinb; //比较操作符
assign reslut = dina && dinb; //逻辑操作符
assign reslut = dina & dinb; //位操作符
assign reslut = dina >> dinb; //移位操作符
assign reslut = sel ? dinb : dina; //条件操作符
assign reslut = {dina, dinb}; //连接操作符
值得注意的是,操作符是具有优先级特性的,推荐括号代替其优先级!
边栏推荐
- Internet Socket (非)阻塞write/read n个字节
- 文件上传下载测试点
- How can UI automated testing get out of trouble? How to embody the value?
- After 8 years of industry thinking, the test director has a deeper understanding of test thinking
- Google Earth Engine(GEE)——当我们前后影像来弥补插值效果得时候,没有效果怎么办?
- BI技巧丨权限轴
- Qt:qss custom QSlider instance
- Use ml.net+onnx pre training model to liven the classic "Huaqiang buys melons" in station B
- 2021 reading summary (continuously updating)
- Probability theory: application of convolution in calculating moving average
猜你喜欢
Software testing redis database
I, a tester from a large factory, went to a state-owned enterprise with a 50% pay cut. I regret it
【蓝桥杯选拔赛真题44】Scratch消灭骷髅军团 少儿编程scratch蓝桥杯选拔赛真题讲解
What is the salary level of 17k? Let's take a look at the whole interview process of post-95 Test Engineers
A simple method of adding dividing lines in recyclerview
行业唯一!法大大电子合同上榜36氪硬核科技企业
测试理论概述
封装一个koa分布式锁中间件来解决幂等或重复请求的问题
[true question of the Blue Bridge Cup trials 44] scratch eliminate the skeleton Legion children programming explanation of the true question of the Blue Bridge Cup trials
有赞CTO崔玉松:有赞Jarvis核心目标是使产品变得更加聪明和可靠
随机推荐
Differences among norm, normalize and normalized in eigen
QT: QSS custom qsplitter instance
Multiple IO transfer - preamble
Redis notes 01: Introduction
测试Leader应该做哪些事
"Core values of testing" and "super complete learning guide for 0 basic software testing" summarized by test engineers for 8 years
Some abilities can't be learned from work. Look at this article, more than 90% of peers
公司里只有一个测试是什么体验?听听他们怎么说吧
封装一个koa分布式锁中间件来解决幂等或重复请求的问题
软件测试工程师的5年之痒,讲述两年突破瓶颈经验
Kotlin's use of the no Arg compiler plug-in in gradle
公司测试部门来了个00后卷王之王,老油条感叹真干不过,但是...
图解网络:什么是虚拟路由器冗余协议 VRRP?
Do you really need automated testing?
软件测试——Redis数据库
Qt:qss custom qstatusbar instance
The five-year itch of software testing engineers tells the experience of breaking through bottlenecks for two years
Google Earth Engine(GEE)——当我们前后影像来弥补插值效果得时候,没有效果怎么办?
我对测试工作的一些认识(资深测试人员总结)
The solution that prompts "system group policy prohibits the installation of this device" under win10 system (home version has no group policy)