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 select from 1-bit parameter causes error #603

Closed
veripoolbot opened this issue Jan 16, 2013 · 2 comments
Closed

Bit select from 1-bit parameter causes error #603

veripoolbot opened this issue Jan 16, 2013 · 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: Jeremy Bennett (@jeremybennett)
Original Redmine Issue: 603 from https://www.veripool.org
Original Date: 2013-01-16
Original Assignee: Wilson Snyder (@wsnyder)


The following code causes a Verilator error.

    parameter a = 1'b0;
    wire  b = a[0];

The error is:

%Error: t/t_param_bit_sel.v:19: Illegal bit or array select; type does not have a bit range, or bad dimension: type is bit

It seems that Verilator assumes that a 1-bit wide parameter must be a scalar, rather than a 1-bit wide vector. Other simulators (e.g. VCS, Icarus) do not make this assumption and pass this code cleanly.

Please pull a test case from branch param-bit-sel at git@github.com:jeremybennett/verilator.git

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2013-01-17T01:59:03Z


Very surprising as "wire foo" isn't allowed to get "foo[ 0 ]". parameters inherit the type of the assignment, but the type is a bit. Anyhow.

Fixed in git towards 3.845.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2013-02-05T03:22:07Z


In 3.845.

@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