Module Hardcaml__.Scope
module Path : sig ... endmodule Naming_scheme : sig ... endControl of name generation in a hierarchy of modules. The position of a module within a hierarchy is determined by a path which leads back to the (single) top most parent module. Signal names may be pre-pended with some represtation of that path.
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val create : ?flatten_design:Hardcaml__.Import.bool -> ?naming_scheme:Naming_scheme.t -> ?name:Hardcaml__.Import.string -> Hardcaml__.Import.unit -> tcreate ?flatten_design ?naming_scheme ?name ()creates a new scope. Ifflatten_designistrue, then all module instantions are inlined. Names for wires are determiend bynaming_scheme.
val sub_scope : t -> Hardcaml__.Import.string -> tsub_scope t labelreturns a new scope withlabelappended to its hierarchical path
val path : t -> Path.tpath treturns thePath.tassociated witht. This will determine the prefix used when naming modules that are associated with this scope.
val circuit_database : t -> Hardcaml.Circuit_database.tcircuit_database treturns the circuit database associated witht. Note that circuit databases are shared amongsub_scopes.
val flatten_design : t -> Hardcaml__.Import.boolflatten_design treturns true when HardCaml will inline all module instantiations.
val naming_scheme : t -> Naming_scheme.tnaming_scheme treturns theNaming.t thattwas constructed with.
val naming : ?sep:Hardcaml__.Import.string -> t -> Hardcaml.Signal.t -> Hardcaml__.Import.string -> Hardcaml.Signal.tnaming ?sep t signal nameassigns a heirarchical name tosignalbased on the path oftandname.sep, when provided, determines the separator for path components in the heirarchical name.This is typically used as a partial application to construct a new signal naming operator, .e.g:
let (--) = naming scope in (* ... other code ... *) let named_signal = some_signal -- "data" in (* ... more code ... *)