Module Bits.Mutable

Mutable is a mutable bits used by Cyclesim for efficiency.

type bits
type t
val empty : t
val width : t -> Hardcaml__.Import.int
val to_string : t -> Hardcaml__.Import.string
val create : Hardcaml__.Import.int -> t

Create a t of given width, initially set to 0.

val copy : src:t -> dst:t -> Hardcaml__.Import.unit
val copy_bits : src:bits -> dst:t -> Hardcaml__.Import.unit
val num_words : t -> Hardcaml__.Import.int

A Bits.Mutable.t can be accessed as an array of 64 bit words.

val get_word : t -> Hardcaml__.Import.int -> Hardcaml__.Import.int64
val set_word : t -> Hardcaml__.Import.int -> Hardcaml__.Import.int64 -> Hardcaml__.Import.unit
val to_bits : t -> bits
val of_constant : Hardcaml.Constant.t -> t
val to_constant : t -> Hardcaml.Constant.t
val vdd : t
val gnd : t
val wire : Hardcaml__.Import.int -> t
val (--) : t -> Hardcaml__.Import.string -> t
val (&:) : t -> t -> t -> Hardcaml__.Import.unit
val (|:) : t -> t -> t -> Hardcaml__.Import.unit
val (^:) : t -> t -> t -> Hardcaml__.Import.unit
val (~:) : t -> t -> Hardcaml__.Import.unit
val (+:) : t -> t -> t -> Hardcaml__.Import.unit
val (-:) : t -> t -> t -> Hardcaml__.Import.unit
val (==:) : t -> t -> t -> Hardcaml__.Import.unit
val (<>:) : t -> t -> t -> Hardcaml__.Import.unit
val (<:) : t -> t -> t -> Hardcaml__.Import.unit
val mux : t -> t -> t Hardcaml__.Import.list -> Hardcaml__.Import.unit
val concat : t -> t Hardcaml__.Import.list -> Hardcaml__.Import.unit
val select : t -> t -> Hardcaml__.Import.int -> Hardcaml__.Import.int -> Hardcaml__.Import.unit
val (*:) : t -> t -> t -> Hardcaml__.Import.unit
val (*+) : t -> t -> t -> Hardcaml__.Import.unit
module Comb : Hardcaml.Comb.S with type t = t