Loading [MathJax]/extensions/tex2jax.js
CIRCT 22.0.0git
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ExportVerilog.h
Go to the documentation of this file.
1//===- ExportVerilog.h - Verilog Exporter -----------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Defines the interface to the Verilog emitter.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef CIRCT_TRANSLATION_EXPORTVERILOG_H
14#define CIRCT_TRANSLATION_EXPORTVERILOG_H
15
16#include "mlir/IR/BuiltinOps.h"
17#include "mlir/Pass/Pass.h"
18
19namespace circt {
20
21#define GEN_PASS_DECL_TESTAPPLYLOWERINGOPTION
22#define GEN_PASS_DECL_HWLOWERINSTANCECHOICES
23#define GEN_PASS_DECL_PREPAREFOREMISSION
24#define GEN_PASS_DECL_LEGALIZEANONENUMS
25#define GEN_PASS_DECL_EXPORTSPLITVERILOG
26#define GEN_PASS_DECL_EXPORTVERILOG
27#include "circt/Conversion/Passes.h.inc"
28namespace hw {
29class HWModuleLike;
30class HWEmittableModuleLike;
31} // namespace hw
32
33std::unique_ptr<mlir::Pass>
34createExportVerilogPass(std::unique_ptr<llvm::raw_ostream> os);
35std::unique_ptr<mlir::Pass> createExportVerilogPass(llvm::raw_ostream &os);
36std::unique_ptr<mlir::Pass> createExportVerilogPass();
37
38std::unique_ptr<mlir::Pass>
39createExportSplitVerilogPass(llvm::StringRef directory = "./");
40
41/// Export a module containing HW, and SV dialect code. Requires that the SV
42/// dialect is loaded in to the context.
43mlir::LogicalResult exportVerilog(mlir::ModuleOp module, llvm::raw_ostream &os);
44
45/// Export a module containing HW, and SV dialect code, as one file per SV
46/// module. Requires that the SV dialect is loaded in to the context.
47///
48/// Files are created in the directory indicated by \p dirname.
49mlir::LogicalResult exportSplitVerilog(mlir::ModuleOp module,
50 llvm::StringRef dirname);
51
52} // namespace circt
53
54#endif // CIRCT_TRANSLATION_EXPORTVERILOG_H
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
std::unique_ptr< mlir::Pass > createExportSplitVerilogPass(llvm::StringRef directory="./")
mlir::LogicalResult exportVerilog(mlir::ModuleOp module, llvm::raw_ostream &os)
Export a module containing HW, and SV dialect code.
mlir::LogicalResult exportSplitVerilog(mlir::ModuleOp module, llvm::StringRef dirname)
Export a module containing HW, and SV dialect code, as one file per SV module.
std::unique_ptr< mlir::Pass > createExportVerilogPass()
Definition hw.py:1