• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
          • Preprocessor
          • Vl-loadconfig
          • Lexer
            • Lex-strings
            • Lex-identifiers
            • Vl-typo-uppercase-p
            • Vl-typo-number-p
            • Vl-typo-lowercase-p
            • Lex-numbers
              • Vl-z-digit-p
              • Vl-x-digit-p
              • Vl-underscore-or-octal-digit-p
              • Vl-underscore-or-hex-digit-p
              • Vl-underscore-or-decimal-digit-p
              • Vl-underscore-or-binary-digit-p
              • Vl-octal-digit-p
              • Vl-non-zero-decimal-digit-p
              • Vl-hex-digit-p
              • Vl-decimal-digit-p
              • Vl-binary-digit-p
              • Vl-lex-integer
              • Vl-correct-bitlist
              • Vl-lex-time-or-real-number
              • Vl-read-decimal-value
              • Vl-lex-unbased-unsized-literal
              • Vl-lex-number
              • Vl-read-non-zero-unsigned-number
              • Vl-read-any-base
              • Vl-read-unsigned-number
              • Vl-read-time-unit
              • Vl-read-binary-value
              • Vl-read-real-tail
              • Vl-read-octal-value
              • Vl-read-hex-value
              • Vl-read-decimal-base
              • Vl-read-octal-base
              • Vl-read-hex-base
              • Vl-read-binary-base
              • Vl-hex-digits-to-bitlist
              • Vl-octal-digits-to-bitlist
              • Vl-decimal-digits-to-bitlist
              • Vl-binary-digits-to-bitlist
              • Vl-underscore-or-octal-digit-list-p
              • Vl-underscore-or-hex-digit-list-p
              • Vl-underscore-or-decimal-digit-list-p
              • Vl-underscore-or-binary-digit-list-p
              • Vl-non-zero-decimal-digit-list-p
              • Vl-decimal-digit-list-p
              • Vl-binary-digit-list-p
              • Vl-z-digit-list-p
              • Vl-x-digit-list-p
              • Vl-octal-digit-list-p
              • Vl-hex-digit-list-p
              • Vl-timeunit-lookup
            • Chartypes
            • Vl-lex
            • Defchar
            • Tokens
            • Lex-keywords
            • Lexstate
            • Make-test-tokens
            • Lexer-utils
            • Lex-comments
            • Vl-typo-uppercase-list-p
            • Vl-typo-lowercase-list-p
            • Vl-typo-number-list-p
          • Vl-loadstate
          • Parser
          • Vl-load-merge-descriptions
          • Scope-of-defines
          • Vl-load-file
          • Vl-flush-out-descriptions
          • Vl-description
          • Vl-loadresult
          • Vl-read-file
          • Vl-find-basename/extension
          • Vl-find-file
          • Vl-read-files
          • Extended-characters
          • Vl-load
          • Vl-load-main
          • Vl-load-description
          • Vl-descriptions-left-to-load
          • Inject-warnings
          • Vl-load-descriptions
          • Vl-load-files
          • Vl-load-summary
          • Vl-collect-modules-from-descriptions
          • Vl-descriptionlist
        • Transforms
        • Lint
        • Mlib
        • Server
        • Kit
        • Printer
        • Esim-vl
        • Well-formedness
      • Sv
      • Fgl
      • Vwsim
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Lexer

Lex-numbers

Handling of integer numbers, real numbers, and time literals.

Verilog has a very rich (and correspondingly complicated) syntax for numbers. Fortunately, this part of the language tends to be well defined and there are few differences here between Verilog-2005 and SystemVerilog-2012.

Subtopics

