-
Notifications
You must be signed in to change notification settings - Fork 141
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-netlist] Refactor handling of variable references with selectors #826
Conversation
* master: [slang-netlist] Exclude unused modules from netlist (MikePopoloski#807) Fix spurious errors when constraining elaboration due to hitting error limits Add checking for recursive library maps and command file includes Support library map syntax trees being added to Compilations Support incdirs in library map directives Update CHANGELOG.md Tweak command line arg docs
* master: Bump version for v4.0 Remove done TODO
* master: (24 commits) Move SFormat to ast namespace Implement %t format specifier in constant eval Resolve TODO about dotted access of types Add test for interface-based typedefs New slang-tidy checks (MikePopoloski#816) Add Wsign-conversion Fixes for slang-tidy (MikePopoloski#814) Fix spurious errors reported when speculative eval of an expression subtree fails Fix clang sanitizer warnings Add ignore doc entry for unimplemented Wsign-conversion warning Fix counting of suppressed warnings-as-errors Fix crash when $static_assert condition is parenthesized Fix spurious error about multi-driven modport members when access through an interface array Suppress Wimplicit-conv for identical but otherwise non-matching structs Add Wconstant-conversion Refactor EvalContext to depend on an ASTContext member instead of taking it in various methods Handle modports in top-level interface port connections Add option to allow top-level modules to have interface ports Fix python bindings Additional test for interface array modport connections ...
Refactor expression Start adding logic for non-constant selects
* master: Fix inference of parameters from large based integer literals Fix Wvector-overflow to work correctly with signed literals Fix cases where constant conversions were not being checked due to missing tryEval calls
* master: Add checking for streaming operators that produce values larger than the maximum object size Type::getBitstreamWidth can now return a uint32_t, no possibility for overflow Rename bitstreamWidth -> getBitstreamWidth Enforce bitstream width limits for classes inside structs, unpacked arrays SmallVector.h: avoid casting away constness (MikePopoloski#821) Win32: add missing manifest to tool unittest executables Fix gcc + clang warnings chore: update pre-commit hooks (MikePopoloski#820) Tweak message for ObjectTooLarge diagnostic Error if a declared class type is too large Remove unreachable diagnostic path for bits of dynamic type Remove wchar special cases for Windows now that it can use UTF-8 as the active code page Win32: add a manifest to set the active code page to utf-8
Codecov Report
@@ Coverage Diff @@
## master #826 +/- ##
=======================================
Coverage 93.67% 93.68%
=======================================
Files 191 191
Lines 46248 46254 +6
=======================================
+ Hits 43323 43332 +9
+ Misses 2925 2922 -3
Continue to review full report in Codecov by Sentry.
|
Some of this logic seems to mirror what slang does for detecting overlapping / duplicate drivers of bits. I wonder if it could be refactored to make use of the existing logic (see the code in ValueSymbol.cpp / all of the longest static prefix stuff) which would let you get rid of a lot of this code. What you have here is fine though so I'm going to merge it. |
Thanks @MikePopoloski. I hadn't seen the similar code in |
This patch refactors slang-netlist's handling of variable references with selectors. This handling is used to determine if two distinct variable references have data dependencies. Previously, a simplistic scheme was used that only handled array element selects and struct member selects. The new scheme calculates the bit range for any combination of selectors by recursively inspecting the data types. One omission is that it does not (yet) handle descending ranges, eg
[0:3]
.Fixes #792.