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
Assignees
Labels
resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


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
Copy link
Contributor Author


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


Fixed in git towards 3.844.

@veripoolbot
Copy link
Contributor Author


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
Labels
resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

2 participants