百度空间 | 百度首页 
 
查看文章
 
Wire 与 Reg 的区别(Verilog)
2009年07月02日 星期四 15:46

数据类型 Wire 与 Reg 的区别,以下是网上资料的整理(不知道是不是官方的解释,学习ing...):

====================================
There are two main groups of data types: the register data types and the net data types.(others only include: parameter, specparam, event ).

The net data types represent physical connections between structural entities,
such as gates. A net does not store a value (except for the trireg net).

A register is an abstraction of a data storage element.

A register stores a value from one assignment to the next.
An assignment statement in a procedure acts as a trigger that changes the value in the data storage element.
The default initialization value for a reg data type is the unknown value, x.
====================================
Register data types are used as variables in procedural blocks.
Registers store logic values only (no logic strength).
A register data type must be used when the signal is on the left-hand side of a procedural assignment. (quartus II 编译时常见的报错信息)
====================================
Net data types connect structural components together.
Nets transfer both logic values and logic strengths.
A net data type must be used when:
A signal is driven by the output of some device.
A signal is also declared as an input port or inout port.
A signal is on the left-hand side of a continuous assignment.

在线学习Verilog: http://www.sutherland-hdl.com/on-line_ref_guide/vlog_ref_top.html


类别:默认分类 | 添加到搜藏 | 浏览() | 评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码: 请点击后输入四位验证码,字母不区分大小写
      

     

©2009 Baidu