Skip to content
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

Assorted render_trace fixes and improvements: #440

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

fdxmw
Copy link
Contributor

@fdxmw fdxmw commented Mar 21, 2024

  • Add an enum_name utility to convert enum values to their names. Python 3.11 changed the behavior of IntEnum.__str__ to return the enum value rather than the enum name (https://docs.python.org/3/library/enum.html#enum.IntEnum), so enum_name makes it easier to see the names.
  • Update state machine example to display state names with enum_name.
  • Fix a bug in render_trace's ruler rendering, where cycle numbers were not truncated appropriately when the cycle number is too long. Add a test.
  • Display more cycles in the renderer demo.

@codecov-commenter
Copy link

codecov-commenter commented Mar 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.31%. Comparing base (401ab37) to head (267c317).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@               Coverage Diff               @@
##           development     #440      +/-   ##
===============================================
+ Coverage        91.29%   91.31%   +0.02%     
===============================================
  Files               24       24              
  Lines             6351     6357       +6     
===============================================
+ Hits              5798     5805       +7     
+ Misses             553      552       -1     

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

- Add an `enum_name` utility to convert enum values to their names. Python 3.11
  changed the behavior of `IntEnum.__str__` to return the enum value rather than
  the enum name (https://docs.python.org/3/library/enum.html#enum.IntEnum), so
  `enum_name` makes it easier to see the names.
- Update state machine example to display state names with enum_name.
- Fix a bug in `render_trace`'s ruler rendering, where cycle numbers were not
  truncated appropriately when the cycle number is too long. Add a test.
- Display more cycles in the renderer demo. Reduce segment_size in several
  examples.
- introduction-to-hardware: Run for more cycles to make it clearer that it is
  computing the Fibonacci sequence, and not just counting. Drop `n_in` to zero
  after the first cycle to clarify that it is only used when `req_in` is high.
  Display `i` to show some internals of the computation.
@fdxmw fdxmw merged commit c9c763c into UCSBarchlab:development Mar 22, 2024
2 checks passed
@fdxmw fdxmw deleted the enum_name branch March 22, 2024 22:39
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.

2 participants