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

Add a bitcast primitive to match CIRCT's firrtl.bitcast ? #133

Open
smarter opened this issue Oct 18, 2023 · 2 comments
Open

Add a bitcast primitive to match CIRCT's firrtl.bitcast ? #133

smarter opened this issue Oct 18, 2023 · 2 comments

Comments

@smarter
Copy link
Contributor

smarter commented Oct 18, 2023

https://github.com/llvm/circt/blob/main/docs/Dialects/FIRRTL/RationaleFIRRTL.md#firrtlbitcast seems like a generally useful thing, but there doesn't appear to be a corresponding primitive operation that could be called from a .fir file, would it make sense to add it to the spec (and FIRParser) ?

@seldridge
Copy link
Member

@darthscsi or @dtzSiFive, WDYT?

@darthscsi
Copy link
Collaborator

I was working with a user who was converting vectors around and realized that there was no bitcast available. It is probably useful. It requires positions on bit and field orderings. It also has to be extremely clear it is not making some aliasing reinterpretation of it's arguments (e.g. can't be used on the lhs of a connect).

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

No branches or pull requests

3 participants