package hardcaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type comb = Signal.t
type t = comb t
val sexp_of_t : comb t -> Sexplib0.Sexp.t
val assert_widths : comb t -> Base.unit
val validate : comb t -> Base.unit
val of_int : Base.int -> comb t
val pack : ?rev:Base.bool -> comb t -> comb
val unpack : ?rev:Base.bool -> comb -> comb t
val mux : comb -> comb t Base.list -> comb t
val mux2 : comb -> comb t -> comb t -> comb t
val concat : comb t Base.list -> comb t
val priority_select_with_default : ((comb, comb t) Comb.with_valid2 Base.list -> default:comb t -> comb t) Comb.optional_branching_factor
val widths : t -> Base.int t
val of_ints : Base.int t -> t
val wires : ?named:Base.bool -> ?from:t -> Base.unit -> t
val reg : ?enable:Signal.t -> Reg_spec.t -> t -> t
val pipeline : ?attributes:Rtl_attribute.t Base.list -> ?enable:Signal.t -> n:Base.int -> Reg_spec.t -> t -> t
val assign : t -> t -> Base.unit
val (<==) : t -> t -> Base.unit
val inputs : Base.unit -> t
val outputs : t -> t
val apply_names : ?prefix:Base.string -> ?suffix:Base.string -> ?naming_op:(Signal.t -> Base.string -> Signal.t) -> t -> t
val (==:) : t -> t -> Signal.t

Tests for equality between two enums. For writing conditional statements based on the value of the enum, consider using match_ below, or Of_always.match_ instead

val of_enum : Cases.t -> Signal.t outer

Create an Cases value from a statically known value.

val of_raw : Signal.t -> Signal.t outer

Creates a Cases value from a raw value. Note that this only performs a check widths, and does not generate circuitry to validate that the input is valid. See documentation on Casess for more information.

val match_ : ?default:Signal.t -> Signal.t outer -> (Cases.t * Signal.t) Base.list -> Signal.t

Multiplex on an enum value. If there are unhandled cases, a default needs to be specified.

val is : t -> Cases.t -> Signal.t

Convenient wrapper around eq x (of_enum Foo)

OCaml

Innovation. Community. Security.