Skip to content

Add Signed/Unsigned datatypes #191

Description

@ktbarrett

These are inspired by VHDL's signed and unsigned datatypes, fixed arbitrary-sized integers with defined overflow semantics. It should act as a subtype of BitArray (itself a subtype of LogicArray). Meaning it should appear to functions as an Array<Bit> in addition to other operators.

Interface

It should expose arithmetic operations in addition to the bitwise logic operators:

  • +, -, / (truncating), *, %, >>, <<, unary +, unary -

It should be convertible as value to and from the following types:

  • C++ integer types
  • C++ float types
  • Sfixed
  • Ufixed
  • Float
  • each other

Implementation

It should use integers under the hood. An initial pass might just use 64-bit ints and limit the size < 64, but something like GMP arbitrary precision integers might be used in a future pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions