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

Use of package qualified parameters #586

Closed
veripoolbot opened this issue Dec 2, 2012 · 4 comments
Closed

Use of package qualified parameters #586

veripoolbot opened this issue Dec 2, 2012 · 4 comments

Comments

@veripoolbot
Copy link

@veripoolbot veripoolbot commented Dec 2, 2012


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


The following is accepted by VCS, and I believe it to be valid System Verilog:

package params;
    parameter P = 7;
endpackage

module test (/*AUTOARG*/
	     // Inputs
	     input logic [params::P:0] val	// Fully qualified parameter
    );

endmodule

With Verilator, this fails with:

%Error: t/t_package_param.v:37: syntax error, unexpected ':', expecting '(' or '.'
%Error: Exiting due to 1 error(s)
%Error: Command Failed /home/jeremy/gittrees/verilator/verilator_bin --prefix Vt_package_param --x-assign unique -cc -Mdir obj_dir/t_package_param --debug-check -f input.vc t/t_package_param.v

(where line 37 is the line declaring @input logic ...@ )

I'll start investigating what is needed to extend Verilator to support this SystemVerilog syntax. I'd welcome any hints on this.

A test case for this can be pulled from branch sv-package-param at git@github.com:jeremybennett/verilator.git

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 3, 2012


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-12-03T03:08:31Z


This parses in Verilog-Perl. I looked at the parser differences and package scope isn't properly supported in expressions, it will be easier if I reconcile it.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 3, 2012


Original Redmine Comment
Author Name: Jeremy Bennett (@jeremybennett)
Original Date: 2012-12-03T08:47:10Z


Hi Wilson - Thanks for picking this up - Jeremy

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 31, 2012


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-12-31T22:07:31Z


Fixed in git towards 3.844. This required a fairly large parser change, so it might make some dotted reference (a.b.c) handling unstable, though everything I have passes.

@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:29Z


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.