CIRCT 24.0.0git
Loading...
Searching...
No Matches
circt::arc Namespace Reference

Namespaces

namespace  runtime

Classes

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

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.

Referenced by registerArcModelInfoTranslation().

◆ 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.

Definition at line 32 of file ArcTypes.cpp.

References computeLLVMBitWidth().

Referenced by computeLLVMBitWidth().

◆ 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 32 of file ModelInfoExport.cpp.

References collectAndExportModelInfo().

Referenced by circt::registerAllTranslations().

◆ registerCombRuntimeCostEstimateInterface()

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

◆ registerHWRuntimeCostEstimateInterface()

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

◆ 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.

References registerReducePatternDialectInterface().

Referenced by registerReducePatternDialectInterface().

◆ registerSCFRuntimeCostEstimateInterface()

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

◆ serializeModelInfoToJson()

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

Serializes models to outputStream in JSON format.

Variable Documentation

◆ kNextWakeupOffset

unsigned circt::arc::kNextWakeupOffset = 16
inlineconstexpr

Definition at line 18 of file ArcConstants.h.

◆ kStateOffset

unsigned circt::arc::kStateOffset = 24
inlineconstexpr

Definition at line 19 of file ArcConstants.h.

◆ kTerminateFlagOffset

unsigned circt::arc::kTerminateFlagOffset = 8
inlineconstexpr

Definition at line 17 of file ArcConstants.h.

◆ kTimeOffset

unsigned circt::arc::kTimeOffset = 0
inlineconstexpr

Definition at line 16 of file ArcConstants.h.