forked from parallaxsw/OpenSTA
-
Notifications
You must be signed in to change notification settings - Fork 5
feat: sdc collections #37
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # further run memory leak checks with valgrind | ||
| FROM sta-ubuntu-22.04 | ||
|
|
||
| RUN apt-get install -y valgrind | ||
|
|
||
| RUN cd /OpenSTA &&\ | ||
| rm -rf build &&\ | ||
| mkdir build &&\ | ||
| cd build &&\ | ||
| cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS='-O0' -DCUDD_DIR=../cudd-3.0.0 .. && \ | ||
| make -j`nproc` VERBOSE=1 | ||
|
|
||
| RUN cd /OpenSTA/test &&\ | ||
| ./regression -valgrind -j`nproc`&&\ | ||
| ./regression -valgrind -collections -j`nproc` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| // OpenSTA, Static Timing Analyzer | ||
| // Copyright (c) 2025, Parallax Software, Inc. | ||
| // | ||
| // This program is free software: you can redistribute it and/or modify | ||
| // it under the terms of the GNU General Public License as published by | ||
| // the Free Software Foundation, either version 3 of the License, or | ||
| // (at your option) any later version. | ||
| // | ||
| // This program is distributed in the hope that it will be useful, | ||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| // GNU General Public License for more details. | ||
| // | ||
| // You should have received a copy of the GNU General Public License | ||
| // along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
| // | ||
| // The origin of this software must not be misrepresented; you must not | ||
| // claim that you wrote the original software. | ||
| // | ||
| // Altered source versions must be plainly marked as such, and must not be | ||
| // misrepresented as being the original software. | ||
| // | ||
| // This notice may not be removed or altered from any source distribution. | ||
|
|
||
| #pragma once | ||
|
|
||
| #include "PatternMatch.hh" | ||
| #include "FilterExpr.hh" | ||
| #include <functional> | ||
|
|
||
|
|
||
| template <class SEQ_TYPE, class OBJECT_TYPE, int ERROR_CODE, const char * OBJECT_TYPE_NAME> | ||
| SEQ_TYPE * | ||
| find_objects_complete(SEQ_TYPE *collection, | ||
| StringSeq *patterns, | ||
| bool regexp, | ||
| bool nocase, | ||
| bool quiet, | ||
| const char *filter_expression, | ||
| std::function<SEQ_TYPE(PatternMatch *)> get_pattern) | ||
| { | ||
| collection = collection ? new SEQ_TYPE(*collection) : new SEQ_TYPE(); | ||
| auto sta = Sta::sta(); | ||
| for (const char *pattern: *patterns) { | ||
| PatternMatch matcher(pattern, regexp, nocase, sta->tclInterp()); | ||
| auto result = get_pattern(&matcher); | ||
| if (result.size() == 0) { | ||
| if (!quiet) | ||
| sta->report()->warn(ERROR_CODE, "%s '%s' not found.", OBJECT_TYPE_NAME, pattern); | ||
| } else { | ||
| auto entries = collection->size(); | ||
| collection->resize(entries + result.size()); | ||
| std::move( | ||
| result.begin(), | ||
| result.end(), | ||
| collection->begin() + entries | ||
| ); | ||
| } | ||
| } | ||
| if (filter_expression != nullptr) { | ||
| auto filtered = filter_objects<OBJECT_TYPE>(filter_expression, collection, sta->booleanPropsAsInt()); | ||
| delete collection; | ||
| collection = new SEQ_TYPE(filtered); | ||
| } | ||
| return collection; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.