• 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
        • Transforms
        • Lint
          • Vl-lintconfig-p
          • Lucid
          • Skip-detection
          • Vl-lintresult-p
          • Lint-warning-suppression
          • Condcheck
          • Selfassigns
          • Leftright-check
          • Dupeinst-check
          • Oddexpr-check
            • Vl-modulelist-oddexpr-check
            • *vl-odd-binops-table*
            • Vl-warn-odd-binary-expression-main
            • Vl-expr-probable-selfsize
            • Vl-odd-binop-class
            • Vl-module-oddexpr-check
            • Vl-oddexpr-check
            • Vl-exprctxalist-oddexpr-check
            • Vl-design-oddexpr-check
            • Vl-warn-odd-binary-expression
            • Vl-pp-oddexpr-details
            • *fake-modelement*
          • Remove-toohard
          • Qmarksize-check
          • Portcheck
          • Duplicate-detect
          • Vl-print-certain-warnings
          • Duperhs-check
          • *vl-lint-help*
          • Lint-stmt-rewrite
          • Drop-missing-submodules
          • Check-case
          • Drop-user-submodules
          • Check-namespace
          • Vl-lint
        • Mlib
        • Server
        • Kit
        • Printer
        • Esim-vl
        • Well-formedness
      • Sv
      • Fgl
      • Vwsim
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Lint

Oddexpr-check

Check for odd expressions that might indicate precedence problems.

This is some rough code for finding expressions that might have precedence problems.

Consider the expression a & b < c. Due to the Verilog precedence rules, this gets parsed as a & (b < c). Well, that might be quite surprising. We try to look for expressions like this and, unless the code contains explicit parens around the (b < c) part, we issue a warning that it might not have the expected precedence.

This has found a few good bugs!

Subtopics

Vl-modulelist-oddexpr-check
(vl-modulelist-oddexpr-check x ss) maps vl-module-oddexpr-check across a list.
*vl-odd-binops-table*
The actual intelligence behind the oddexpr check.
Vl-warn-odd-binary-expression-main
Check the top-level of a binary expression for precedence problems.
Vl-expr-probable-selfsize
Heuristically estimate an expression's size.
Vl-odd-binop-class
Group binary operators into classes.
Vl-module-oddexpr-check
(vl-module-oddexpr-check x ss) carries our our oddexpr-check on all the expressions in a module, and adds any resulting warnings to the module.
Vl-oddexpr-check
Vl-exprctxalist-oddexpr-check
Vl-design-oddexpr-check
Vl-warn-odd-binary-expression
Recursively check through an expression for precedence problems.
Vl-pp-oddexpr-details
*fake-modelement*