EDN首页   博客首页

日志档案

发表于 2007-10-30 23:51:07

0

标签: 无标签

Wire 与 Reg 的区别(Verilog)

数据类型 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

系统分类: CPLD/FPGA   |   用户分类: EDA/VHDL/Verilog   |   来源: 整理   |   【推荐给朋友】   |   【添加到收藏夹】

    阅读(1263)    回复(0)  

投一票您将和博主都有获奖机会!