CIRCT 23.0.0git
Loading...
Searching...
No Matches
Namespaces | Classes | Functions | Variables
circt::arc Namespace Reference

Namespaces

namespace  runtime
 

Classes

class  ArcCostModel
 
struct  ArcReducePatternDialectInterface
 A dialect interface to provide reduction patterns to a reducer tool. More...
 
struct  ModelInfo
 Gathers information about a given Arc model. More...
 
struct  ModelInfoAnalysis
 
struct  OperationCosts
 
class  RuntimeCostEstimateDialectInterface
 A dialect interface to get runtime cost estimates of MLIR operations. More...
 
struct  StateInfo
 Gathers information about a given Arc state. More...
 

Functions

void registerCombRuntimeCostEstimateInterface (mlir::DialectRegistry &registry)
 
void registerHWRuntimeCostEstimateInterface (mlir::DialectRegistry &registry)
 
void registerSCFRuntimeCostEstimateInterface (mlir::DialectRegistry &registry)
 
void initAllExternalInterfaces (mlir::DialectRegistry &registry)
 
void registerReducePatternDialectInterface (mlir::DialectRegistry &registry)
 Register the Arc Reduction pattern dialect interface to the given registry.
 
std::optional< uint64_t > computeLLVMBitWidth (mlir::Type type)
 Compute the bit width a type will have when allocated as part of the simulator's storage.
 
mlir::LogicalResult collectStates (mlir::Value storage, unsigned offset, llvm::SmallVector< StateInfo > &states)
 Collects information about states within the provided Arc model storage storage, assuming default offset, and adds it to states.
 
mlir::LogicalResult collectModels (mlir::ModuleOp module, llvm::SmallVector< ModelInfo > &models)
 Collects information about all Arc models in the provided module, and adds it to models.
 
void serializeModelInfoToJson (llvm::raw_ostream &outputStream, llvm::ArrayRef< ModelInfo > models)
 Serializes models to outputStream in JSON format.
 
mlir::LogicalResult collectAndExportModelInfo (mlir::ModuleOp module, llvm::raw_ostream &os)
 Collects and exports Arc model info to JSON.
 
void registerArcModelInfoTranslation ()
 Registers CIRCT translation from Arc to JSON model info.
 

Variables

constexpr unsigned kTimeOffset = 0
 
constexpr unsigned kTerminateFlagOffset = 8
 
constexpr unsigned kNextWakeupOffset = 16
 
constexpr unsigned kStateOffset = 24
 

Function Documentation

◆ collectAndExportModelInfo()

mlir::LogicalResult circt::arc::collectAndExportModelInfo ( mlir::ModuleOp  module,
llvm::raw_ostream &  os 
)

Collects and exports Arc model info to JSON.

◆ collectModels()

mlir::LogicalResult circt::arc::collectModels ( mlir::ModuleOp  module,
llvm::SmallVector< ModelInfo > &  models 
)

Collects information about all Arc models in the provided module, and adds it to models.

◆ collectStates()

mlir::LogicalResult circt::arc::collectStates ( mlir::Value  storage,
unsigned  offset,
llvm::SmallVector< StateInfo > &  states 
)

Collects information about states within the provided Arc model storage storage, assuming default offset, and adds it to states.

Referenced by circt::arc::ModelInfoAnalysis::ModelInfoAnalysis().

◆ computeLLVMBitWidth()

std::optional< uint64_t > circt::arc::computeLLVMBitWidth ( mlir::Type  type)

Compute the bit width a type will have when allocated as part of the simulator's storage.

This includes any padding and alignment that may be necessary once the type has been mapped to LLVM. The idea is for this function to be conservative, such that we provide sufficient storage bytes for any type.

◆ initAllExternalInterfaces()

void circt::arc::initAllExternalInterfaces ( mlir::DialectRegistry &  registry)
inline

◆ registerArcModelInfoTranslation()

void circt::arc::registerArcModelInfoTranslation ( )

Registers CIRCT translation from Arc to JSON model info.

Definition at line 33 of file ModelInfoExport.cpp.

Referenced by circt::registerAllTranslations().

◆ registerCombRuntimeCostEstimateInterface()

void circt::arc::registerCombRuntimeCostEstimateInterface ( mlir::DialectRegistry &  registry)

Definition at line 115 of file RuntimeCostEstimateInterfaceImpl.cpp.

Referenced by initAllExternalInterfaces().

◆ registerHWRuntimeCostEstimateInterface()

void circt::arc::registerHWRuntimeCostEstimateInterface ( mlir::DialectRegistry &  registry)

Definition at line 122 of file RuntimeCostEstimateInterfaceImpl.cpp.

Referenced by initAllExternalInterfaces().

◆ registerReducePatternDialectInterface()

void circt::arc::registerReducePatternDialectInterface ( mlir::DialectRegistry &  registry)

Register the Arc Reduction pattern dialect interface to the given registry.

Definition at line 62 of file ArcReductions.cpp.

◆ registerSCFRuntimeCostEstimateInterface()

void circt::arc::registerSCFRuntimeCostEstimateInterface ( mlir::DialectRegistry &  registry)

Definition at line 129 of file RuntimeCostEstimateInterfaceImpl.cpp.

Referenced by initAllExternalInterfaces().

◆ serializeModelInfoToJson()

void circt::arc::serializeModelInfoToJson ( llvm::raw_ostream &  outputStream,
llvm::ArrayRef< ModelInfo models 
)

Serializes models to outputStream in JSON format.

Variable Documentation

◆ kNextWakeupOffset

constexpr unsigned circt::arc::kNextWakeupOffset = 16
inlineconstexpr

Definition at line 18 of file ArcConstants.h.

◆ kStateOffset

constexpr unsigned circt::arc::kStateOffset = 24
inlineconstexpr

Definition at line 19 of file ArcConstants.h.

◆ kTerminateFlagOffset

constexpr unsigned circt::arc::kTerminateFlagOffset = 8
inlineconstexpr

Definition at line 17 of file ArcConstants.h.

◆ kTimeOffset

constexpr unsigned circt::arc::kTimeOffset = 0
inlineconstexpr

Definition at line 16 of file ArcConstants.h.