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

Wrong assignment to enum variable from expression of different type #61

Closed
dawidzim opened this issue Jun 26, 2020 · 1 comment
Closed

Comments

@dawidzim
Copy link
Contributor

Hey!
Enum should be assignment only by enum type. LRM1800-2017 6.19.4: A cast shall be required for an expression that is assigned to an enum variable where the type of the expression is not equivalent to the enumeration type of the variable.
So in file design/ifu/ifu_ifc_ctl.sv need to be change two lines:
assign next_state[1] = (~state[1] & state[0] & ~reset_delayed & miss_f2 & ~goto_idle) | (state[1] & ~reset_delayed & ~mb_empty_mod & ~goto_idle);
for
assign next_state[1] = state_t'((~state[1] & state[0] & ~reset_delayed & miss_f2 & ~goto_idle) | (state[1] & ~reset_delayed & ~mb_empty_mod & ~goto_idle));

and
assign next_state[0] = (~goto_idle & leave_idle) | (state[0] & ~goto_idle) | (reset_delayed);
for
assign next_state[0] = state_t'((~goto_idle & leave_idle) | (state[0] & ~goto_idle) | (reset_delayed));
Like was done in pull request #49

@aprnath
Copy link
Collaborator

aprnath commented Aug 17, 2020

Thanks for reporting this, and #62. RTL will be fixed in the next release.

@aprnath aprnath closed this as completed Aug 17, 2020
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

No branches or pull requests

2 participants