UCSBarchlab / PyRTL

A collection of classes providing simple hardware specification, simulation, tracing, and testing suitable for teaching and research. Simplicity, usability, clarity, and extensibility are the overarching goals, rather than performance or optimization.
http://ucsbarchlab.github.io/PyRTL
BSD 3-Clause "New" or "Revised" License
253 stars 76 forks source link

Add print_perf_counters(), which prints the number of cycles where selected trace values are one. #432

Closed fdxmw closed 1 year ago

fdxmw commented 1 year ago

This is useful for counting the number of times important events occur during a simulation, such as cache misses and branch mispredictions.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 90.90% and project coverage change: +0.01% :tada:

Comparison is base (90646ed) 90.91% compared to head (e335e10) 90.93%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## development #432 +/- ## =============================================== + Coverage 90.91% 90.93% +0.01% =============================================== Files 24 24 Lines 6154 6165 +11 =============================================== + Hits 5595 5606 +11 Misses 559 559 ``` | [Files Changed](https://app.codecov.io/gh/UCSBarchlab/PyRTL/pull/432?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=UCSBarchlab) | Coverage Δ | | |---|---|---| | [pyrtl/simulation.py](https://app.codecov.io/gh/UCSBarchlab/PyRTL/pull/432?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=UCSBarchlab#diff-cHlydGwvc2ltdWxhdGlvbi5weQ==) | `92.71% <90.90%> (-0.04%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/UCSBarchlab/PyRTL/pull/432/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=UCSBarchlab)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.