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

Wrong modport directionality accross scopes doesn't trigger an error #1622

Open
veripoolbot opened this issue Dec 6, 2019 · 3 comments
Open

Wrong modport directionality accross scopes doesn't trigger an error #1622

veripoolbot opened this issue Dec 6, 2019 · 3 comments

Comments

@veripoolbot
Copy link

@veripoolbot veripoolbot commented Dec 6, 2019


Author Name: Driss Hafdi
Original Redmine Issue: 1622 from https://www.veripool.org


Verilator doesn't seem to be able to assert the correctness of modport directionality when it involves multiple scope levels. This small testbench (drissos@2cec11a) illustrates the problem and passes in verilator where it should instead fail with an error message along this line:

     %Error: t/t_modport_direction_bad.v:36: Attempt to drive input-only modport: 'data'
     : ... In instance t.source_i.source_i
     ctrl.data <= ~ctrl.data;
     ^~~~
     %Error: Exiting due to 1 error(s)
     %Error: t/t_modport_direction_bad.v:37: Attempt to drive input-only modport: 'valid'
     : ... In instance t.source_i.source_i
     ctrl.valid<= ~ctrl.valid;
     ^~~~
     %Error: Exiting due to 1 error(s)
</code>
@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 6, 2019


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-12-06T22:27:49Z


Thanks for making the test case. Might you be able to look at fixing some of these? Anyhow I will also take a look.

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 6, 2019


Original Redmine Comment
Author Name: Driss Hafdi
Original Date: 2019-12-06T23:11:19Z


Thanks for looking at all the issues. I'm not super familiar with the codebase, but would love to give it a try and learn in the process. Any suggestion on which one I should tackle first ?

@veripoolbot

This comment has been minimized.

Copy link
Author

@veripoolbot veripoolbot commented Dec 7, 2019


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-12-07T17:58:28Z


Pushed the test_regress/t/t_interface_modport_dir_bad.v test with an unsupported() tag (so doesn't run).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.