• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
          • Vl-lint
            • Vl-lintconfig-p
            • Condcheck
            • Lint-warning-suppression
            • Lucid
            • Lvaluecheck
            • Vl-interfacelist-alwaysstyle
            • Truncation-warnings
            • Vl-modulelist-alwaysstyle
            • Skip-detection
            • Vl-lint-report
            • Vl-lintresult
            • Vl::vl-design-sv-use-set
            • Oddexpr-check
              • Vl-interfacelist-oddexpr-check
              • Vl-packagelist-oddexpr-check
              • Vl-modulelist-oddexpr-check
              • Vl-warn-odd-binary-expression-main
              • *vl-odd-binops-table*
              • Vl-oddinfo
              • Vl-warn-odd-binary-expression
              • Vl-expr-probable-selfsize
              • Vl-interface-oddexpr-check
              • Vl-package-oddexpr-check
              • Vl-odd-binop-class
              • Vl-module-oddexpr-check
              • Vl-expr-oddexpr-check
              • Vl-oddinfo-details
              • Vl-ctxexprlist-oddexpr-check
              • Vl-oddinfolist-details
              • Vl-design-oddexpr-check
              • Vl-ctxexprlist-oddexpr-check-nrev
              • Vl-oddinfolist
            • Leftright-check
            • Duplicate-detect
            • Selfassigns
            • *vl-lint-help*
            • Arith-compare-check
            • Dupeinst-check
            • Qmarksize-check
            • Lint-whole-file-suppression
            • Run-vl-lint-main
            • Logicassign
            • Run-vl-lint
            • Vl-print-certain-warnings
            • Duperhs-check
            • Vl-lint-top
            • Sd-filter-problems
            • Vl-modulelist-add-svbad-warnings
            • Vl-module-add-svbad-warnings
            • Check-case
            • Vl-lint-extra-actions
            • Drop-lint-stubs
            • Vl-lint-print-warnings
            • Drop-user-submodules
            • Check-namespace
            • Vl-lintconfig-loadconfig
            • Vl-lint-design->svex-modalist-wrapper
            • Vl-delete-sd-problems-for-modnames-aux
            • Vl-collect-new-names-from-orignames
            • Vl-lint-print-all-warnings
            • Vl-design-remove-unnecessary-modules
            • Vl-delete-sd-problems-for-modnames
            • Vl-always-check-style
            • Vl-vardecllist-svbad-warnings
            • Vl-vardecl-svbad-warnings
            • Vl-reportcard-remove-suppressed
            • Vl-reportcard-keep-suppressed
            • Vl-alwayslist-check-style
            • Vl-remove-nameless-descriptions
            • Vl-lint-apply-quiet
            • Vl-warninglist-remove-suppressed
            • Vl-warninglist-keep-suppressed
            • Vl-print-eliminated-descs
            • Vl-module-alwaysstyle
            • Vl-jp-reportcard-aux
            • Vl-interface-alwaysstyle
            • Vl-design-alwaysstyle
            • Vl-jp-description-locations
            • Vl-jp-reportcard
            • Vl-pp-stringlist-lines
            • Vl-jp-design-locations
            • Vl-datatype-svbad-p
            • Unpacked-range-check
            • Sd-problem-major-p
            • Vl-alwaysstyle
          • Vl-server
          • Vl-gather
          • Vl-zip
          • Vl-main
          • Split-plusargs
          • Vl-shell
          • Vl-json
        • Mlib
        • Transforms
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Vl-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-interfacelist-oddexpr-check
(vl-interfacelist-oddexpr-check x ss) maps vl-interface-oddexpr-check across a list.
Vl-packagelist-oddexpr-check
(vl-packagelist-oddexpr-check x ss) maps vl-package-oddexpr-check across a list.
Vl-modulelist-oddexpr-check
(vl-modulelist-oddexpr-check x ss) maps vl-module-oddexpr-check across a list.
Vl-warn-odd-binary-expression-main
Check the top-level of a binary expression for precedence problems.
*vl-odd-binops-table*
The actual intelligence behind the oddexpr check.
Vl-oddinfo
Vl-warn-odd-binary-expression
Recursively check through an expression for precedence problems.
Vl-expr-probable-selfsize
Heuristically estimate an expression's size.
Vl-interface-oddexpr-check
Vl-package-oddexpr-check
Vl-odd-binop-class
Group binary operators into classes.
Vl-module-oddexpr-check
Vl-expr-oddexpr-check
Vl-oddinfo-details
Vl-ctxexprlist-oddexpr-check
Vl-oddinfolist-details
Vl-design-oddexpr-check
Vl-ctxexprlist-oddexpr-check-nrev
Vl-oddinfolist
A list of vl-oddinfo-p objects.