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

No support for parameterized interface in module "signal" list. #1104

Closed
veripoolbot opened this issue Nov 9, 2016 · 2 comments
Closed

No support for parameterized interface in module "signal" list. #1104

veripoolbot opened this issue Nov 9, 2016 · 2 comments
Labels
area: elaboration Issue involves elaboration phase effort: weeks Expect this issue to require weeks or more of invested effort to resolve type: feature-IEEE Request to add new feature, described in IEEE 1800

Comments

@veripoolbot
Copy link
Contributor


Author Name: Adrian Wise
Original Redmine Issue: 1104 from https://www.veripool.org


In SystemVerilog there is, I believe - I admit to being very new to SystemVerilog - no syntax to be able to pass parameters to an interface type when it is used in the signal list of a module.

Instead in the signal list the keyword 'interface' should be used.

See the example code, attached, which essentially lifted directly from Section 25.8 "Parameterized interfaces" of IEEE 1800-1012. (I've deleted the tasks which are not relevant to this issue, and changed a 'ref' on 'data' to 'input'/'output' in the modports so this should be supported by Verilator.)

When compiled this gives:

$ verilator -lint-only parameterized_interfaces.v
%Error: parameterized_interfaces.v:23: Unsupported: virtual interfaces
%Error: parameterized_interfaces.v:29: Unsupported: virtual interfaces
%Error: Exiting due to 2 error(s)
...
$ verilator -V
Verilator 3.888 2016-10-14 rev verilator_3_888
...

I don't think that this is an example of a virtual interface, so at the very least this is a confusing error message.

It's tempting to change, in this example, the keyword 'interface' for the type 'simple_bus', for example:

module memMod(simple_bus a);

(or use the modports simple_bus.slave / simple_bus.master as appropriate)

But this is incorrect because that's a reference to a simple_bus with default parameters - not one with the parameters for the bus that's actually connected to the CPU or memory.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2016-12-22T02:00:45Z


Message fixed.

This unfortunately cannot be supported soon, as Verilator needs to resolve all types during a first pass (before parameters are known) and this cannot be done with generic interfaces. A major restructuring would have to happen first.

@veripoolbot veripoolbot added effort: weeks Expect this issue to require weeks or more of invested effort to resolve type: feature-IEEE Request to add new feature, described in IEEE 1800 labels Dec 22, 2019
@wsnyder wsnyder added the area: elaboration Issue involves elaboration phase label Jan 18, 2020
@wsnyder
Copy link
Member

wsnyder commented Jan 25, 2024

Virtual interfaces were supported in #5.002.

@wsnyder wsnyder closed this as completed Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: elaboration Issue involves elaboration phase effort: weeks Expect this issue to require weeks or more of invested effort to resolve type: feature-IEEE Request to add new feature, described in IEEE 1800
Projects
None yet
Development

No branches or pull requests

2 participants