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

Part-select in constant function return isn't allowed #916

Closed
veripoolbot opened this issue May 6, 2015 · 2 comments
Closed

Part-select in constant function return isn't allowed #916

veripoolbot opened this issue May 6, 2015 · 2 comments
Assignees
Labels
resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800

Comments

@veripoolbot
Copy link
Contributor


Author Name: Andrew Bardsley
Original Redmine Issue: 916 from https://www.veripool.org
Original Date: 2015-05-06
Original Assignee: Wilson Snyder (@wsnyder)


Assigning to a function's return variable (function name) with a part-select prevents the function from being considered constant.

// From constant_function_error.v attached
function bottom_4bits ...
      bottom_4bits[3:0] = ...
endfunction

Produces:

%Error: constant_function_error.v:9: Expecting expression to be constant, but can't determine constant for FUNCREF 'bottom_4bits'
%Error: constant_function_error.v:5: ... Location of non-constant ASSIGN: LHS isn't simple variable
%Error: Exiting due to 1 error(s)
%Error: Command Failed /arm/scratch/andbar02/verilator-git/bin/verilator_bin --cc constant_function_error.v

Testing with version 3.870 and with the git HEAD produce the same result.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-05-09T18:02:44Z


Fixed in git towards 3.873.

Note the constification is still somewhat fragile.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-06-06T18:04:52Z


In 3.874.

@veripoolbot veripoolbot added resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800 labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800
Projects
None yet
Development

No branches or pull requests

2 participants