-
Notifications
You must be signed in to change notification settings - Fork 124
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
[slang] Fix PATHPULSE limit values #1048
[slang] Fix PATHPULSE limit values #1048
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1048 +/- ##
=======================================
Coverage 94.71% 94.71%
=======================================
Files 191 191
Lines 47656 47662 +6
=======================================
+ Hits 45136 45142 +6
Misses 2520 2520
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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.
Huh, not sure why I added this but it looks like you're correct.
source/parsing/Parser_members.cpp
Outdated
@@ -3227,7 +3227,7 @@ SpecparamDeclaratorSyntax& Parser::parseSpecparamDeclarator(SyntaxKind parentKin | |||
if (parentKind != SyntaxKind::SpecifyBlock) | |||
addDiag(diag::PulseControlSpecifyParent, name.range()); | |||
else if (!expr2) | |||
addDiag(diag::PulseControlTwoValues, expr1.sourceRange()) << name.range(); | |||
expr2 = &expr1; |
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.
This should not duplicate the expression here -- leaving it null seems fine. The parse tree must maintain the property that visiting the tokens in it via depth-first traversal recovers the original source file as typed by the user.
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.
fixed in last commit with simple code refactoring
…dev/slang-tidy * 'master' of https://github.com/MikePopoloski/slang: Update CHANGELOG.md [slang] Fix PLA task concatenation ascending order (MikePopoloski#1047) [slang] Fix PATHPULSE limit values (MikePopoloski#1048) Handle recursive parameter definitions via hierarchical reference Mark fmt lib headers as system headers to suppress warnings Bump dependency versions: fmt and pybind11 [slang] Make string simple type (MikePopoloski#1049) Update README.md (MikePopoloski#1046) [slang][port] Fix bugs (MikePopoloski#1043) Use [[likely]] / [[unlikely]] replace macro SLANG_LIKELY/SLANG_UNLIKELY (MikePopoloski#1038) Add multiple slang-tidy checks and minor fixes in existing ones (MikePopoloski#1040) chore: update pre-commit hooks (MikePopoloski#1041)
…dev/slang-tidy * 'master' of https://github.com/MikePopoloski/slang: Fix a bug in the tidy-check UnusedSensitiveSignal (MikePopoloski#1056) Update CHANGELOG.md [slang] Fix PLA task concatenation ascending order (MikePopoloski#1047) [slang] Fix PATHPULSE limit values (MikePopoloski#1048) Handle recursive parameter definitions via hierarchical reference Mark fmt lib headers as system headers to suppress warnings Bump dependency versions: fmt and pybind11 [slang] Make string simple type (MikePopoloski#1049) Update README.md (MikePopoloski#1046) [slang][port] Fix bugs (MikePopoloski#1043) Use [[likely]] / [[unlikely]] replace macro SLANG_LIKELY/SLANG_UNLIKELY (MikePopoloski#1038) Add multiple slang-tidy checks and minor fixes in existing ones (MikePopoloski#1040) chore: update pre-commit hooks (MikePopoloski#1041)
In order to
SystemVerilog
LRM grammar it is legal to specialize only 1 value for bothPATHPULSE$
reject and error limits.According to 30.7.1 section:
At the text below LRM says:
"The path (data=>q) is not explicitly defined in any of the PATHPULSE$ declarations; therefore, it acquires reject and error limit of 3, as defined by the last PATHPULSE$ declaration." for such example: