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

Additional issues with interfaces inside of generate blocks #1001

Closed
veripoolbot opened this issue Nov 14, 2015 · 8 comments
Closed

Additional issues with interfaces inside of generate blocks #1001

veripoolbot opened this issue Nov 14, 2015 · 8 comments
Assignees
Labels
resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800

Comments

@veripoolbot
Copy link
Contributor


Author Name: Todd Strader (@toddstrader)
Original Redmine Issue: 1001 from https://www.veripool.org
Original Date: 2015-11-14
Original Assignee: Todd Strader (@toddstrader)


Additional issue, very similar to Issue #998:

https://github.com/toddstrader/verilator-dev/tree/intf_named_gen

I modified t_interface_gen5 to show the issue. I also added the () to the interface instantiation to make ModelSim happy for cross-checking.

%Error: t/t_interface_gen5.v:24: Can't find definition of 'my_intf' in dotted signal: my_intf.val
%Error:      Known scopes under 'val': <no cells found>
%Error: Internal Error: t/t_interface_gen5.v:24: ../V3Const.cpp:1452: Not linked

Haven't taken a look at fixing this yet, but any advice is appreciated.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Todd Strader (@toddstrader)
Original Date: 2015-11-15T01:35:31Z


Started working on this:

https://github.com/toddstrader/verilator-dev/tree/intf_named_gen

This fixes t_interface_gen5, but breaks t_genfor_hier. The problem is that I can just slap the new scope name on VarXRefs in the BeginVisitor, but if those VarXRefs were pointing outside of the generate block, now they are broken.

I can't play the same game that BeginRelinkVisitor does for VarRefs with VarXRefs, because a VarXref's dotted() is just a string, and I can't check to see if that's been changed or not.

Still hacking . . .

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-11-15T01:52:14Z


Try adding to V3Begin a AstVarXRef visitor that sets inlinedDots like as in V3Inline.

Also with vars fixed, there's probably a similar problem and fix with dotted function/task calls.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Todd Strader (@toddstrader)
Original Date: 2015-11-15T02:13:10Z


Excellent, that's what I was missing. This works now. I'll take a look at functions too, clean this up and submit the patch.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Todd Strader (@toddstrader)
Original Date: 2015-11-15T03:08:34Z


VarXRefs work, function references work for the latest version of t_interface_gen5 now, but are broken for a bunch of function tests:

https://github.com/toddstrader/verilator-dev

I'm currently trying to figure out how to disambiguate between funcrefs that need to have their scope patched in V3Begin and those that don't.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Todd Strader (@toddstrader)
Original Date: 2015-11-18T01:03:58Z


I found some other issues that weren't previously addressed and have a patch ready here now:

https://github.com/toddstrader/verilator-dev/tree/issue1001.2

This doesn't address the function references, as that is not a straight forward copy of the VarXRef fix and I'm still trying to get my head around that one. However, I'd like to propose that this be pulled as-is. If that's acceptable, I'll open another issue to track the function issue. The rationale is that this patch currently gets us further into our codebases with Verilator and I'm trying to minimize the number of out-of-band patches we're juggling.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Todd Strader (@toddstrader)
Original Date: 2015-11-19T17:44:02Z


Wilson, please hold off on this pull request. There's some issue with arrayed interfaces when using this patch and Johan's issue 879 patch together. We'll sort it out and report back here.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-12-06T00:43:13Z


This branch was provided which also fixes #�.

https://github.com/toddstrader/verilator-dev/commits/issue1001.3

This is fixed in git towards 3.880. See some other notes in #�.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-12-19T15:32:47Z


In 3.880.

@veripoolbot veripoolbot added resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800 labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800
Projects
None yet
Development

No branches or pull requests

2 participants