• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • 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
          • Remove-toohard
          • Qmarksize-check
            • Vl-modulelist-qmarksize-check
            • Vl-qmark-test-size
            • Vl-expr-qmarksize-check
            • Vl-module-qmarksize-check
            • Vl-exprctxalist-qmarksize-check
            • Vl-design-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

Qmarksize-check

Check the sizes of conditional expression tests.

This is a heuristic for generating warnings.

We think it would be strange to see an expression like A ? B : C where A is not one bit wide. It found a few minor things that we were able to clean up, but nothing that was really a bug.

Since the ?: operator has the lowest precedence, expressions like A & B ? C : D are parsed as (A & B) ? C : D, which might not be what is intended. In some cases, an actual precedence problem might be revealed by seeing that the size of the test expression isn't 1.

Subtopics

Vl-modulelist-qmarksize-check
(vl-modulelist-qmarksize-check x) maps vl-module-qmarksize-check across a list.
Vl-qmark-test-size
Determine the "original size" of the test expression for a ?: operator.
Vl-expr-qmarksize-check
Look throughout an expression for any ?: expressions that have wide tests.
Vl-module-qmarksize-check
(vl-module-qmarksize-check x) carries our our qmarksize-check on all the expressions in a module, and adds any resulting warnings to the module.
Vl-exprctxalist-qmarksize-check
(vl-exprctxalist-qmarksize-check x) extends vl-expr-qmarksize-check across an vl-exprctxalist-p.
Vl-design-qmarksize-check