Module Fixnum.Make

Parameters

module Spec : Spec

Signature

type t
val width : Base.int
val of_float : Base.float -> t
val to_float : t -> Base.float
val constb : t -> Base.string

const is used with Bits.constb and Signal.constb.

val of_bits : Hardcaml.Bits.t -> t
val to_bits : t -> Hardcaml.Bits.t
val pow2 : Base.int -> t
val to_scaled_int : t -> Base.int

to_scaled_int t = t * (2**fractional_width).

val bits_constf : Base.float -> Hardcaml.Bits.t
val signal_constf : Base.float -> Hardcaml.Signal.t