Vl-z-digit-p
z | Z | ?
Vl-x-digit-p
x | X
Vl-underscore-or-octal-digit-p
_ | octal_digit
Vl-underscore-or-hex-digit-p
_ | hex_digit
Vl-underscore-or-decimal-digit-p
_ | decimal_digit
Vl-underscore-or-binary-digit-p
_ | binary_digit
Vl-octal-digit-p
x_digit | z_digit | [0-7]
Vl-non-zero-decimal-digit-p
[1-9]
Vl-hex-digit-p
x_digit | z_digit | [0-9a-fA-F]
Vl-decimal-digit-p
[0-9]
Vl-binary-digit-p
x_digit | z_digit | 0 | 1
Vl-lex-integer
Match any integral_number.
Vl-correct-bitlist
Extend (or truncate) a bit-list to match the size specifier for an integer token.
Vl-lex-time-or-real-number
Match real_number or time_literal.
Vl-read-decimal-value
Matches unsigned_number | x_digit { _ } | z_digit { _ }.
Vl-lex-unbased-unsized-literal
unbased_unsized_literal ::= '0 | '1 | 'z_or_x.
Vl-lex-number
Match number, time_literal, and unbased_unsized_literal.
Vl-read-non-zero-unsigned-number
non_zero_unsigned_number ::= non_zero_decimal_digit { _ | decimal_digit }.
Vl-read-any-base
Matches binary_base | octal_base | decimal_base | hex_base
Vl-read-unsigned-number
unsigned_number ::= decimal_digit { _ | decimal_digit }.
Vl-read-time-unit
time_unit ::= s | ms | us | ns | ps | fs.
Vl-read-binary-value
binary_value ::= binary_digit { _ | binary_digit }.
Vl-read-real-tail
Match exp [sign] unsigned_number
Vl-read-octal-value
octal_value ::= octal_digit { _ | octal_digit }.
Vl-read-hex-value
hex_value ::= hex_digit { _ | hex_digit }.
Vl-read-decimal-base
decimal_base ::= '[s|S]d | '[s|S]D.
Vl-read-octal-base
octal_base ::= '[s|S]o | '[s|S]O.
Vl-read-hex-base
hex_base ::= '[s|S]h | '[s|S]H.
Vl-read-binary-base
binary_base ::= '[s|S]b | '[s|S]B.
Vl-hex-digits-to-bitlist
Converts MSB-first digits into an initial (not truncated, not extended) MSB-first vl-bitlist-p.
Vl-octal-digits-to-bitlist
Convert MSB-first octal digits into an initial (not truncated, not extended) MSB-first vl-bitlist-p.
Vl-decimal-digits-to-bitlist
Convert an decimal_value with x/z digits into an initial (not truncated, not extended) vl-bitlist-p.
Vl-binary-digits-to-bitlist
Convert MSB-first binary digits into an initial (not truncated, not extended) MSB-first vl-bitlist-p.
Vl-underscore-or-octal-digit-list-p
(vl-underscore-or-octal-digit-list-p x) recognizes lists where every element satisfies vl-underscore-or-octal-digit-p.
Vl-underscore-or-hex-digit-list-p
(vl-underscore-or-hex-digit-list-p x) recognizes lists where every element satisfies vl-underscore-or-hex-digit-p.
Vl-underscore-or-decimal-digit-list-p
(vl-underscore-or-decimal-digit-list-p x) recognizes lists where every element satisfies vl-underscore-or-decimal-digit-p.
Vl-underscore-or-binary-digit-list-p
(vl-underscore-or-binary-digit-list-p x) recognizes lists where every element satisfies vl-underscore-or-binary-digit-p.
Vl-non-zero-decimal-digit-list-p
(vl-non-zero-decimal-digit-list-p x) recognizes lists where every element satisfies vl-non-zero-decimal-digit-p.
Vl-decimal-digit-list-p
(vl-decimal-digit-list-p x) recognizes lists where every element satisfies vl-decimal-digit-p.
Vl-binary-digit-list-p
(vl-binary-digit-list-p x) recognizes lists where every element satisfies vl-binary-digit-p.
Vl-z-digit-list-p
(vl-z-digit-list-p x) recognizes lists where every element satisfies vl-z-digit-p.
Vl-x-digit-list-p
(vl-x-digit-list-p x) recognizes lists where every element satisfies vl-x-digit-p.
Vl-octal-digit-list-p
(vl-octal-digit-list-p x) recognizes lists where every element satisfies vl-octal-digit-p.
Vl-hex-digit-list-p
(vl-hex-digit-list-p x) recognizes lists where every element satisfies vl-hex-digit-p.
Vl-timeunit-lookup
Get the vl-timeunit-p corresponding to a time unit string like "us".