Copyright © 2004 IEEE. All rights reserved. i
IEEE P1364-2005/D3
(Revision of
IEEE Std 1364-2001)
Draft Standard for Verilog
®
Hardware
Description Language
Sponsor
Design Automation Standards Committee
of the
IEEE Computer Society
Abstract: The Verilog
®
Hardware Description Language (HDL) is defined in this standard. Verilog
HDL is a formal notation intended for use in all phases of the creation of electronic systems. Be-
cause it is both machine readable and human readable, it supports the development, verification,
synthesis, and testing of hardware designs; the communication of hardware design data; and the
maintenance, modification, and procurement of hardware. The primary audiences for this standard
are the implementors of tools supporting the language and advanced users of the language.
Keywords: computer, computer languages, digital systems, electronic systems, hardware, hard-
ware description languages, hardware design, HDL, PLI, programming language interface, Verilog
HDL, Verilog PLI, Verilog
®
ii Copyright © 2004 IEEE. All rights reserved.
Introduction (unchanged)
(This introduction is not part of IEEE P1364-2005, Draft Standard for Verilog
®
Hardware Description Langauge.)
The Verilog
®
Hardware Description Language (Verilog HDL) became an IEEE standard in 1995 as IEEE
Std 1364-1995. It was designed to be simple, intuitive, and effective at multiple levels of abstraction in a
standard textual format for a variety of design tools, including verification simulation, timing analysis, test
analysis, and synthesis. It is because of these rich features that Verilog has been accepted to be the language
of choice by an overwhelming number of IC designers.
Verilog contains a rich set of built-in primitives, including logic gates, user-definable primitives, switches,
and wired logic. It also has device pin-to-pin delays and timing checks. The mixing of abstract levels is
essentially provided by the semantics of two data types: nets and variables. Continuous assignments, in
which expressions of both variables and nets can continuously drive values onto nets, provide the basic
structural construct. Procedural assignments, in which the results of calculations involving variable and net
values can be stored into variables, provide the basic behavioral construct. A design consists of a set of mod-
ules, each of which has an I/O interface, and a description of its function, which can be structural, behav-
ioral, or a mix. These modules are formed into a hierarchy and are interconnected with nets.
The Verilog language is extensible via the Programming Language Interface (PLI) and the Verilog Proce-
dural Interface (VPI) routines. The PLI/VPI is a collection of routines that allows foreign functions to access
information contained in a Verilog HDL description of the design and facilitates dynamic interaction with
simulation. Applications of PLI/VPI include connecting to a Verilog HDL simulator with other simulation
and CAD systems, customized debugging tasks, delay calculators, and annotators.
The language that influenced Verilog HDL the most was HILO-2, which was developed at Brunel University
in England under a contract to produce a test generation system for the British Ministry of Defense. HILO-2
successfully combined the gate and register transfer levels of abstraction and supported verification simula-
tion, timing analysis, fault simulation, and test generation.
In 1990, Cadence Design Systems placed the Verilog HDL into the public domain and the independent Open
Verilog International (OVI) was formed to manage and promote Verilog HDL. In 1992, the Board of Direc-
tors of OVI began an effort to establish Verilog HDL as an IEEE standard. In 1993, the first IEEE Working
Group was formed and after 18 months of focused efforts Verilog became an IEEE standard as IEEE Std
1364-1995.
After the standardization process was complete the 1364 Working Group started looking for feedback from
1364 users worldwide so the standard could be enhanced and modified accordingly. This led to a five year
effort to get a much better Verilog standard in IEEE Std 1364-2001.
Objective of the IEEE Std 1364-2001 effort
The starting point for the IEEE 1364 Working Group for this standard was the feedback received from the
IEEE Std 1364-1995 users worldwide. It was clear from the feedback that users wanted improvements in all
aspects of the language. Users at the higher levels wanted to expand and improve the language at the RTL
and behavioral levels, while users at the lower levels wanted improved capability for ASIC designs and
signoff. It was for this reason that the 1364 Working Group was organized into three task forces: Behavioral,
ASIC, and PLI.
Copyright © 2004 IEEE. All rights reserved. iii
The clear directive from the users for these three task forces was to start by solving some of the following
problems:
— Consolidate existing IEEE Std 1364-1995
— Verilog Generate statement
— Multi-dimensional arrays
— Enhanced Verilog file I/O
— Re-entrant tasks
— Standardize Verilog configurations
— Enhance timing representation
— Enhance the VPI routines
Achievements
Over a period of four years the 1364 Verilog Standards Group (VSG) has produced five drafts of the LRM.
The three task forces went through the IEEE Std 1364-1995 LRM very thoroughly and in the process of con-
solidating the existing LRM have been able to provide nearly three hundred clarifications and errata for the
Behavioral, ASIC, and PLI sections. In addition, the VSG has also been able to agree on all the enhance-
ments that were requested (including the ones stated above).
Three new sections have been added. Clause 13, “Configuring the contents of a design,” deals with configu-
ration management and has been added to facilitate both the sharing of Verilog designs between designers
and/or design groups and the repeatability of the exact contents of a given simulation session. Clause 15,
“Timing checks,” has been broken out of Clause 17, “System tasks and functions,” and details more fully
how timing checks are used in specify blocks. Clause 16, “Backannotation using the Standard Delay Format
(SDF),” addresses using back annotation (IEEE Std 1497-1999) within IEEE Std 1364-2001.
Extreme care has been taken to enhance the VPI routines to handle all the enhancements in the Behavioral
and other areas of the LRM. Minimum work has been done on the PLI routines and most of the work has
been concentrated on the VPI routines. Some of the enhancements in the VPI are the save and restart, simu-
lation control, work area access, error handling, assign/deassign and support for array of instances, generate,
and file I/O.
Work on this standard would not have been possible without funding from the CAS society of the IEEE and
Open Verilog International.
The IEEE Std 1364-2001 Verilog Standards Group organization
Many individuals from many different organizations participated directly or indirectly in the standardization
process. The main body of the IEEE Std 1364-2001 working group is located in the United States, with a
subgroup in Japan (EIAJ/1364HDL).
The members of the IEEE Std 1364-2001 working group had voting privileges and all motions had to be
approved by this group to be implemented. The three task forces focused on their specific areas and their
recommendations were eventually voted on by the IEEE Std 1364-2001 working group.
Copyright © 2004 IEEE. All rights reserved. iv
Participants—IEEE P1364-2005/D3
At the time IEEE P1364-2005/D3 was completed, the IEEE 1364 Working Group had the following mem-
bership:
Michael T. Y. (Mac) McNamara, Chair
Shalom Bresticker, Editor
Stefen Boyd, Web Master
The Errata Task Force had the following membership:
Karen Pieper, Chair
Stefen Boyd, Vice Chair
The Behavioral Task Force had the following membership:
Steven Sharp, Chair
The PLI Task Force had the following membership:
Charles Dawson, Co-Chair
Stuart Sutherland, Co-Chair
Kurt Baty
Dennis Brophy
Clifford E. Cummings
Charles Dawson
Tom Fitzpatrick
Krishna Garlapati
Ronald Goodstein
Keith Gover
Ennis Hawk
Richard Ho
Atsushi Kasuya
Jay Lawrence
Andrew Lynch
James A. Markevitch
Dennis Marsa
Francoise Martinolle
Mehdi Mohtashemi
Anders Nordstrom
Karen Pieper
Brad Pierce
Steven Sharp
Alec Stanculescu
Stuart Sutherland
Chong Guan Tan
Gordon Vreugdenhil
Kurt Baty
Shalom Bresticker
Dennis Brophy
Clifford E. Cummings
Charles Dawson
Ted Elkind
Tom Fitzpatrick
Ronald Goodstein
Jay Lawrence
Andrew Lynch
James A. Markevitch
Dennis Marsa
Francoise Martinolle
Michael T. Y. (Mac) McNamara
Elliot Mednick
Don Mills
Mehdi Mohtashemi
Anders Nordstrom
Brad Pierce
David Roberts
Steven Sharp
David Smith
Stuart Sutherland
Gordon Vreugdenhil
Kurt Baty
Stefen Boyd
Dennis Brophy
Clifford E. Cummings
Tom Fitzpatrick
Ronald Goodstein
Ennis Hawk
Atsushi Kasuya
Jay Lawrence
Francoise Martinolle
Michael T. Y. (Mac) McNamara
Don Mills
Mehdi Mohtashemi
Karen Pieper
Brad Pierce
Alec Stanculescu
Stuart Sutherland
Gordon Vreugdenhil
Steven Dovich
Dennis Marsa
Francoise Martinolle
Nisa Parikh
David Roberts
Copyright © 2004 IEEE. All rights reserved. v
Contents
1. Overview.............................................................................................................................................. 1
1.1 Objectives of this standard......................................................................................................... 1
1.2 Conventions used in this standard.............................................................................................. 1
1.3 Syntactic description.................................................................................................................. 2
1.4 Contents of this standard............................................................................................................ 2
1.5 Header file listings..................................................................................................................... 4
1.6 Examples.................................................................................................................................... 5
1.7 Prerequisites............................................................................................................................... 5
2. Lexical conventions ............................................................................................................................. 6
2.1 Lexical tokens............................................................................................................................ 6
2.2 White space................................................................................................................................ 6
2.3 Comments .................................................................................................................................. 6
2.4 Operators.................................................................................................................................... 6
2.5 Numbers..................................................................................................................................... 6
2.5.1 Integer constants ........................................................................................................... 7
2.5.2 Real constants ............................................................................................................. 10
2.5.3 Conversion.................................................................................................................. 10
2.6 Strings ...................................................................................................................................... 11
2.6.1 String variable declaration.......................................................................................... 11
2.6.2 String manipulation..................................................................................................... 11
2.6.3 Special characters in strings........................................................................................ 11
2.7 Identifiers, keywords, and system names ................................................................................ 12
2.7.1 Escaped identifiers...................................................................................................... 12
2.7.2 Generated identifiers................................................................................................... 13
2.7.3 Keywords.................................................................................................................... 13
2.7.4 System tasks and functions......................................................................................... 13
2.7.5 Compiler directives..................................................................................................... 14
2.8 Attributes.................................................................................................................................. 14
2.8.1 Examples..................................................................................................................... 15
2.8.2 Syntax ......................................................................................................................... 16
3. Data types........................................................................................................................................... 19
3.1 Value set................................................................................................................................... 19
3.2 Nets and variables.................................................................................................................... 19
3.2.1 Net declarations ..........................................................................................................19
3.2.2 Variable declarations .................................................................................................. 21
3.3 Vectors..................................................................................................................................... 22
3.3.1 Specifying vectors....................................................................................................... 22
3.3.2 Vector net accessibility............................................................................................... 23
3.4 Strengths .................................................................................................................................. 23
3.4.1 Charge strength...........................................................................................................23
3.4.2 Drive strength.............................................................................................................. 23
3.5 Implicit declarations................................................................................................................. 24
3.6 Net initialization....................................................................................................................... 24
3.7 Net types .................................................................................................................................. 24
3.7.1 Wire and tri nets.......................................................................................................... 24
3.7.2 Wired nets................................................................................................................... 25
评论0