Module Hardcaml.Recipe
Hardware generation in an imperative style.
This module is undergoing significant rewriting and refactoring, and subject to many breaking changes.
include Hardcaml__.Import.Monad.S with type 'a t := 'a t
include Base__.Monad_intf.S_without_syntax with type 'a t := 'a t
module Monad_infix : Base__.Monad_intf.Infix with type 'a t := 'a t- val return : 'a -> 'a t
- return vreturns the (trivial) computation that returns v.
- val skip : Hardcaml__.Import.unit t
- skip 1 cycle 
- val wait : Hardcaml__.Import.int -> Hardcaml__.Import.unit t
- skip n cycles 
- val par : ?comb_fin:Hardcaml__.Import.bool -> 'a t Hardcaml__.Import.list -> 'a Hardcaml__.Import.list t
- Perform ts in parallel. - comb_fincontrols the finish signal generation. When false and extra cycle is taken after the ts complete to generate the- finsignal. Otherwise extra combinatorial logic is generated to ensure the- finsignal toggles on the same cycle as the last t to complete.
- val par2 : ?comb_fin:Hardcaml__.Import.bool -> 'a t -> 'b t -> ('a * 'b) t
- val (|||) : 'a t -> 'b t -> ('a * 'b) t
- val cond : Signal.t -> 'a t -> 'b t -> Hardcaml__.Import.unit t
- cond c t fperforms- tif- cis high, otherwise performs- f
- val wait_while : Signal.t -> Hardcaml__.Import.unit t
- wait until - tis low
- val wait_until : Signal.t -> Hardcaml__.Import.unit t
- wait until - tis high
- val follow : clock:Signal.t -> enable:Signal.t -> Signal.t -> 'a t -> Signal.t * 'a
- follow t and get result 
- val new_var : ?name:Hardcaml__.Import.string -> Hardcaml__.Import.int -> var t
- create an new - nbit register
- val assign : (var * Signal.t) Hardcaml__.Import.list -> Hardcaml__.Import.unit t
- assign list of registers - takes 1 cycle 
- val write_var : var -> Signal.t -> Hardcaml__.Import.unit t
- write register with value 
- val modify_var : (Signal.t -> Signal.t) -> var -> Hardcaml__.Import.unit t
- modify current value of resgiter 
- val rewrite_var : (Signal.t -> Signal.t) -> var -> var -> Hardcaml__.Import.unit t
- read a register, modify value, write a second register 
module SList : Same with type 'a same = 'a Hardcaml__.Import.listmodule SArray : Same with type 'a same = 'a Hardcaml__.Import.array