namespace xls {
namespace verilog {

// Class setting up default options passed to the pipeline generator.
inline CodegenOptions BuildPipelineOptions() {
  return CodegenOptions()
      .flop_inputs(true)
      .flop_outputs(true)
      .clock_name("clk")
      .emit_as_pipeline(true);
}

// Emits the given function as a verilog module which follows the given
// schedule. The module is pipelined with a latency and initiation interval
// given in the signature.
absl::StatusOr<ModuleGeneratorResult> ToPipelineModuleText(
    const PipelineSchedule& schedule, Function* func,
    const CodegenOptions& options = BuildPipelineOptions());

// Emits the given function or proc as a verilog module which follows the given
// schedule. The module is pipelined with a latency and initiation interval
// given in the signature.
absl::StatusOr<ModuleGeneratorResult> ToPipelineModuleText(
    const PipelineSchedule& schedule, FunctionBase* module,
    const CodegenOptions& options = BuildPipelineOptions());

}  // namespace verilog
}  // namespace xls

#endif  // XLS_CODEGEN_PIPELINE_GENERATOR_H_
