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

Instantiate for all Tcl emissions. More...

#include <ExportTcl.h>

Collaboration diagram for circt::msft::TclEmitter:
Collaboration graph
[legend]

Public Member Functions

 TclEmitter (mlir::ModuleOp topLevel)
 
LogicalResult emit (Operation *hwMod, StringRef outputFile)
 Write out all the relevant tcl commands. More...
 
Operation * getDefinition (FlatSymbolRefAttr)
 
const DenseSet< hw::HierPathOp > & getRefsUsed ()
 
void usedRef (hw::HierPathOp ref)
 

Private Member Functions

LogicalResult populate ()
 

Private Attributes

mlir::ModuleOp topLevel
 
bool populated
 
hw::HWSymbolCache topLevelSymbols
 
DenseMap< Operation *, llvm::MapVector< StringAttr, SmallVector< DynInstDataOpInterface, 0 > > > tclOpsForModInstance
 Map Module operations to their top-level "instance" names. More...
 
DenseSet< hw::HierPathOp > refsUsed
 

Detailed Description

Instantiate for all Tcl emissions.

We want to cache the symbols and binned ops – this helper class provides that caching.

Definition at line 29 of file ExportTcl.h.

Constructor & Destructor Documentation

◆ TclEmitter()

TclEmitter::TclEmitter ( mlir::ModuleOp  topLevel)

Definition at line 35 of file ExportQuartusTcl.cpp.

Member Function Documentation

◆ emit()

LogicalResult TclEmitter::emit ( Operation *  hwMod,
StringRef  outputFile 
)

Write out all the relevant tcl commands.

Create one 'proc' per module which takes the parent entity name since we don't assume that the created module is the top level for the entire design.

Definition at line 294 of file ExportQuartusTcl.cpp.

References builder, circt::calyx::direction::get(), populate(), and tclOpsForModInstance.

◆ getDefinition()

Operation * TclEmitter::getDefinition ( FlatSymbolRefAttr  sym)

◆ getRefsUsed()

const DenseSet<hw::HierPathOp>& circt::msft::TclEmitter::getRefsUsed ( )
inline

Definition at line 35 of file ExportTcl.h.

References refsUsed.

◆ populate()

LogicalResult TclEmitter::populate ( )
private

◆ usedRef()

void circt::msft::TclEmitter::usedRef ( hw::HierPathOp  ref)
inline

Definition at line 36 of file ExportTcl.h.

References refsUsed.

Member Data Documentation

◆ populated

bool circt::msft::TclEmitter::populated
private

Definition at line 41 of file ExportTcl.h.

Referenced by populate().

◆ refsUsed

DenseSet<hw::HierPathOp> circt::msft::TclEmitter::refsUsed
private

Definition at line 49 of file ExportTcl.h.

Referenced by getRefsUsed(), and usedRef().

◆ tclOpsForModInstance

DenseMap<Operation *, llvm::MapVector<StringAttr, SmallVector<DynInstDataOpInterface, 0> > > circt::msft::TclEmitter::tclOpsForModInstance
private

Map Module operations to their top-level "instance" names.

Map those "instance" names to the lowered ops which get directly emitted as tcl.

Definition at line 48 of file ExportTcl.h.

Referenced by emit(), and populate().

◆ topLevel

mlir::ModuleOp circt::msft::TclEmitter::topLevel
private

Definition at line 39 of file ExportTcl.h.

Referenced by populate().

◆ topLevelSymbols

hw::HWSymbolCache circt::msft::TclEmitter::topLevelSymbols
private

Definition at line 42 of file ExportTcl.h.

Referenced by getDefinition(), and populate().


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