Module Hardcaml__.Circuit
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
type 'a with_create_options= ?detect_combinational_loops:Hardcaml__.Import.bool -> ?normalize_uids:Hardcaml__.Import.bool -> 'awith_create_optionsspecifies the optional arguments that can be supplied tocreate_exn.detect_combinational_loopsdetermines whethercreate_exnensures that there is no path from a signal to itself that does not pass through a register or memory.normalize_uidsdetermines whethercreate_exnrenumbers the uids of all signals in the circuit starting at one. Uid normalization ensures that circuits will print the same (as sexps or rtl) regardless of the environment in which they are constructed (in particular with regard to the global uid generator).
val create_exn : (name:Hardcaml__.Import.string -> Hardcaml.Signal.t Hardcaml__.Import.list -> t) with_create_optionscreate circuit data structure
val inputs : t -> Hardcaml.Signal.t Hardcaml__.Import.listreturn circuit inputs
val outputs : t -> Hardcaml.Signal.t Hardcaml__.Import.listreturn circuit outputs
val signal_graph : t -> Hardcaml.Signal_graph.tval name : t -> Hardcaml__.Import.stringreturn circuit name
val with_name : t -> name:Hardcaml__.Import.string -> tReturn identical circuit except for the name.
val is_input : t -> Hardcaml.Signal.t -> Hardcaml__.Import.boolis the signal an input to the circuit
val is_output : t -> Hardcaml.Signal.t -> Hardcaml__.Import.boolis the signal an output of the circuit
val find_signal_exn : t -> Hardcaml.Signal.Uid.t -> Hardcaml.Signal.tval set_phantom_inputs : t -> (Hardcaml__.Import.string * Hardcaml__.Import.int) Hardcaml__.Import.list -> tFor internal use. Add phantom input ports to the circuit when writing RTL. This can be necessary to ensure
Interfacebased input specifications match those discovered when traversing the hardware design from its outputs. It is especially important when working with hierarchical designs.
val phantom_inputs : t -> (Hardcaml__.Import.string * Hardcaml__.Import.int) Hardcaml__.Import.list
module Signal_map : sig ... endMap of
uids toSignal.ts.
val signal_map : t -> Signal_map.tGet map of
uids toSignal.ts.
val fan_out_map : t -> Hardcaml.Signal.Uid_set.t Hardcaml.Signal.Uid_map.tCompute and return a
Fan_out_map.t. The computation is lazy and only performed the first timefan_out_mapis called.
val fan_in_map : t -> Hardcaml.Signal.Uid_set.t Hardcaml.Signal.Uid_map.tCompute and return a
Fan_in_map.t. The computation is lazy and only performed the first timefan_in_mapis called.
val structural_compare : ?check_names:Hardcaml__.Import.bool -> t -> t -> Hardcaml__.Import.boolcompare 2 circuits to see if they are the same
module Create_options : sig ... endCreate_optionsis a record with one field for eachwith_create_optionsargument. It allows one to define a function of type_ with_create_optionsthat takes the same optional arguments ascreate_exnand to pass those options on tocreate_exn, without every having to directly refer to any of the arguments. This makes wrapper code robust to changes in what the optional arguments are. Here is the usage idiom:
val with_create_options : (Create_options.t -> 'a) -> 'a with_create_optionsval call_with_create_options : 'a with_create_options -> Create_options.t -> 'a
module Port_checks : sig ... endCheck if the ports specified in the interface match those defined in the circuit.
module With_interface : functor (I : Hardcaml.Interface.S) -> functor (O : Hardcaml.Interface.S) -> sig ... end