Hardcaml.Structural
Hardware generation API that includes tri-states - used for toplevel module generation.
The API is very similar to Signal
except for instantiation which is done differently.
type signal =
| Empty | |
| Module_input of id * name * width | |
| Module_output of id * name * width * signal Stdlib.ref | |
| Module_tristate of id * name * width * signal list Stdlib.ref | |
| Internal_wire of id * width * signal Stdlib.ref | |
| Internal_triwire of id * width * signal list Stdlib.ref | |
| Instantiation_output of id * name | (* reference to instantiation *) |
| Instantiation_tristate of id * name | |
| Instantiation of id
* name
* (string * generic) list
* (string * signal) list
* (string * signal) list
* (string * signal) list | |
| Rtl_op of id * width * rtl_op |
exception Invalid_submodule_input_connection of string * string * signal
exception Invalid_submodule_output_connection of string * string * signal
exception Invalid_submodule_tristate_connection of string * string * signal
exception Wire_already_assigned of signal
exception Invalid_assignment_target of signal
exception Cant_assign_wire_with of signal
exception Cant_assign_triwire_with of signal
exception Invalid_name of signal
exception Invalid_width of signal
exception Invalid_id of signal
exception Rtl_op_arg_not_readable of signal
val find_circuit : string -> circuit
find circuit in database
val width : signal -> int
val mk_input : string -> int -> signal
val mk_output : string -> int -> signal
val mk_tristate : string -> int -> signal
val mk_wire : int -> signal
val mk_triwire : int -> signal
val is_connected : signal -> bool
val of_bit_string : string -> signal
val z : int -> signal
module type Config = sig ... end
the comb API must be (rebuilt) between each circuit
module Base0 : Comb.Primitives with type t = signal
progressively more structural APIs
module Base1 : Comb.Primitives with type t = signal
includes mux, concat, select
module Base2 : Comb.Primitives with type t = signal
includes consts
val write_verilog : ( string -> unit ) -> circuit -> unit
module Lib : sig ... end