Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Use of Escaped Identifiers in Verilog

Status
Not open for further replies.

echo47

Advanced Member level 5
Joined
Apr 7, 2002
Messages
3,942
Helped
638
Reputation
1,274
Reaction score
89
Trophy points
1,328
Location
USA
Activity points
33,176
I have never seen anyone use them.

Copied from IEEE Std 1364-2001:

2.7.1 Escaped identifiers

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 identifier \cpu3 is treated the same as a nonescaped identifier cpu3.

Example:

\busa+index
\-clock
\***error-condition***
\net1/\net2
\{a,b}
\a*(b+c)
 

IBNobody

Junior Member level 1
Joined
Jan 22, 2006
Messages
18
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,283
Activity points
1,473
kumar_eee said:
What is the use of Escaped Identifiers in verilog?...

Eg:
\s+t;

K.Kumar

They sound nice in theory...

"Hey, I can call my symbol \q' or \~q instead of something silly like qbar."

...but in practice, they're a complete nightmare.

Why? It's so easy to omit the trailing space that tells the compiler where the escaped identifier ends. If you're adding things to a comma'd list, you end up typing...

\~q, q

...instead of...

\~q , q


Save yourself compile errors and just ignore this feature.

- Nobody
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top