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