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

Remove unneeded exception in memory.py #463

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

gaborszita
Copy link
Contributor

Closes #460

The call to as_wires is needed in _assignment, tests fail without that.

@gaborszita gaborszita changed the title Remove unneeded exception from memory.py Remove unneeded exception in memory.py Jan 18, 2025
Copy link

codecov bot commented Jan 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.7%. Comparing base (5077c24) to head (00af73d).

Additional details and impacted files
@@              Coverage Diff              @@
##           development    #463     +/-   ##
=============================================
+ Coverage         91.7%   91.7%   +0.1%     
=============================================
  Files               24      24             
  Lines             6403    6410      +7     
=============================================
+ Hits              5866    5877     +11     
+ Misses             537     533      -4     

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

if len(item) > self.addrwidth:
raise PyrtlError('error, the wire indexing the memory bitwidth > addrwidth')
addr = item
addr = as_wires(item, bitwidth=self.addrwidth, truncating=False)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to call as_wires here? It seems like that already happens in __getitem__. If this is needed, consider adding a comment explaining why, otherwise we can remove it?

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.

Potential unneeded exception
2 participants