In the text box describing VCD file syntax in IEEE 1364-2005 chapter 18, I see
identifier_code ::= { ASCII character }just as you noted. With apologies for being tedious, let's break this down based on Section 1.3,
Syntactic Description.
- "Lowercase words, some containing embedded underscores, are used to denote syntactic categories. For example: module_declaration." This applies to identifier_code.
- "The formal syntax of the Verilog HDL is described using Backus-Naur Form (BNF)." That means ::= is the symbol derivation rule.
- "Braces ({}) enclose a repeated item unless it appears in boldface, in which case it stands for itself. The item may appear zero or more times; the repetitions occur from left to right as with an equivalent left-recursive rule." So I take that as a yes. { ASCII character } means zero or more ASCII characters in sequence. In this case, I would hope they intended one or more ASCII characters in sequence...
I also see the example you're referring to with the 2-character identifier code.
IEEE 1364-2001 is the same in regards to the above, and it too has an example with a 2-character identifier code.
IEEE 1364-1995 has similar contents in the
Syntactic Description section and contains the example with a 2-character identifier code, but it lacks the line
identifier_code ::= { ASCII character }in the text box describing the VCD file syntax. So maybe that's the standard body's attempt to clarify that multiple characters are allowed in identifier codes. IEEE 1364-1995 also contains the paragraph quoted below, which appears to be unchanged in the 2001 and 2005 versions of the standard.
The value change dumper generates character identifier codes to represent variables. The identifier code is a code composed of the printable characters that are in the ASCII character set from ! to ~ (decimal 33 to 126).
I just wrote a program that dumps output to a VCD file, and I used two-character identifier codes in order to be able to output more than 94 different variables. GTKWave had no problem with the file that I generated. I just did the "Excel Columns" thing but with ASCII values 33–126, if that makes sense: !!, !", !#, etc. There does not appear to be anything in the standard constraining the first character. Indeed, I wish it would be more explicit on these points. For example, is there a
maximum identifier length? Granted, I only skimmed tiny portions of the standard that seemed relevant to your question and may have missed one or more things.
Maybe the popular conception of single character identifier codes is down to most people needing 94 or fewer variables coupled with either "good enough" philosophy, not reading the standard, or simply not thinking about it.