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

LegalizeValue can quickly exhaust available RAM #259

Closed
rroohhh opened this issue Oct 26, 2019 · 4 comments
Closed

LegalizeValue can quickly exhaust available RAM #259

rroohhh opened this issue Oct 26, 2019 · 4 comments

Comments

@rroohhh
Copy link
Contributor

rroohhh commented Oct 26, 2019

Due to a typo I had something like this

addr = Signal(32)
self.mem.bit_select(addr[2:], 1)

which upon conversion to verilog quickly exhausted all my available RAM.

Maybe it is possible to emit a warning when the number of possible values in LegalizeValue is huge?

@whitequark
Copy link
Contributor

How large is self.mem?

@rroohhh
Copy link
Contributor Author

rroohhh commented Oct 26, 2019

In this case 8 bits.

@whitequark
Copy link
Contributor

Then by definition the backend should not ever legalize to more than 8 branches.

@rroohhh
Copy link
Contributor Author

rroohhh commented Oct 26, 2019

Yeah, true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants