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

Bad dead-code elimination with parameterized module #583

Closed
veripoolbot opened this issue Nov 29, 2012 · 2 comments
Closed

Bad dead-code elimination with parameterized module #583

veripoolbot opened this issue Nov 29, 2012 · 2 comments
Assignees

Comments

@veripoolbot
Copy link

@veripoolbot veripoolbot commented Nov 29, 2012


Author Name: Jeremy Bennett (@jeremybennett)
Original Redmine Issue: 583 from https://www.veripool.org
Original Date: 2012-11-29
Original Assignee: Wilson Snyder (@wsnyder)


The following test fails with an internal error:

module t (/*AUTOARG*/
    // Inputs
    clk
    );
    input clk;
    wire [71:0] ctrl;

    memory #(.words(72)) i_memory (.clk (clk));

    assign ctrl = i_memory.mem[0];
endmodule

// memory module, which is used with parameter
module memory (clk);
    input clk;

    parameter words = 16384, bits = 72;

    reg [bits-1 :0] mem[words-1 : 0];

endmodule

The error is:

pure virtual method called
terminate called without an active exception
%Error: Verilator aborted.  Consider trying --debug --gdbbt

The problem was introduced in git commit 6cd9b25 and appears to be caused by mistakenly pruning a variable that is still referenced in @V3Dead::deadifyModules@. I don't have a solution, but please pull the test case from branch bad-elim at git@github.com:jeremybennett/verilator.git

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Nov 30, 2012


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-11-30T11:57:42Z


Didn't process a reference, then later on when used it's dangling and causes the crash.

Fixed in git towards 3.843.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 1, 2012


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-12-01T21:41:39Z


In 3.843.

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.