CIRCT
19.0.0git
|
Private Member Functions | |
hw::OutputFileAttr | getOutputFile (SymbolRefAttr layerName) |
hw::OutputFileAttr | outputFileForLayer (StringRef circuitName, SymbolRefAttr layerName) |
FModuleOp | buildNewModule (OpBuilder &builder, LayerBlockOp layerBlock, SmallVectorImpl< PortInfo > &ports) |
Safely build a new module with a given namehint. More... | |
InnerRefMap | runOnModuleLike (FModuleLike moduleLike) |
Strip layer colors from the module's interface. More... | |
void | runOnModuleBody (FModuleOp moduleOp, InnerRefMap &innerRefMap) |
Extract layerblocks and strip probe colors from all ops under the module. More... | |
void | removeLayersFromPorts (FModuleLike moduleLike) |
Update the module's port types to remove any explicit layer requirements from any probe types. More... | |
void | removeLayersFromValue (Value value) |
Update the value's type to remove any layers from any probe types. More... | |
void | removeLayersFromRefCast (RefCastOp cast) |
Remove any layers from the result of the cast. More... | |
void | lowerInlineLayerBlock (LayerOp layer, LayerBlockOp layerBlock) |
Lower an inline layerblock to an ifdef block. More... | |
void | createMacroDecls (CircuitNamespace &ns, OpBuilder &b, LayerOp layer, SmallVector< StringAttr > &stack) |
Create macro declarations for a given layer, and its child layers. More... | |
void | createMacroDecls (CircuitNamespace &ns, LayerOp layer) |
void | runOnOperation () override |
Entry point for the function. More... | |
Private Attributes | |
llvm::sys::SmartMutex< true > * | circuitMutex |
Indicates exclusive access to modify the circuitNamespace and the circuit. More... | |
DenseMap< LayerBlockOp, StringRef > | moduleNames |
A map of layer blocks to module name that should be created for it. More... | |
DenseMap< LayerOp, FlatSymbolRefAttr > | macroNames |
A map from inline layers to their macro names. More... | |
Definition at line 137 of file LowerLayers.cpp.
|
private |
Safely build a new module with a given namehint.
Multi-process safe function to build a module in the circuit and return it.
This handles geting a lock to modify the top-level circuit.
The name provided is only a namehint for the module—a unique name will be generated if there are conflicts with the namehint in the circuit-level namespace.
Definition at line 206 of file LowerLayers.cpp.
References assert(), circt::calyx::direction::get(), and getOutputFile().
|
private |
Definition at line 684 of file LowerLayers.cpp.
|
private |
Create macro declarations for a given layer, and its child layers.
Definition at line 661 of file LowerLayers.cpp.
References circt::calyx::direction::get(), macroNameForLayer(), and circt::Namespace::newName().
|
inlineprivate |
Definition at line 139 of file LowerLayers.cpp.
|
private |
Lower an inline layerblock to an ifdef block.
Definition at line 299 of file LowerLayers.cpp.
|
inlineprivate |
Definition at line 147 of file LowerLayers.cpp.
References fileNameForLayer(), and getOutputFile().
|
private |
Update the module's port types to remove any explicit layer requirements from any probe types.
Definition at line 247 of file LowerLayers.cpp.
References circt::calyx::direction::get().
|
private |
Remove any layers from the result of the cast.
If the cast becomes a nop, remove the cast itself from the IR.
Definition at line 231 of file LowerLayers.cpp.
|
private |
Update the value's type to remove any layers from any probe types.
Definition at line 224 of file LowerLayers.cpp.
|
private |
Extract layerblocks and strip probe colors from all ops under the module.
Definition at line 308 of file LowerLayers.cpp.
References assert(), Python.support::connect(), circt::calyx::direction::get(), circt::firrtl::getFieldName(), circt::firrtl::In, instanceNameForLayer(), isAncestor(), and circt::firrtl::Out.
|
private |
Strip layer colors from the module's interface.
Definition at line 275 of file LowerLayers.cpp.
References assert().
|
overrideprivate |
Entry point for the function.
Process a circuit to remove all layer blocks in each module and top-level layer definition.
Definition at line 692 of file LowerLayers.cpp.
References empty, circt::calyx::direction::get(), moduleNameForLayer(), circt::Namespace::newName(), and circt::firrtl::transformReduce().
|
private |
Indicates exclusive access to modify the circuitNamespace and the circuit.
Definition at line 193 of file LowerLayers.cpp.
|
private |
A map from inline layers to their macro names.
Definition at line 199 of file LowerLayers.cpp.
|
private |
A map of layer blocks to module name that should be created for it.
Definition at line 196 of file LowerLayers.cpp.