-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
testAdding new or improve test caseAdding new or improve test case
Description
Rules
| Expression | Bit size | Comments |
|---|---|---|
| Unsized constant number | At least 32 | Suggest 65 bits |
| Sized constant number | As specified | |
i op j, where op is: + - * / % & | ^ |
max(L(i),L(j)) | |
op i, where op is: + - ~ |
L(i) | |
op i, where op is: & | ^ |
1 | |
i op j, where op is: >> << ** |
L(i) | j is self-determined |
i ? j : k |
max(L(j),L(k)) | i must be Boolean |
| cast, where casting_type is an integer type | L(casting_type) |
- Unsized unbased decimal and octal numbers are signed.
- Unsized unbased hexadecimal numbers are unsigned.
- Based numbers are unsigned, except when they are designated as signed with the 's notation (e.g., 4'sd12).
- Bit-select results are unsigned, regardless of the operands.
- Part-select results are unsigned, regardless of the operands, even if the part-select specifies the entire width.
- If any context-determined operand of an expression is unsigned, the result is unsigned regardless of the operators.
- If all context-determined operands of an expression are signed, the result is signed regardless of the operators, unless specified otherwise.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
testAdding new or improve test caseAdding new or improve test case