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

Width mismatch error in assign statement with VCS strict compile #191

Closed
rsharanesh opened this issue Jul 24, 2023 · 0 comments · Fixed by #192
Closed

Width mismatch error in assign statement with VCS strict compile #191

rsharanesh opened this issue Jul 24, 2023 · 0 comments · Fixed by #192

Comments

@rsharanesh
Copy link
Contributor

In the below assignment, the RHS being a genvar is 32-bits wide, while the LHS which is parameterized and need not be always of 32-bits wide. Thus the compiler throws a width mismatch error.

assign tmp_i = i;

Can the code be modified to be generic enough with the assignment like this,
assign tmp_i = i[BIN_WIDTH-1:0];

rsharanesh added a commit to rsharanesh/common_cells that referenced this issue Jul 24, 2023
@niwis niwis linked a pull request Jul 31, 2023 that will close this issue
niwis added a commit that referenced this issue Dec 13, 2023
* Fix width mismatch assignment issue #191

* Update src/onehot_to_bin.sv

Co-authored-by: Nils Wistoff <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant