12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758open!ImportmoduletypeRtl=sigmoduleLanguage:sigtypet=|Verilog|Vhdl[@@derivingsexp_of]valfile_extension:t->stringvallegalize_identifier:t->string->stringend(** RTL generation options. *)moduleOutput_mode:sigtypet=|In_directoryofstring(** Write each circuit into a file in the given directory. The file name consists
of the circuit name and the approriate file extension ([.v] for Verilog and
[.vhd] for VHDL). *)|To_bufferofBuffer.t(** Write all circuits into one buffer. *)|To_channelofOut_channel.t(** Write all circuits to one out channel. *)|To_fileofstring(** Write all circuits into one file. *)[@@derivingsexp_of]end(** Control blackbox generation. [None] implies blackboxes are not used. [Top] means the
circuit will be turned into a blackbox. [Instantiations] means that the top level
circuit will be written as normal, but submodules will be written as blackboxes. *)moduleBlackbox:sigtypet=|None|Top|Instantiations[@@derivingsexp_of]end(** Write circuit to [Verilog] or [Vhdl]. Instantiations are (recursively) looked up in
[database] and if a circuit exists it is also written. The [output_mode] specifies
how the circuit should be written - either to a single file (or buffer, or channel)
or to a directory with one file for each for the top level circuit and any
instantiated circuits contained in the database. *)valoutput:?output_mode:Output_mode.t(** default is [To_file (Circuit.name circuit)]. *)->?database:Circuit_database.t(** default is an empty database *)->?blackbox:Blackbox.t(** Default is [None] *)->Language.t->Circuit.t->unit(** [print] is [output ~output_mode:(To_channel stdout)] *)valprint:?database:Circuit_database.t->?blackbox:Blackbox.t(** Default is [None] *)->Language.t->Circuit.t->unitend