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 selection from struct causes internal error #600

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

Bit selection from struct causes internal error #600

veripoolbot opened this issue Jan 9, 2013 · 2 comments

Comments

@veripoolbot
Copy link

@veripoolbot veripoolbot commented Jan 9, 2013


Author Name: Jeremy Bennett (@jeremybennett)
Original Redmine Issue: 600 from https://www.veripool.org
Original Date: 2013-01-09
Original Assignee: Wilson Snyder (@wsnyder)


The following code causes an internal error:

module t(/*AUTOARG*/
    // Inputs
    clk
    );

    input clk;
    typedef struct packed {
        logic [1:0][15:0] channel;
        logic others;
    } buss;

    buss b;
    wire [7:0] a;

    assign a = b.channel[0][8+:8];
endmodule

The error is:

%Error: Internal Error: t/t_bitsel_struct.v:25: ../V3LinkResolve.cpp:210: Illegal bit select; no signal/member being extracted from

The code works with VCS. Please pull the test case from branch struct-bit-sel at git@github.com:jeremybennett/verilator.git.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Jan 15, 2013


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2013-01-15T02:53:05Z


This is fixed in git towards 3.845. This uncovered handing of packed arrays-of-structs-of-arrays was also even more broken.

To fix this packed arrays are now represented as a single linear vector in Verilated models this may affect packed arrays that are public or accessed via the VPI. This is a relatively large change that may introduce fallout, as always let me know any issues.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Feb 5, 2013


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


In 3.845.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.