Skip to content

Initial StateRegister implementation.#482

Open
fdxmw wants to merge 1 commit into
UCSBarchlab:developmentfrom
fdxmw:state
Open

Initial StateRegister implementation.#482
fdxmw wants to merge 1 commit into
UCSBarchlab:developmentfrom
fdxmw:state

Conversation

@fdxmw
Copy link
Copy Markdown
Member

@fdxmw fdxmw commented May 30, 2026

A StateRegister is just like a Register, except its bitwidth is defined by an IntEnum, and render_trace displays the IntEnum's name instead of its int value.

This also changes enum_name so it converts unknown int values to string with hex, instead of throwing a ValueError.

A `StateRegister` is just like a `Register`, except its bitwidth is defined by
an `IntEnum`, and `render_trace` displays the `IntEnum`'s name instead of its
`int` value.

This also changes `enum_name` so it converts unknown `int` values to string
with `hex`, instead of throwing a `ValueError`.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.9%. Comparing base (d116f66) to head (2ff6283).

Additional details and impacted files
@@              Coverage Diff              @@
##           development    #482     +/-   ##
=============================================
+ Coverage         91.9%   91.9%   +0.1%     
=============================================
  Files               30      30             
  Lines             7443    7456     +13     
=============================================
+ Hits              6837    6850     +13     
  Misses             606     606             

☔ View full report in Codecov by Sentry.
📢 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
Copy link
Copy Markdown
Member Author

fdxmw commented May 31, 2026

@timsherwood Thinking about this more, maybe this feature should be added to Register instead of defining a new subclass? Currently, the subclass doesn't seem to do enough to justify its existence.

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