VERILOG2020: Vectors should not overflow

Summary

Count: 1

ReliabilitySecurityMaintainabilityCode attributeEffort to fixTags
HIGH--Intentionality | Logical10minsynthesis, vscode, linter, simulation

Description

Vector overflows lead to unexpected behaviors. Thus, vector overflows should be carefully reviewed.

Noncompliant code example

logic [8:0] i = 7'd256; // Noncompliant: 9 bit needed

Compliant solution

logic [8:0] i = 9'd256;

Parameters

No parameters.