veryl
veryl copied to clipboard
Bit width check policy
Now bit width checking becomes ready to be implemented. So we should decide what types of bit width difference are checked.
For example, the following code is commonly used as a wrap around counter.
var cnt: logic<10>;
always_ff {
cnt += 1;
}
From a point of view of most strict checking, cnt += 1 should be detected as bit width error because it causes carry overflow.
But if these cases get error or warning, we feel troublesome and disable the checking.
So we should explore tradeoff between convenience and safety.