当前位置:网站首页>如何成为一名高级数字 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}; //连接操作符
值得注意的是,操作符是具有优先级特性的,推荐括号代替其优先级!
边栏推荐
猜你喜欢
[proteus simulation] 16 channel water lamp composed of 74hc154 four wire to 12 wire decoder
Encapsulation attempt of network request framework of retro + kotlin + MVVM
可以写进简历的软件测试电商项目,不进来get一下?
Clion debug
做软件测试三年,薪资不到20K,今天,我提出了辞职…
What kind of living condition is a tester with a monthly salary of more than 10000?
最高月薪18K 拥有好的“心态和选择”, 成功就差“认真和坚持”~
Expandablelistview that can expand and shrink (imitating the list page of professional selection of Zhilian recruitment)
【Proteus仿真】74HC154 四线转12线译码器组成的16路流水灯
MAUI Developer Day in GCR
随机推荐
CorelDRAW Graphics Suite 2022新版功能详情介绍
Logstash backup tracks the data records reported
Activity and fragment lifecycle
Lecture 1 number field
ORACLE 11G 单机冷备数据库
11. Provider service registration of Nacos service registration source code analysis
First line of code kotlin notes
2022 pinduogai 100000 sales tutorial
【Proteus仿真】74HC154 四线转12线译码器组成的16路流水灯
Using activity to realize a simple inputable dialog box
Oracle收回权限 & 创建角色
What experience is there only one test in the company? Listen to what they say
Qt:qss custom qstatusbar instance
Latest sales volume of pinduoduo
ByteDance layoffs, test engineers were almost destroyed: how terrible is the routine behind the recruitment of large factories?
Qt:qss custom qscrollbar instance
公司里只有一个测试是什么体验?听听他们怎么说吧
QT: QSS custom qsplitter instance
After 8 years of industry thinking, the test director has a deeper understanding of test thinking
T5 attempt