|
 |
|
Chip Design |
|
|
|
|
|
 |
|
Getting Started |
|
|
|
|
|
|
|
|
|
|
|
LEXICAL TOKENS
- White Space - Spaces, Tabs(t), Newlines(n), and Formfeeds.
- Comments
- A one-line comment shall start with the two characters // and end with a new line.
- A block comment shall start with /* and end with */.
- Block comments shall not be nested.
- The one-line comment token // shall not have any special meaning in a block comment.
- Operators - Unary, Binary and Ternary
- Unary operators shall appear to the left of their operand.
- Binary operators shall appear between their operands.
- A conditional operator shall have two operator characters that separate three operands.
- Constants – Integer constants and Real constants
- Strings - A string is a sequence of characters enclosed by double quotes ("") and contained on a single line
- Identifiers:
- An identifier is used to give an object a unique name so it can be referenced.
- An identifier is either a simple identifier or an escaped identi.er
- A simple identifier shall be any sequence of letters, digits, dollar signs ($), and underscore characters (_).
- The first character of a simple identi.er shall not be a digit or $; it can be a letter or an underscore. Identifiers shall be case sensitive.
Example:
shiftreg_a
busa_index
error_condition
merge_ab
_bus3
n$657
- Escaped identifiers shall start with the backslash character () and end with white space (space, tab, newline).
· They provide a means of including any of the printable ASCII characters in an identifier (the decimal values 33 through 126, or 21 through 7E in hexadecimal).
· Neither the leading backslash character nor the terminating white space is considered to be part of the identifier. Therefore, an escaped identi.er cpu3 is treated the same as a nonescaped identifier cpu3.
Example:
busa+index
-clock
***error-condition***
net1/net2
{a,b}
a*(b+c)
- Keywords - Keywords are predefined nonescaped identi.ers that are used to define the language constructs. A Verilog HDL keyword preceded by an escape character is not interpreted as a keyword.All keywords are defined in lowercase only.
|
|
|
|
|
|
Today, there have been 17 visitors (23 hits) on this page! |