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

Problem with bit selection from const variable #693

Closed
veripoolbot opened this issue Oct 31, 2013 · 2 comments
Closed

Problem with bit selection from const variable #693

veripoolbot opened this issue Oct 31, 2013 · 2 comments
Assignees

Comments

@veripoolbot
Copy link
Contributor

@veripoolbot veripoolbot commented Oct 31, 2013


Author Name: Jie Xu (@jiexu)
Original Redmine Issue: 693 from https://www.veripool.org
Original Date: 2013-10-31
Original Assignee: Wilson Snyder (@wsnyder)


Compiling the following code will fail

const logic unsigned [31:0] var_const;
logic [7:0] res_const;
assign res_const = var_const[7:0];  // Error line, not able to select part of const

with error:

Illegal bit or array select; type already selected, or bad dimension: type is 
Illegal range select; type already selected, or bad dimension: type is

Remove the @const@ will fix the problem of course. Not sure if the use here is compliant with standard or not. An attempt to fix this together with test case can be pulled here: https://github.com/jiexu/verilator/ constSel.

@veripoolbot
Copy link
Contributor Author

@veripoolbot veripoolbot commented Nov 1, 2013


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2013-11-01T02:39:30Z


Fixed in git towards 3.854.

"const" to my knowledge hasn't been tested very well, so I wouldn't be surprised if there are additional issues. Note also const isn't strongly enforced.

@veripoolbot
Copy link
Contributor Author

@veripoolbot veripoolbot commented Nov 27, 2013


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2013-11-27T01:15:40Z


In 3.854.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.