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 : comb t -> Sexplib0.Sexp.t
Sourceval assert_widths : comb t -> Base.unit

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

Sourceval validate : comb t -> Base.unit

Checks the port widths of the signals in the interface. Raises if they mismatch.

Sourceval of_int : Base.int -> comb t

Each field is set to the constant integer value provided.

Sourceval pack : ?rev:Base.bool -> comb t -> comb

Pack interface into a vector.

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

Unpack interface from a vector.

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

Multiplex a list of interfaces.

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

Concatenate a list of interfaces.

Sourceval priority_select_with_default : ((comb, comb t) Comb.with_valid2 Base.list -> default:comb t -> comb t) Comb.optional_branching_factor
Sourceval widths : t -> Base.int t

Actual bit widths of each field.

Sourceval of_ints : Base.int t -> t

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

Sourceval wires : ?named:Base.bool -> ?from:t -> Base.unit -> 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 reg : ?enable:Signal.t -> Reg_spec.t -> t -> t

Defines a register over values in this interface. enable defaults to vdd.

Sourceval pipeline : ?attributes:Rtl_attribute.t Base.list -> ?enable:Signal.t -> n:Base.int -> Reg_spec.t -> t -> t

Defines a register pipeline over values in this interface. enable defaults to vdd and attributes defaults to an empty list.

Sourceval assign : t -> t -> Base.unit
Sourceval (<==) : t -> t -> Base.unit
Sourceval inputs : Base.unit -> 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 -> ?suffix:Base.string -> ?naming_op:(Signal.t -> Base.string -> Signal.t) -> t -> t

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

OCaml

Innovation. Community. Security.