Navigation Menu

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

Selecting Beyond Signal Bounds Is Possible #43

Closed
veripoolbot opened this issue Nov 12, 2008 · 1 comment
Closed

Selecting Beyond Signal Bounds Is Possible #43

veripoolbot opened this issue Nov 12, 2008 · 1 comment
Assignees
Labels
area: lint Issue involves SystemVerilog lint checking resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Lane Brooks
Original Redmine Issue: 43 from https://www.veripool.org
Original Date: 2008-11-12
Original Assignee: Wilson Snyder (@wsnyder)


I discovered in verilator that it is possible to select into a wire out side of its boundaries and the selection wraps. e.g.:

wire [1:0] in;
wire [1:0] out32 = in[3:2];
wire [1:0] out10 = in[1:0];

out10 and out32 come out equal. I am not sure what the verilog standard says, but I think I am used to this giving an error in other tools. I have attached a test that shows the behavior.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2008-11-13T01:55:50Z


There was the t_select_bad_range test, but the difference and bug happens only when the MSB of the select range is binary all 1s and selects the entire width of the original signal. This causes the V3Width stage to optimize it before the warning sees it.

Fixed in git, will be in next release 3.682.

@veripoolbot veripoolbot added area: lint Issue involves SystemVerilog lint checking resolution: fixed Closed; fixed labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: lint Issue involves SystemVerilog lint checking resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

2 participants