From The Verilog Hardware Description Language, Fifth Edition
Verilog source text files consist of a stream of lexical tokens separated by white space. The spacing of tokens is free format the specific choice of tabs, spaces, or newlines to separate lexical tokens is not important to the compiler. However, the choice is important for giving a readable structure to the description. It is important that you develop a consistent style of writing your Verilog descriptions. We offer the examples in the book as a starting point to develop your own personal style.
The types of lexical tokens in the language are: white space, comments, operators, numbers, strings, identifiers, and keywords. This Appendix will discuss each of these.
B.1 White Space and Comments
White space is defined as any of the following characters: blanks, tabs, newlines, and formfeeds. These are ignored except for when they are found in strings.
There are two forms of comments. The single line comment begins with the two characters // and ends with a newline. A block comment begins with the two characters /* and ends with the two characters */. Block comments may span several lines. However, they may not be nested.
B.2 Operators
Operators are single, double or triple character sequences that are used in expressions. Appendix C lists and defines all the operators.
B.3 Numbers
Constant numbers can be specified in decimal, hexadecimal, octal, or binary. They may optionally start with a + or ?, and can be given in one of two forms.
The first form is an unsized decimal...
Products & Services
Topics of Interest
C.1 Table of Operators Table 3.1: Verilog Operators Operator Symbol Name Definition Comments {,} Concatenation Joins together bits from two or more...
NCPlot is an editor and backplotter for 4-axis mill and 2-axis lathe G-code programs. This software combines editing, formatting and translation toolse useful for CNC programmers with a backplotter...
In this section we present some of the built in Verilog System Tasks and Functions. Our philosophy for this book is not to become a substitute for the simulator manual. Rather, we want to illustrate a...
NASL Script Syntax This section provides a descriptive overview of NASL script syntax, written to help the reader write his or her own NASL scripts. For a complete discussion of the NASL syntax,...
This chapter we looks at some of the formal definitions of the Verilog language: identifiers, white space, comments, numbers, text macros, modules, value set, and strengths. IDENTIFIERS...