Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bit width check policy #1257

Open
dalance opened this issue Feb 19, 2025 · 0 comments
Open

Bit width check policy #1257

dalance opened this issue Feb 19, 2025 · 0 comments
Labels
tools Tools feature

Comments

@dalance
Copy link
Collaborator

dalance commented Feb 19, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Tools feature
Projects
None yet
Development

No branches or pull requests

1 participant