4 - Verilog Language Elements
4 - Verilog Language Elements
4 - Verilog Language Elements
Prof. A. K. Swain
Asst. Prof., ECE Dept., NIT Rourkela
Escaped identifier:
• An escaped identifier provides a way of including any of the printable
ASCII characters in an identifier.
• An escaped identifier starts with a \ (backslash)
• Ends with a white space (a white space is a space, tab or a newline).
Examples of escaped identifiers.
\1234 , \.*.$ , \{ * * * * * * } , \~Q , \Output is same as Output
Comments
Two forms of comments in Verilog HDL.
1. /* First form: Can
extend across
many
lines */
Example:
initial begin Top = 3'b001; #2 Top = 3'b011; end
is same as:
initial
begin
Top = 3 'b001;
#2 Top = 3 'b011 ;
end
Size specified is smaller than the size specified for the constant: then
• The leftmost bits are appropriately truncated.
Example:
3'b1001_0011 : same as 3'b011
5'H0FFF : same as 5'H1F
• The ? :- used as an alternate for value z in a number.
• It may be used to improve readability in cases where the value z is
interpreted as a don’t-care value
website:
asic-world.com
www.xilinx.com