Verilog语言要素(二)
1 Verilog语言要素
1.2 标识符-关键字-属性
1.2.1 标识符(Identifier)
规范原文如下:
- An identifier is used to give an object a unique name so it can be referenced.
- An identifier is either a simple identifier or an escaped identifier. – 转义标识符不常用
- A sample identifier shall be any sequence of letters, digits, dollar signs ($), and underscore characters (_).
- The first character of a simple identifier shall not be a digit or $; it can be a letter or an underscore.
- A name following the $ is interpreted as a system task or a system function.
- Identifiers shall be case sensitive.
个人总结如下: - 标识符(identifier)是由任意字母、数字和下划线(_)组成的字符序列;标识符的第一个字符必须是字母或者下划线;
- Verilog的标识符是大小写敏感的,即字符相同而大小写不同的两个标识符是不同的。
1.2.2 关键字(Keyword)
规范原文如下:
- Keywords are predefined nonescaped identifiers that are used to define the language constructs.
- A Verilog HDL keyword preceded by an escape character is not interpreted as a keyword.
- All keywords are defined in lowercase only.
个人总结如下: - 关键字是Verilog中预留的用于定义语言结构的特殊标识符,如assign、always等;
- Verilog中关键字不能大写;
- Verilog中关键字不能转义。
1.2.3 属性(Attribute)
规范原文如下:
- Attributes are used to control the operation or behavior of tools . – 控制仿真工具或开发工具的操作/行为
- An attribute_instance can appear in the Verilog description as a prefix attached to a declaration, a module item, a statement, or a port connection. – 可以是前缀
- It can appear as a suffix to an operator or a Verilog function name in an expression. – 可以是后缀
- If a value is not specifically assigned to the attribute, then its value shall be 1.
- Nesting of attribute instances is disallowed. – 不允许嵌套
语法格式如下:
规范举例如下:
例1:The following example shows how to attach attributes to a case statement.!
例2:To attach an attribute to a module definition.
例3:To attach an attribute to a module instantiation.
例4:To attach an attribute to a reg declaration.
例5:To attach an attribute to an operator. – 后缀
例6:To attach an attribute to a Verilog function call. – 后缀
例7:To attach an attribute to a conditional operator. – 后缀
Verilog语言要素(二)相关推荐
- HDL4SE:软件工程师学习Verilog语言(二)
2 词法和预处理器 2.1 定个小目标 作为一个软件工程师,学习一种语言,最暴力的办法就是做一个这种语言的编译器(或解释器),如果没有做过某种语言的编译器,至少也得仔细看过这种语言的编译器实现,最不济 ...
- verilog设置24进制计数器_阅读笔记:《Verilog HDL入门》第3章 Verilog语言要素
3.1标识符 1.Verilog中的Identifier是由任意字母.数字.下划线和$符号组成的,第一个字符必须是字母或者下划线.区分大小写. 2.Escaped Identifier是为了解决简单标 ...
- FPGA的六层电梯控制器Verilog语言(二)
3设计内容 3.1基本状态设计 1.采用信号并置处理很多输入信号的方式: always @(call_up_1 or call_up_2 or call_up_3 or call_up_4 or ca ...
- [Verilog硬件描述语言]语言要素、数据类型、运算符及其表达式
目录 一.Verilog语言要素 1.1 标识符 1.2 关键字 1.3 数值 1.3.1 整数及其表示 1.3.2 实数及其表示 二.数据类型 2.1 连线型 2.2 寄存器型 2.3 连线型和寄存 ...
- HDL4SE:软件工程师学习Verilog语言(十一)
11 流水线 前面一节介绍了状态机的概念.状态机用于描述事务处理的一个程序性流程,可以组成顺序,分支,循环的事务处理流程.这些概念本来在verilog中的行为级描述中是有的,但是由于不是RTL描述,因 ...
- HDL4SE:软件工程师学习Verilog语言(六)
6 表达式与赋值 我们终于可以继续学习了,也是没有办法,其实工作的80%的时间都是在忙杂事,就像打游戏一样,其实大部分时间都在打小怪,清理现场,真正打终极BOSS的时间是很少的,但是不清小怪,打BOS ...
- HDL4SE:软件工程师学习Verilog语言(十四)
14 RISC-V CPU初探 前面我们介绍了verilog语言的基本语法特征,并讨论了数字电路设计中常用的状态机和流水线结构,然后我们借鉴SystemC的做法,引入了HDL4SE建模语言,以及相应的 ...
- Verilog HDL语言要素
Verilog HDL语言要素 Verilog HDL的基本要素,包括标识符.空白符.注释.数值和字符串.数据类型及运算符等. 标识符 Verilog HDL中的标识符(identifier)可以是任 ...
- FPGA笔记之verilog语言(基础语法篇)
文章目录 FPGA笔记之verilog语言(基础语法篇) 1. verilog 的基础结构 1.1 verilog设计的基本单元--module 1.2 module的使用 1.3 I/O的说明 1. ...
最新文章
- python入门(七)
- 解析rtcm32报文工具_RTCM32编解码中的一些概念及相关文献阅读
- c 后台输出easyui html,EasyUI——实现展示后台数据代码
- TomCat JDK环境变量
- [爬虫-python] scrapy框架入门实例-百度贴吧
- C++ 只要一句,输入重定向。讲讲编程竞赛本机调试技巧
- stm32f4 usb 升级程序_51单片机程序下载、ISP及串口基础知识
- vue引入阿里图标库
- macos蓝牙驱动和wifi驱动名称_win7蓝牙装不上?别急着捣鼓驱动软件啦!可能是硬件问题!...
- 机器学习(周志华) 第七章贝叶斯分类器
- 格林高斯斯托克斯 通量散度旋度
- 养生秘诀呼吸吐纳真的可以养生嘛?
- Eclipse Neon EGit Integration gives Exception 401 Authorization Required
- WPS--world使用格式刷
- INT303 Big Data 个人笔记
- 基恩士KV7500,KV8000轴控制FB模板,直接可以拿来用,使基恩士编程也随心所欲
- MySQL数据库:SQL语句优化
- 爱思助手安卓能用吗_专业的苹果越狱工具:爱思助手!
- Python的IDE:基于Eclipse/MyEclipse软件的PyDev插件配置python的开发环境(不同python项目加载不同版本的python)—从而实现Python编程图文教程之详细攻略
- 成像系统(一):A Review of Indocyanine Green Fluorescent Imaging in Surgery
热门文章
- 大数据行业前景_大数据未来展望
- hdu-1052 Tian Ji -- The Horse Racing
- excel如何晒出重复数据_excel 如何在大量数据中快速筛选出重复数据
- Python 实现 T00ls 自动签到脚本(邮件+钉钉通知)
- Python 立体图形的画法(一)
- 用@ExceptionHandler 来进行异常处理
- android edittext底线,Android定制自己的EditText轻松改变底线颜色
- 随机过程(1.1)—— 概率空间、分布函数、Riemann-Stieltjes 积分
- Micron:DDR2 SDRAM与SODIMM
- 关于tensor的shape理解