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 Base.List.t -> Bits.t Base.List.t

Implementation of the custom operation using Bits.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 -> Base.Unit.t -> name:Base.String.t -> input_widths:Base.Int.t Base.List.t -> output_widths:Base.Int.t Base.List.t -> t

One must supply at least one of create_fn and create_fn_mutable.

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

Instantiate a custom operation within a hardcaml design.