Module Bits.UnsignedSource

Unsigned vector operations (ie may operate on Bits.t or Signal.t directly).

Sourceval (+:) : t -> t -> t

Addition. Arguments are extended appropriately and result is 1 bit wider to avoid truncation.

Sourceval (-:) : t -> t -> t

Subtraction. Arguments are extended appropriately and result is 1 bit wider to avoid truncation.

Sourceval (*:) : t -> t -> t

Multiplication.

Comparison operations

Arguments need not be the same width.

Sourceval (<:) : t -> t -> t
Sourceval (>:) : t -> t -> t
Sourceval (<=:) : t -> t -> t
Sourceval (>=:) : t -> t -> t
Sourceval (==:) : t -> t -> t
Sourceval (<>:) : t -> t -> t
Sourceval resize : t -> int -> t

Resize argument to given width. Appropriate extension is performed.

Sourceval truncate : t -> width:int -> (t, t) Hardcaml_kernel__.Comb_intf.with_valid2

Reduce the width of t to width bits. The result is valid if the value fits within width bits.