Hardcaml.Circuit
Creation and manipulation of hardware circuits
val sexp_of_t : t -> Sexplib0.Sexp.t
module Port_checks : sig ... end
Check if the ports specified in the interface match those defined in the circuit.
module Config : sig ... end
create circuit data structure
val signal_graph : t -> Signal_graph.t
val name : t -> Base.string
return circuit name
val find_signal_exn : t -> Signal.Uid.t -> Signal.t
For internal use. Add phantom input ports to the circuit when writing RTL. This can be necessary to ensure Interface
based 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 -> (Base.string * Base.int) Base.list
module Signal_map : sig ... end
Map of uid
s to Signal.t
s.
val signal_map : t -> Signal_map.t
Get map of uid
s to Signal.t
s.
val fan_out_map : t -> Signal.Uid_set.t Signal.Uid_map.t
Compute and return a Fan_out_map.t
. The computation is lazy and only performed the first time fan_out_map
is called.
val fan_in_map : t -> Signal.Uid_set.t Signal.Uid_map.t
Compute and return a Fan_in_map.t
. The computation is lazy and only performed the first time fan_in_map
is called.
compare 2 circuits to see if they are the same
val instantiations : t -> Signal.instantiation Base.list
returns the list of instantiations in this circuit
val create_with_interface :
(module Interface.S_Of_signal with type Of_signal.t = 'i) ->
(module Interface.S_Of_signal with type Of_signal.t = 'o) ->
?config:Config.t ->
name:Base.string ->
( 'i -> 'o ) ->
t
module With_interface (I : Interface.S) (O : Interface.S) : sig ... end