package hardcaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type var
type inp
type env
type 'a recipe
module Monad : sig ... end
val skip : Base.Unit.t recipe

skip 1 cycle

skip n cycles

val par : ?comb_fin:Base.Bool.t -> 'a recipe Base.List.t -> 'a Base.List.t recipe

Perform recipes in parallel. comb_fin controls the finish signal generation. When false and extra cycle is taken after the recipes complete to generate the fin signal. Otherwise extra combinatorial logic is generated to ensure the fin signal toggles on the same cycle as the last recipe to complete.

val par2 : ?comb_fin:Base.Bool.t -> 'a recipe -> 'b recipe -> ('a * 'b) recipe
val (|||) : 'a recipe -> 'b recipe -> ('a * 'b) recipe
val cond : Signal.t -> 'a recipe -> 'b recipe -> Base.Unit.t recipe

cond c t f performs t if c is high, otherwise performs f

val iter : Signal.t -> 'a recipe -> 'a recipe

iter c t perform t while c is high

val forever : 'a recipe -> 'a recipe

perform recipe forever

val waitWhile : Signal.t -> Base.Unit.t recipe

wait until t is low

val waitUntil : Signal.t -> Base.Unit.t recipe

wait until t is high

val follow : Signal.t -> 'a recipe -> Signal.t * 'a

follow recipe and get result

val newVar : ?name:Base.String.t -> Base.Int.t -> var recipe

create an new n bit register

val readVar : var -> Signal.t recipe

read value of register

assign list of registers - takes 1 cycle

val writeVar : var -> Signal.t -> Base.Unit.t recipe

write register with value

val modifyVar : (Signal.t -> Signal.t) -> var -> Base.Unit.t recipe

modify current value of resgiter

val rewriteVar : (Signal.t -> Signal.t) -> var -> var -> Base.Unit.t recipe

read a register, modify value, write a second register

module type Same = sig ... end
module Same (X : Interface.Pre) : Same with type 'a same = 'a X.t
module SVar : Same with type 'a same = 'a
module SList : Same with type 'a same = 'a Base.List.t
module SArray : Same with type 'a same = 'a Base.Array.t
module STuple2 : Same with type 'a same = 'a * 'a
module STuple3 : Same with type 'a same = 'a * 'a * 'a
OCaml

Innovation. Community. Security.