Skip to content

Miscellaneous CompiledSimulation and Simulation cleanup, for 8% speedup (pyrtlnet CompiledSimulation startup)#497

Open
fdxmw wants to merge 3 commits into
UCSBarchlab:developmentfrom
fdxmw:cleanup
Open

Miscellaneous CompiledSimulation and Simulation cleanup, for 8% speedup (pyrtlnet CompiledSimulation startup)#497
fdxmw wants to merge 3 commits into
UCSBarchlab:developmentfrom
fdxmw:cleanup

Conversation

@fdxmw

@fdxmw fdxmw commented Jul 17, 2026

Copy link
Copy Markdown
Contributor
  • Refactor to remove redundant code.
  • Use f-strings instead of .format.
  • Use _limb_name (formerly _getarglimb) consistently.
  • Define a dataclass for _build_concat's pieces so the pieces have names.
  • Rename a lot of variables to improve readability.
  • Add comments, type annotations, and assertions.

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.46524% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.9%. Comparing base (baaf61f) to head (aa02467).

Files with missing lines Patch % Lines
pyrtl/compilesim.py 99.5% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           development    #497     +/-   ##
=============================================
+ Coverage         92.3%   93.9%   +1.6%     
=============================================
  Files               30      30             
  Lines             7488    7138    -350     
=============================================
- Hits              6905    6696    -209     
+ Misses             583     442    -141     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fdxmw

fdxmw commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

The coverage report shows that some pretty important lines of CompiledSimulation code are not covered by tests, mostly limb boundary checks. New tests that were meant to be added to this PR found a bug, and I believe I've fixed that bug in #498, so I'm planning to merge #498 first, then rebase this PR.

@fdxmw fdxmw changed the title Miscellaneous CompiledSimulation and Simulation cleanup, for 5% speedup (pyrtlnet CompiledSimulation startup) Miscellaneous CompiledSimulation and Simulation cleanup, for 8% speedup (pyrtlnet CompiledSimulation startup) Jul 21, 2026
fdxmw added 3 commits July 21, 2026 17:10
…peedup (pyrtlnet CompiledSimulation startup):

* Refactor to remove redundant code.
* Use f-strings instead of `.format`.
* Use `_limb_name` (formerly `_getarglimb`) consistently.
* Define a `dataclass` for `_build_concat`'s `pieces`.
* Define `dataclass`es for `Input` and `Output` metadata.
* Rename a lot of variables to improve readability.
* Add comments, type annotations, and assertions.
* Add tests.
* Remove legacy `omit` filename patterns.
* Ignore `PyrtlInternalError` and exception error messages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant