Legend:
Library
Module
Module type
Parameter
Class
Class type
A Signal_graph.t is a created from a list of signals, and defined by tracing back to inputs (unassigned wires or constants). Functions are provided for traversing the graph.
When traversing using depth_first_seach we can specify upto which means the search will stop when it reaches any signal in the given list (which is also /not/ included as part of the search).
Traverse the graph and find all inputs. Badly formed inputs (no name, or multiple names) return an error.
val outputs : ?validate:Base.bool ->t->Signal.tBase.listBase.Or_error.t
Return the outputs of the signal graph. If validate is true, then the outputs are checked for compatibility with circuit outputs.
val depth_first_search :
?deps:(moduleHardcaml__.Signal.Type.Deps)->?f_before:('a->Signal.t->'a)->?f_after:('a->Signal.t->'a)->t->init:'a->'a
Visit all signals in the graph, starting at the outputs, in a depth-first manner. Each signal is visited only once. f_before is called before recursing on each signal's fan-in. Similiarly, f_after is called after recursing on the fan-in.
If deps is provided it will be used to compute signal dependencies rather than the default definition. This is useful for terminating traversals based on some condition on signals, e.g., if it's a register or a memory.
val detect_combinational_loops : t->Base.unit Base.Or_error.t
Retuns an error if the graph has a combinational loop, that is, a path from a signal back to itself that doesn't pass though a register, memory or instantiation.