Verilog语言要素(二)

1 Verilog语言要素

1.2 标识符-关键字-属性

1.2.1 标识符(Identifier)

规范原文如下

  1. An identifier is used to give an object a unique name so it can be referenced.
  2. An identifier is either a simple identifier or an escaped identifier. – 转义标识符不常用
  3. A sample identifier shall be any sequence of letters, digits, dollar signs ($), and underscore characters (_).
  4. The first character of a simple identifier shall not be a digit or $; it can be a letter or an underscore.
  5. A name following the $ is interpreted as a system task or a system function.
  6. Identifiers shall be case sensitive.
    个人总结如下
  7. 标识符(identifier)是由任意字母、数字和下划线(_)组成的字符序列;标识符的第一个字符必须是字母或者下划线;
  8. Verilog的标识符是大小写敏感的,即字符相同而大小写不同的两个标识符是不同的。

1.2.2 关键字(Keyword)

规范原文如下

  1. Keywords are predefined nonescaped identifiers that are used to define the language constructs.
  2. A Verilog HDL keyword preceded by an escape character is not interpreted as a keyword.
  3. All keywords are defined in lowercase only.
    个人总结如下
  4. 关键字是Verilog中预留的用于定义语言结构的特殊标识符,如assign、always等;
  5. Verilog中关键字不能大写;
  6. Verilog中关键字不能转义。

1.2.3 属性(Attribute)

规范原文如下

  1. Attributes are used to control the operation or behavior of tools . – 控制仿真工具或开发工具的操作/行为
  2. 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. – 可以是前缀
  3. It can appear as a suffix to an operator or a Verilog function name in an expression. – 可以是后缀
  4. If a value is not specifically assigned to the attribute, then its value shall be 1.
  5. 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. – 后缀
    在这里插入图片描述
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值