treewide: Optimizations for faster Verilator simulation#259
Merged
phsauter merged 4 commits intopulp-platform:masterfrom Aug 18, 2025
Merged
treewide: Optimizations for faster Verilator simulation#259phsauter merged 4 commits intopulp-platform:masterfrom
phsauter merged 4 commits intopulp-platform:masterfrom
Conversation
This enables Verilator optimizations as it now understands there are no combinatorial loops. For the Cheshire SoC, this can reduce simulation time by around 3%.
This enables Verilator optimizations as it now understands there are no combinatorial loops. For the Cheshire SoC, this can reduce simulation time by around 2.5%.
In case the vector is not flipped, using a direct assignment can lead to an approximately 2% decrease in total system simulation time (measured using the Cheshire SoC).
This decreases total simulation time of the Cheshire SoC by around 1.8%.
Collaborator
|
Everything looks good. The cb_filter is equivalent in all legal cases. Note: I think the lzc implementation should be optimized further but this is not part of this PR. |
Scheremo
pushed a commit
to mosaic-soc/common_cells
that referenced
this pull request
Sep 12, 2025
…m#259) * rr_arb_tree: Add Verilator pragmas to split tree node signals This enables Verilator optimizations as it now understands there are no combinatorial loops. For the Cheshire SoC, this can reduce simulation time by around 3%. * lzc: Add Verilator pragmas to split tree node signals This enables Verilator optimizations as it now understands there are no combinatorial loops. For the Cheshire SoC, this can reduce simulation time by around 2.5%. * lzc: Optimize reversing of input vector for Verilator speedup In case the vector is not flipped, using a direct assignment can lead to an approximately 2% decrease in total system simulation time (measured using the Cheshire SoC). * cb_filter: Logic simplification for Verilator speed-up This decreases total simulation time of the Cheshire SoC by around 1.8%.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
These modification are intended to generate better code for Verilator simulation without changing functional behavior.
Using the Cheshire SoC (pulp-platform/cheshire#230), these changes reduce total simulation time by around 8%.