Skip to content

Do something about assign and general ApInt construction #44

@AaronKutch

Description

@AaronKutch

Here is a brief compilation of problems I have seen:

  • perhaps assign should be what strict_assign is
  • I have never used assign or strict_assign and Robbepop dislikes the API
  • It is extremely painful to construct ApInts from a bit slice of another ApInt (with current functions, I have to do cloning, shifting, truncating, extending, and sometimes another shifting)
  • Often, inplace binary ops with one immutable and one mutable ApInt is all that is needed, but sometimes there is a need for two immutable inputs and a mutable output. However, we really do not want to greatly multiply the number of functions. At most, we should add the classical 2 input, 1 output functions to ApInts only.
  • Inplace ops are great for nearly 100% of use case operations involving carries, but commonly in bitwise ops we want to perform operations between specific bit slices and output that to a bit slice of a third ApInt.
  • Sometimes, we want to do bitwise ops between bit slices of the same ApInt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions