CIRCT  19.0.0git
Public Member Functions | Private Attributes | List of all members
circt::LogicExporter Class Reference

A class traversing MLIR IR to extrapolate the logic of a given circuit. More...

#include <LogicExporter.h>

Collaboration diagram for circt::LogicExporter:
Collaboration graph
[legend]

Public Member Functions

 LogicExporter (llvm::StringRef moduleName, Solver::Circuit *circuit)
 
mlir::LogicalResult run (mlir::ModuleOp &module)
 Initializes the exporting by visiting the builtin module. More...
 
mlir::LogicalResult run (hw::HWModuleOp &module)
 

Private Attributes

std::string moduleName
 The specified module name to look for when traversing the input file. More...
 
Solver::Circuitcircuit
 The circuit representation to hold the logical constraints extracted from the IR. More...
 

Detailed Description

A class traversing MLIR IR to extrapolate the logic of a given circuit.

This class implements a MLIR exporter which searches the IR for the specified hw.module describing a circuit. It will then traverse its operations and collect the underlying logical constraints within an abstract circuit representation.

Definition at line 35 of file LogicExporter.h.

Constructor & Destructor Documentation

◆ LogicExporter()

circt::LogicExporter::LogicExporter ( llvm::StringRef  moduleName,
Solver::Circuit circuit 
)
inline

Definition at line 37 of file LogicExporter.h.

Member Function Documentation

◆ run() [1/2]

LogicalResult LogicExporter::run ( hw::HWModuleOp module)

Definition at line 232 of file LogicExporter.cpp.

◆ run() [2/2]

mlir::LogicalResult circt::LogicExporter::run ( mlir::ModuleOp &  module)

Initializes the exporting by visiting the builtin module.

Referenced by circt::Solver::Circuit::addInstance().

Member Data Documentation

◆ circuit

Solver::Circuit* circt::LogicExporter::circuit
private

The circuit representation to hold the logical constraints extracted from the IR.

Definition at line 52 of file LogicExporter.h.

◆ moduleName

std::string circt::LogicExporter::moduleName
private

The specified module name to look for when traversing the input file.

Definition at line 49 of file LogicExporter.h.


The documentation for this class was generated from the following files: