-
Notifications
You must be signed in to change notification settings - Fork 713
Intermediate variables for system calls during expression coverage #6592
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
base: master
Are you sure you want to change the base?
Conversation
After V3Width all of the system call expressions have proper dtypep()'s, so I'm not understanding the issue is knowing the return types. It's true there's no current way to know what was a system call, you could add a AstNode virtual method to determine that. |
|
Yeah, I'm sure I just didn't look hard enough for the dtype. An AstNode parent would probably be cleaner than my other idea. I can give that a shot. |
|
We can't have a common AstNode parent as some are AstNodeBiOps or otherwise, you need a virtual method. |
|
Oh sorry, I misunderstood. Thanks for the clarification. |
|
I have something ready for this now but it depends on #6589. I'll update once that lands. |
56e3422 to
fddbe9a
Compare
|
@wsnyder I think this one should be good to go now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How was the list of Ast's getting isSystemFunc determined, e.g. why no AstFOpen?
Grepping around, cross-referencing the LRM and a little bit of Claude. That one should definitely be on the list. I'll do another pass. I couldn't find a simple list of system functions as opposed to tasks. The lists in |
4253b6b to
6ee5540
Compare
|
All I can suggest is look at the system function list in verilog.y/verilog.l. |
|
Yeah, for better or worse those files also combine tasks and functions. I went through |
|
Thanks, ideally we'd get code coverage on all of these new functions so we have a chance at correctness, but I can appreciate that might be too much work and am willing to waive it. |
|
Taking a look at a quick and dirty test to exercise more of these methods. But I'm not getting expression coverage for: where |
6ee5540 to
3f6088a
Compare
Re: #6589 / #6135
Assigning function call results to intermediate variables when used for expression coverage means that we don't care if functions are pure or not from the perspective of expression coverage. Functions will get called the same number of times so expression coverage won't perturb state when impure functions come into play. And we'll record the results for use in calculating expression coverage.
The problem is that system functions calls are not
FuncRefs. So as I see it there are two choices:isPure(bool verilogOnly = false)thing I mentioned in Intermediate variables for function calls + expression coverage #6589 .I think I'll try number two when I can pick this up again next week. But please let me know if there are other options I should consider.