package hardcaml

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

Module O.Of_signalSource

include Comb with type comb = Signal.t
Sourcetype comb = Signal.t
Sourcetype t = comb t
Sourceval sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
Sourceval widths : t -> Base.Int.t t

Actual bit widths of each field.

Sourceval assert_widths : t -> Base.Unit.t

Raise if the widths of t do not match those specified in the interface.

Sourceval of_int : Base.Int.t -> t

Each field is set to the constant integer value provided.

Sourceval of_ints : Base.Int.t t -> t

consts c sets each field to the integer value in c using the declared field bit width.

Sourceval const : Base.Int.t -> t
  • deprecated [since 2019-11] interface const
Sourceval consts : Base.Int.t t -> t
  • deprecated [since 2019-11] interface consts
Sourceval pack : ?rev:Base.Bool.t -> t -> comb

Pack interface into a vector.

Sourceval unpack : ?rev:Base.Bool.t -> comb -> t

Unpack interface from a vector.

Sourceval mux : comb -> t Base.List.t -> t

Multiplex a list of interfaces.

Sourceval mux2 : comb -> t -> t -> t
Sourceval concat : t Base.List.t -> t

Concatenate a list of interfaces.

Sourceval priority_select_with_default : ((comb, t) With_valid.t2 Base.List.t -> default:t -> t) Comb.optional_branching_factor
Sourceval wires : ?named:Base.Bool.t -> ?from:t -> Base.Unit.t -> t

Create a wire for each field. If named is true then wires are given the RTL field name. If from is provided the wire is attached to each given field in from.

Sourceval assign : t -> t -> Base.Unit.t
Sourceval (<==) : t -> t -> Base.Unit.t
Sourceval inputs : Base.Unit.t -> t

inputs t is wires () ~named:true.

Sourceval outputs : t -> t

outputs t is wires () ~from:t ~named:true.

Sourceval apply_names : ?prefix:Base.String.t -> ?suffix:Base.String.t -> ?naming_op:(comb -> Base.String.t -> comb) -> t -> t

Apply name to field of the interface. Add prefix and suffix if specified.

OCaml

Innovation. Community. Security.