package hardcaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A custom combinational operation that can be inserted into a simulation.

A create_fn is required for Cyclesim.create_functional and a create_fn_mutable for Cyclesim.create_imperative. Only one needs to be provided and the other will be automatically derived. For efficiency's sake, prefer create_fn_mutable and Cyclsim.create_imperative.

type create_fn = Bits.t Hardcaml__.Import.List.t -> Bits.t Hardcaml__.Import.List.t

Implementation of the custom operation using Bits.t

type create_fn_mutable = Bits.Mutable.t Hardcaml__.Import.List.t -> Bits.Mutable.t Hardcaml__.Import.List.t -> Hardcaml__.Import.Unit.t

Implementation of the custom operation using Bits.Mutable.t

type t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val create : ?create_fn:create_fn -> ?create_fn_mutable:create_fn_mutable -> Hardcaml__.Import.Unit.t -> name:Hardcaml__.Import.String.t -> input_widths:Base.Int.t Hardcaml__.Import.List.t -> output_widths:Base.Int.t Hardcaml__.Import.List.t -> t

One must supply at least one of create_fn and create_fn_mutable.

val name : t -> Hardcaml__.Import.String.t
val create_fn : t -> create_fn
val create_fn_mutable : t -> create_fn_mutable
val instantiate : t -> inputs:Signal.t Hardcaml__.Import.List.t -> Signal.t Hardcaml__.Import.List.t

Instantiate a custom operation within a hardcaml design.

OCaml

Innovation. Community. Security.