Mobile
Verilog Online Help Prev Page Prev Page
Table of Contents
Bit-select
Block Statements
Built-in Primitives
Case Statement
Continuous Assignments
Conversion Functions
Comments
Compiler Directives
Concatenations
Conditional Operator
Delays
Disable Statement
Display Tasks
Edge Sensitive Path
Expression Bit Length
File I/O Functions
Functions
Identifiers
If Statement
Integer Constants
Intra-assignment Timing Controls
Keywords
Loop Statements
Memories
min:typ:max Delays
Module Declaration
Module Instantiation
Module Path Declaration
Module Path Polarity
Net Data Types
Operators
Parameters
Part-select
PLA Modeling Tasks
Probabilistic Distribution Functions
Procedural Assignments
Procedural Continuous Assignments
Procedural Timing Control
Range Specification
Real Constants
Register Data Types
Simulation Control Tasks
Simulation Time Functions
Specify Block
State Dependent Path
Stochastic Analysis Tasks
Strengths
Strings
Structured Procedures
Tasks
Timescale System Tasks
Timing Check Tasks
UDP Declaration
UDP Instantiation
UDP State Table
Value Change Dump (VCD) File
Vectors

Net Data Types

Formal Definition

Nets are data types that can be used to model physical connections.

Simplified Syntax

Net declaration:

wire range delays list_of_identifiers;

wand range delays list_of_identifiers;

wor range delays list_of_identifiers;

tri range delays list_of_identifiers;

triand range delays list_of_identifiers;

trior range delays list_of_identifiers;

tri0 range delays list_of_identifiers;

tri1 range delays list_of_identifiers;

supply0 range delays list_of_identifiers;

supply1 range delays list_of_identifiers;

trireg strength range delays list_of_identifiers;

Net declaration assignment:

wire strength range delays list_of_identifiers = expression;

wand strength range delays list_of_identifiers = expression;

wor strength range delays list_of_identifiers = expression;

tri strength range delays list_of_identifiers = expression;

triand strength range delays list_of_identifiers = expression;

trior strength range delays list_of_identifiers = expression;

tri0 strength range delays list_of_identifiers = expression;

tri1 strength range delays list_of_identifiers = expression;

supply0 strength range delays list_of_identifiers = expression;

supply1 strength range delays list_of_identifiers = expression;

trireg strength range delays list_of_identifiers = expression;

Description

Net data types are used to model physical connections. They do not store values (there is only one exception - trireg, which stores a previously assigned value). The net data types have the value of their drivers. If a net variable has no driver, then it has a high-impedance value (z).

Nets can be declared in a net declaration statement (Example 1) or in a net declaration assignment (Example 2).

Net declarations can contain strength declarations, which specifies the strength of the logic values driven by the net (see Strengths for more details). The range declaration is used to specify multi-bit nets (vectors). The delays are used to specify propagation delays through the nets. The strength, delay and range declarations are optional.

Wire and tri nets.

Both wire net and tri net are identical. Two different names are used for more readability. Preferably wire nets may be used if a net has only one driver. If a net has more than one driver, then tri net may be used instead.

 

0

1

x

z

0

0

x

x

0

1

x

1

x

1

x

x

x

x

x

z

0

1

x

z

Table 8: Truth table for wire and tri nets

This table applies only to wire and tri nets driven by multiple drivers that have no strength declaration or their strengths are equal.

Wand and triand nets.

These net types are wired and nets. It means that if one of their drivers is 0 then the result value will also be 0.

 

0

1

x

z

0

0

0

0

0

1

0

1

x

1

x

0

x

x

x

z

0

1

x

z

Table 9: Truth table for wand and triand nets

This table applies only to wand and triand nets driven by multiple drivers that have no strength declaration, or their strengths are equal.

Wor and trior nets.

These net types are wired or nets. It means that if one of their drivers has a value of 1, then the result value will also be 1.

 

0

1

x

z

0

0

1

x

0

1

1

1

1

1

x

x

1

x

x

z

0

1

x

z

Table 10: Truth table for wor and trior nets

This table applies only to wor and trior nets driven by multiple drivers that have no strength declaration, or their strengths are equal.

Tri0 and tri1 nets.

These nets are used to model resistive pulldown and pullup devices. If a tri0 net has no driver its value is 0. If a tri1 net has no driver, then its value is 1. These values have pull strength.

 

0

1

x

z

0

0

x

x

0

1

x

1

x

1

x

x

x

x

x

z

0

1

x

0

Table 11: Truth table for tri0 net

 

0

1

x

z

0

0

x

x

0

1

x

1

x

1

x

x

x

x

x

z

0

1

x

1

Table 12: Truth table for tri1 nets

Supply0 and supply1 nets.

These nets are used to model power supplies in the circuit. They should have supply strength.

Trireg nets.

The trireg nets are used to model net capacity. If the trireg net driver has 0, 1, or x value, then it becomes a trireg net value and its strength can be one of the drive strengths, depending on the driver strength. If the driver has a z value, then the trireg net keeps the previously driven value and the strength can be one of the charge strengths, depending on the strength specified during net declaration.

Examples

Example 1

wire [7:0] a;
tri tristate_buffer;
wand #5 sig_1;
trireg (small) t;

The 'a' variable is a 8-bit wire net.

The 'tristate_buffer' is 1-bit tri net type variable.

The 'sig_1' variable is 1-bit wand net type variable, which propagates driven value to its output in 5 time units.

The 't' variable is trireg net variable with small charge strength.

Example 2

reg a;
wire [3:0] b;
wor (strong1, weak0) wired_or = a;
trior (pull1, weak0) [3:0] #(5:3:4) vect = b;

The 'wired_or' variable is a 1-bit wor net type variable that has specified strengths (strong1 when its value is 1 and weak0 when its value is 0).

The 'vect' variable is a 4-bit trior net type variable that has pull and weak strengths and 3 delay parameters.

Important Notes

  • Nets cannot be used as left-hand value of procedural assignments.

  • If the trireg net is not driven, then it has charge strength. Otherwise it has the strength of its driver.

 

 

 

Powered by IXwebhosting