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

Identifiers

Formal Definition

The identifier is a unique name, which identifies an object.

Simplified Syntax

identifier

\escaped_identifier

Description

An identifier is used as an object reference. An identifier can contain a sequence of letters, digits, underscores (_) and dollar signs ($). The first character of an identifier can only be a letter or an underscore (Example 1). Identifiers are case sensitive.

Escaped identifiers (Example 2) start with backslash character (\) and end with white space (i.e. space, tab, new line). Escaped identifiers can contain any printable characters. Leading backslash character and white space at the end are not considered as part of an identifier, thus identifiers \enable and enable are identical.

Examples

Example 1

reg enable;
wire _ready;
integer group_a;
reg and5;
tri clk$1;

Legal identifiers.

Example 2

wire \+^_^+*+*<-> ;
reg \!clk ;

White spaces between an escaped identifier and the semicolon that follows it are required, because otherwise, the semicolon will be taken as a part of an identifier.
reg \clk ;

defines \clk identifier, but
reg \clk;

defines \clk; identifier (and there will be also an error message because a variable declaration should be ended by semicolon).

Important Notes

  • Identifiers are case sensitive

  • \clk and clk are the same identifiers

  • Escaped identifiers should be followed by at least a white space character

 

Powered by IXwebhosting