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

Local declarations should override package declarations from wildcard import #599

Closed
veripoolbot opened this issue Jan 8, 2013 · 2 comments
Closed
Assignees

Comments

@veripoolbot
Copy link

@veripoolbot veripoolbot commented Jan 8, 2013


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


SystemVerilog requires that local declarations override package declarations, where wildcard import is used with the package (IEEE 1800-2009, section 26.3). Thus the following is valid System Verilog:

package defs;
    parameter NUMBER = 8;
    localparam NUM = NUMBER;
endpackage

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

    input clk;
    import defs::*;

    parameter NUM = 32;
endmodule

However, although this passes with VCS, it fails with Verilator, giving a duplicate declaration warning.

Please pull a patch with the testcase from branch package-param at git@github.com:jeremybennett/verilator.git.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Jan 9, 2013


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2013-01-09T00:06:58Z


Fixed in git towards 3.844.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Jan 10, 2013


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


In 3.844.

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.