CIRCT  19.0.0git
Namespaces | Classes | Functions | Variables
circt Namespace Reference

This file defines an intermediate representation for circuits acting as an abstraction for constraints defined over an SMT's solver context. More...

Namespaces

 analysis
 
 arc
 
 calyx
 
 calyxToFSM
 
 chirrtl
 
 comb
 
 dc
 
 debug
 
 detail
 
 emit
 
 esi
 
 ExportSMTLIB
 
 ExportSystemC
 
 ExportVerilog
 
 firrtl
 
 firtool
 
 fsm
 
 handshake
 
 handshaketodc
 
 hw
 
 hwarith
 
 ibis
 
 igraph
 
 ImportVerilog
 
 llhd
 
 loopschedule
 
 ltl
 
 moore
 
 msft
 
 om
 
 parsing_util
 
 pipeline
 
 pipelinetocalyx
 
 pretty
 
 python
 
 reduce
 
 scfToCalyx
 
 scftocalyx
 
 scheduling
 
 seq
 
 sim
 
 smt
 
 ssp
 
 sv
 
 systemc
 
 test
 
 verif
 

Classes

struct  DebugAnalysis
 Identify operations and values that are only used for debug info. More...
 
struct  DIModule
 
struct  DIInstance
 
struct  DIVariable
 
struct  DebugInfo
 Debug information attached to an operation and the operations nested within. More...
 
class  HWArithToHWTypeConverter
 A helper type converter class that automatically populates the relevant materializations and type conversions for converting HWArith to HW. More...
 
struct  HWToLLVMEndianessConverter
 
struct  ImportVerilogOptions
 Options that control how Verilog input files are parsed and processed. More...
 
struct  TypeConversionPattern
 Generic pattern which replaces an operation by one of the same operation name, but with converted attributes, operands, and result types to eliminate illegal types. More...
 
struct  TypeOpConversionPattern
 
class  LogicExporter
 A class traversing MLIR IR to extrapolate the logic of a given circuit. More...
 
class  Solver
 A satisfiability checker for circuit equivalence. More...
 
struct  Reduction
 An abstract reduction pattern. More...
 
struct  OpReduction
 
struct  PassReduction
 A reduction pattern that applies an mlir::Pass. More...
 
class  ReducePatternSet
 
struct  ReducePatternDialectInterface
 A dialect interface to provide reduction patterns to a reducer tool. More...
 
struct  ReducePatternInterfaceCollection
 
class  Tester
 A testing environment for reduction attempts. More...
 
class  TestCase
 A single test case to be run by a tester. More...
 
class  BackedgeBuilder
 Instantiate one of these and use it to build typed backedges. More...
 
class  Backedge
 Backedge is a wrapper class around a Value. More...
 
class  StringAttrOrRef
 A helper union that can represent a StringAttr, StringRef, or Twine. More...
 
class  FieldRef
 This class represents a reference to a specific field or element of an aggregate value. More...
 
struct  LoweringOptions
 Options which control the emission from CIRCT to Verilog. More...
 
struct  LoweringOptionsParser
 Commandline parser for LoweringOptions. More...
 
struct  LoweringOptionsOption
 
class  Namespace
 A namespace that is used to store existing names and generate new names in some scope within the IR. More...
 
class  VerbosePassInstrumentation
 
class  SymbolCacheBase
 Base symbol cache class to allow for cache lookup through a pointer to some abstract cache. More...
 
class  SymbolCache
 Default symbol cache implementation; stores associations between names (StringAttr's) to mlir::Operation's. More...
 
class  ValueMapper
 The ValueMapper class facilitates the definition and connection of SSA def-use chains between two location - a 'from' location (defining use-def chains) and a 'to' location (where new operations are created based on the 'from' location). More...
 
class  SSAMaximizationStrategy
 Strategy class to control the behavior of SSA maximization. More...
 
struct  FirMemConfig
 The configuration of a FIR memory. More...
 
class  FirMemLowering
 FIR memory lowering helper. More...
 
class  FirRegLowering
 Lower FirRegOp to sv.reg and sv.always. More...
 

Functions

std::unique_ptr< mlir::Pass > createAffineToLoopSchedule ()
 
std::unique_ptr< OperationPass< ModuleOp > > createLowerArcToLLVMPass ()
 
std::unique_ptr< mlir::Pass > createCalyxNativePass ()
 
std::unique_ptr< mlir::Pass > createCalyxToFSMPass ()
 
std::unique_ptr< mlir::Pass > createMaterializeCalyxToFSMPass ()
 
std::unique_ptr< mlir::Pass > createRemoveGroupsFromFSMPass ()
 
std::unique_ptr< mlir::Pass > createCalyxToHWPass ()
 
std::unique_ptr< mlir::OperationPass< mlir::ModuleOp > > createHandshakeAnalysisPass ()
 
std::unique_ptr< mlir::OperationPass< mlir::ModuleOp > > createCFToHandshakePass (bool sourceConstants=false, bool disableTaskPipelining=false)
 
std::unique_ptr< mlir::OperationPass< handshake::FuncOp > > createHandshakeCanonicalizePass ()
 
std::unique_ptr< mlir::OperationPass< handshake::FuncOp > > createHandshakeRemoveBlockPass ()
 
mlir::LogicalResult insertMergeBlocks (mlir::Region &r, mlir::ConversionPatternRewriter &rewriter)
 Insert additional blocks that serve as counterparts to the blocks that diverged the control flow. More...
 
std::unique_ptr< mlir::Pass > createInsertMergeBlocksPass ()
 
void populateCombToArithConversionPatterns (TypeConverter &converter, RewritePatternSet &patterns)
 
std::unique_ptr< OperationPass< ModuleOp > > createConvertCombToArithPass ()
 
void populateCombToLLVMConversionPatterns (mlir::LLVMTypeConverter &converter, RewritePatternSet &patterns)
 Get the Comb to LLVM conversion patterns. More...
 
void populateCombToSMTConversionPatterns (TypeConverter &converter, RewritePatternSet &patterns)
 Get the HW to SMT conversion patterns. More...
 
std::unique_ptr< OperationPass< ModuleOp > > createConvertToArcsPass (const ConvertToArcsOptions &options={})
 
std::unique_ptr< mlir::Pass > createDCToHWPass ()
 
std::unique_ptr< mlir::Pass > createExportChiselInterfacePass (llvm::raw_ostream &os)
 
std::unique_ptr< mlir::Pass > createExportSplitChiselInterfacePass (mlir::StringRef outputDirectory="./")
 
std::unique_ptr< mlir::Pass > createExportChiselInterfacePass ()
 
std::unique_ptr< mlir::Pass > createTestApplyLoweringOptionPass (llvm::StringRef options)
 
std::unique_ptr< mlir::Pass > createTestApplyLoweringOptionPass ()
 
std::unique_ptr< mlir::Pass > createHWLowerInstanceChoicesPass ()
 
std::unique_ptr< mlir::Pass > createPrepareForEmissionPass ()
 
std::unique_ptr< mlir::Pass > createLegalizeAnonEnumsPass ()
 
std::unique_ptr< mlir::Pass > createExportVerilogPass (std::unique_ptr< llvm::raw_ostream > os)
 
std::unique_ptr< mlir::Pass > createExportVerilogPass (llvm::raw_ostream &os)
 
std::unique_ptr< mlir::Pass > createExportVerilogPass ()
 
std::unique_ptr< mlir::Pass > createExportSplitVerilogPass (llvm::StringRef directory="./")
 
mlir::LogicalResult exportVerilog (mlir::ModuleOp module, llvm::raw_ostream &os)
 Export a module containing HW, and SV dialect code. More...
 
mlir::LogicalResult exportSplitVerilog (mlir::ModuleOp module, llvm::StringRef dirname)
 Export a module containing HW, and SV dialect code, as one file per SV module. More...
 
std::unique_ptr< mlir::Pass > createLowerFIRRTLToHWPass (bool enableAnnotationWarning=false, bool emitChiselAssertsAsSVA=false)
 This is the pass constructor. More...
 
std::unique_ptr< mlir::Pass > createConvertFSMToSVPass ()
 
std::unique_ptr< mlir::Pass > createHandshakeToDCPass ()
 
std::unique_ptr< mlir::Pass > createHandshakeToHWPass ()
 
void populateHWArithToHWConversionPatterns (HWArithToHWTypeConverter &typeConverter, RewritePatternSet &patterns)
 Get the HWArith to HW conversion patterns. More...
 
std::unique_ptr< mlir::Pass > createHWArithToHWPass ()
 
std::unique_ptr< mlir::Pass > createConvertHWToBTOR2Pass (llvm::raw_ostream &os)
 
std::unique_ptr< mlir::Pass > createConvertHWToBTOR2Pass ()
 
std::unique_ptr< mlir::OperationPass< mlir::ModuleOp > > createConvertHWToLLHDPass ()
 Create a HW to LLHD conversion pass. More...
 
void populateHWToLLVMTypeConversions (mlir::LLVMTypeConverter &converter)
 Get the HW to LLVM type conversions. More...
 
void populateHWToLLVMConversionPatterns (mlir::LLVMTypeConverter &converter, RewritePatternSet &patterns, Namespace &globals, DenseMap< std::pair< Type, ArrayAttr >, mlir::LLVM::GlobalOp > &constAggregateGlobalsMap)
 Get the HW to LLVM conversion patterns. More...
 
std::unique_ptr< OperationPass< ModuleOp > > createConvertHWToLLVMPass ()
 Create an HW to LLVM conversion pass. More...
 
void populateHWToSMTConversionPatterns (TypeConverter &converter, RewritePatternSet &patterns)
 Get the HW to SMT conversion patterns. More...
 
void populateHWToSMTTypeConverter (TypeConverter &converter)
 Get the HW to SMT type conversions. More...
 
std::unique_ptr< mlir::OperationPass< hw::HWModuleOp > > createLowerHWToSVPass ()
 
std::unique_ptr< mlir::OperationPass< mlir::ModuleOp > > createConvertHWToSystemCPass ()
 Create a HW to SystemC dialects conversion pass. More...
 
mlir::LogicalResult importVerilog (llvm::SourceMgr &sourceMgr, mlir::MLIRContext *context, mlir::TimingScope &ts, mlir::ModuleOp module, const ImportVerilogOptions *options=nullptr)
 Parse files in a source manager as Verilog source code and populate the given MLIR module with corresponding ops. More...
 
mlir::LogicalResult preprocessVerilog (llvm::SourceMgr &sourceMgr, mlir::MLIRContext *context, mlir::TimingScope &ts, llvm::raw_ostream &os, const ImportVerilogOptions *options=nullptr)
 Run the files in a source manager through Slang's Verilog preprocessor and emit the result to the given output stream. More...
 
void registerFromVerilogTranslation ()
 Register the import-verilog MLIR translation. More...
 
std::string getSlangVersion ()
 Return a human-readable string describing the slang frontend version linked into CIRCT. More...
 
void populateLLHDToLLVMTypeConversions (mlir::LLVMTypeConverter &converter)
 Get the LLHD to LLVM type conversions. More...
 
void populateLLHDToLLVMConversionPatterns (mlir::LLVMTypeConverter &converter, RewritePatternSet &patterns, size_t &sigCounter, size_t &regCounter)
 Get the LLHD to LLVM conversion patterns. More...
 
std::unique_ptr< OperationPass< ModuleOp > > createConvertLLHDToLLVMPass ()
 Create an LLHD to LLVM conversion pass. More...
 
std::unique_ptr< OperationPass< ModuleOp > > createLoopScheduleToCalyxPass ()
 Create a LoopSchedule to Calyx conversion pass. More...
 
std::unique_ptr< OperationPass< ModuleOp > > createConvertMooreToCorePass ()
 Create an Moore to Comb/HW/LLHD conversion pass. More...
 
std::unique_ptr< mlir::Pass > createPipelineToHWPass (const PipelineToHWOptions &options={})
 Create an SCF to Calyx conversion pass. More...
 
std::unique_ptr< OperationPass< ModuleOp > > createSCFToCalyxPass ()
 Create an SCF to Calyx conversion pass. More...
 
std::unique_ptr< mlir::Pass > createLowerSeqToSVPass (const LowerSeqToSVOptions &options={})
 
std::unique_ptr< mlir::Pass > createLowerFirMemPass ()
 
std::unique_ptr< mlir::Pass > createLowerSeqFIRRTLInitToSV ()
 
std::unique_ptr< mlir::Pass > createLowerSimToSVPass ()
 
void populateVerifToSMTConversionPatterns (TypeConverter &converter, RewritePatternSet &patterns)
 Get the Verif to SMT conversion patterns. More...
 
std::unique_ptr< OperationPass< hw::HWModuleOp > > createLowerVerifToSVPass ()
 Create the Verif to SV conversion pass. More...
 
LogicalResult doTypeConversion (Operation *op, ValueRange operands, ConversionPatternRewriter &rewriter, const TypeConverter *typeConverter)
 
ParseResult parseInputPortList (OpAsmParser &parser, SmallVectorImpl< OpAsmParser::UnresolvedOperand > &inputs, SmallVectorImpl< Type > &inputTypes, ArrayAttr &inputNames)
 Parse a list of instance input ports. More...
 
void printInputPortList (OpAsmPrinter &p, Operation *op, OperandRange inputs, TypeRange inputTypes, ArrayAttr inputNames)
 Print a list of instance input ports. More...
 
ParseResult parseOutputPortList (OpAsmParser &parser, SmallVectorImpl< Type > &resultTypes, ArrayAttr &resultNames)
 Parse a list of instance output ports. More...
 
void printOutputPortList (OpAsmPrinter &p, Operation *op, TypeRange resultTypes, ArrayAttr resultNames)
 Print a list of instance output ports. More...
 
ParseResult parseOptionalParameterList (OpAsmParser &parser, ArrayAttr &parameters)
 Parse an parameter list if present. More...
 
void printOptionalParameterList (OpAsmPrinter &p, Operation *op, ArrayAttr parameters)
 Print a parameter list for a module or instance. More...
 
void registerAllDialects (mlir::DialectRegistry &registry)
 
void registerAllPasses ()
 
void registerAllTranslations ()
 
void populateGenericReducePatterns (MLIRContext *context, ReducePatternSet &patterns)
 Populate reduction patterns that are not specific to certain operations or dialects. More...
 
APInt sextZeroWidth (APInt value, unsigned width)
 A safe version of APInt::sext that will NOT assert on zero-width signed APSInts. More...
 
APSInt extOrTruncZeroWidth (APSInt value, unsigned width)
 A safe version of APSInt::extOrTrunc that will NOT assert on zero-width signed APSInts. More...
 
ParseResult parseImplicitSSAName (OpAsmParser &parser, StringAttr &attr)
 Parse an implicit SSA name string attribute. More...
 
ParseResult parseImplicitSSAName (OpAsmParser &parser, NamedAttrList &attrs)
 Parse an attribute dictionary and ensure that it contains a name field by inferring its value from the SSA name of the operation's first result if necessary. More...
 
bool inferImplicitSSAName (OpAsmParser &parser, NamedAttrList &attrs)
 Ensure that attrs contains a name attribute by inferring its value from the SSA name of the operation's first result if necessary. More...
 
void printImplicitSSAName (OpAsmPrinter &p, Operation *op, StringAttr attr)
 Print an implicit SSA name string attribute. More...
 
void printImplicitSSAName (OpAsmPrinter &p, Operation *op, DictionaryAttr attrs, ArrayRef< StringRef > extraElides={})
 Print an attribute dictionary and elide the name field if its value matches the SSA name of the operation's first result. More...
 
void elideImplicitSSAName (OpAsmPrinter &printer, Operation *op, DictionaryAttr attrs, SmallVectorImpl< StringRef > &elides)
 Check if the name attribute in attrs matches the SSA name of the operation's first result. More...
 
void printOptionalBinaryOpTypes (OpAsmPrinter &p, Operation *op, Type lhs, Type rhs)
 Print/parse binary operands type only when types are different. More...
 
ParseResult parseOptionalBinaryOpTypes (OpAsmParser &parser, Type &lhs, Type &rhs)
 
ParseResult parseKeywordBool (OpAsmParser &parser, BoolAttr &attr, StringRef trueKeyword, StringRef falseKeyword)
 Parse a boolean as one of two keywords. More...
 
void printKeywordBool (OpAsmPrinter &printer, Operation *op, BoolAttr attr, StringRef trueKeyword, StringRef falseKeyword)
 Print a boolean as one of two keywords. More...
 
llvm::raw_ostream & debugHeader (llvm::StringRef str, int width=80)
 Write a "header"-like string to the debug stream with a certain width. More...
 
llvm::raw_ostream & debugPassHeader (const mlir::Pass *pass, int width=80)
 Write a boilerplate header for a pass to the debug stream. More...
 
llvm::raw_ostream & debugFooter (int width=80)
 Write a boilerplate footer to the debug stream to indicate that a pass has ended. More...
 
inline ::llvm::hash_code hash_value (const FieldRef &fieldRef)
 Get a hash code for a FieldRef. More...
 
static std::optional< APInt > getConstantInt (Attribute operand)
 Determine the integer value of a constant operand. More...
 
static bool isConstantZero (Attribute operand)
 Determine whether a constant operand is a zero value. More...
 
static bool isConstantOne (Attribute operand)
 Determine whether a constant operand is a one value. More...
 
LogicalResult convertAttributeToJSON (llvm::json::OStream &json, Attribute attr)
 Convert a simple attribute to JSON. More...
 
Attribute convertJSONToAttribute (MLIRContext *context, llvm::json::Value &value, llvm::json::Path p)
 Convert arbitrary JSON to an MLIR Attribute. More...
 
bool isUselessName (StringRef name)
 Return true if this is a possibly useless temporary name. More...
 
StringRef chooseName (StringRef a, StringRef b)
 Choose a good name for an item from two options. More...
 
StringAttr chooseName (StringAttr a, StringAttr b)
 Choose a good name for an item from two options. More...
 
StringAttr chooseName (Operation *a, Operation *b)
 Choose the better name between two ops. More...
 
std::unique_ptr< Pass > createSimpleCanonicalizerPass ()
 Create a simple canonicalizer pass. More...
 
void appendPossiblyAbsolutePath (llvm::SmallVectorImpl< char > &base, const llvm::Twine &suffix)
 Append a path to an existing path, replacing it if the other path is absolute. More...
 
const char * getCirctVersion ()
 
const char * getCirctVersionComment ()
 
std::unique_ptr< mlir::Pass > createMapArithToCombPass ()
 
std::unique_ptr< mlir::Pass > createFlattenMemRefPass ()
 
std::unique_ptr< mlir::Pass > createFlattenMemRefCallsPass ()
 
std::unique_ptr< mlir::Pass > createStripDebugInfoWithPredPass (const std::function< bool(mlir::Location)> &pred)
 Creates a pass to strip debug information from a function. More...
 
std::unique_ptr< mlir::Pass > createMaximizeSSAPass ()
 
bool isUniDimensional (mlir::MemRefType memref)
 
bool isRegionSSAMaximized (Region &region)
 
LogicalResult maximizeSSA (Value value, PatternRewriter &rewriter)
 Converts a single value within a function into maximal SSA form. More...
 
LogicalResult maximizeSSA (Operation *op, SSAMaximizationStrategy &strategy, PatternRewriter &rewriter)
 Considers all of an operation's results for SSA maximization, following a provided strategy. More...
 
LogicalResult maximizeSSA (Block *block, SSAMaximizationStrategy &strategy, PatternRewriter &rewriter)
 Considers all values defined by a block (i.e., block arguments and operation results within the block) for SSA maximization, following a provided strategy. More...
 
LogicalResult maximizeSSA (Region &region, SSAMaximizationStrategy &strategy, PatternRewriter &rewriter)
 Considers all blocks within a region for SSA maximization, following a provided strategy. More...
 

Variables

constexpr const char * circtBugReportMsg
 A generic bug report message for CIRCT-related projects. More...
 

Detailed Description

This file defines an intermediate representation for circuits acting as an abstraction for constraints defined over an SMT's solver context.

The InstanceGraph op interface, see InstanceGraphInterface.td for more details.

This file defines a SMT solver interface for the circt-lec tool.

This file defines the logic-exporting class for the circt-lec tool.

Function Documentation

◆ appendPossiblyAbsolutePath()

void circt::appendPossiblyAbsolutePath ( llvm::SmallVectorImpl< char > &  base,
const llvm::Twine &  suffix 
)

Append a path to an existing path, replacing it if the other path is absolute.

This mimicks the behaviour of foo/bar and /foo/bar being used in a working directory /home, resulting in /home/foo/bar and /foo/bar, respectively.

Definition at line 23 of file Path.cpp.

References append().

Referenced by createOutputFile(), and circt::ExportVerilog::SharedEmitterState::gatherFiles().

◆ chooseName() [1/3]

StringAttr circt::chooseName ( Operation *  a,
Operation *  b 
)

Choose the better name between two ops.

Picks the "name" attribute as first preference, using "sv.namehint" as an alternative.

Definition at line 66 of file Naming.cpp.

References chooseName(), and getNameOrHint().

◆ chooseName() [2/3]

StringAttr circt::chooseName ( StringAttr  a,
StringAttr  b 
)

Choose a good name for an item from two options.

Definition at line 51 of file Naming.cpp.

References isNameBetter().

◆ chooseName() [3/3]

StringRef circt::chooseName ( StringRef  a,
StringRef  b 
)

Choose a good name for an item from two options.

Definition at line 47 of file Naming.cpp.

References isNameBetter().

Referenced by chooseName(), and updateName().

◆ convertAttributeToJSON()

LogicalResult circt::convertAttributeToJSON ( llvm::json::OStream &  json,
Attribute  attr 
)

Convert a simple attribute to JSON.

Definition at line 23 of file JSON.cpp.

◆ convertJSONToAttribute()

Attribute circt::convertJSONToAttribute ( MLIRContext *  context,
llvm::json::Value &  value,
llvm::json::Path  p 
)

Convert arbitrary JSON to an MLIR Attribute.

◆ createAffineToLoopSchedule()

std::unique_ptr< mlir::Pass > circt::createAffineToLoopSchedule ( )

Definition at line 646 of file AffineToLoopSchedule.cpp.

◆ createCalyxNativePass()

std::unique_ptr< mlir::Pass > circt::createCalyxNativePass ( )

Definition at line 163 of file CalyxNative.cpp.

◆ createCalyxToFSMPass()

std::unique_ptr< mlir::Pass > circt::createCalyxToFSMPass ( )

Definition at line 402 of file CalyxToFSM.cpp.

◆ createCalyxToHWPass()

std::unique_ptr< mlir::Pass > circt::createCalyxToHWPass ( )

Definition at line 481 of file CalyxToHW.cpp.

◆ createCFToHandshakePass()

std::unique_ptr< mlir::OperationPass< mlir::ModuleOp > > circt::createCFToHandshakePass ( bool  sourceConstants = false,
bool  disableTaskPipelining = false 
)

Definition at line 1755 of file CFToHandshake.cpp.

◆ createConvertCombToArithPass()

std::unique_ptr< OperationPass< ModuleOp > > circt::createConvertCombToArithPass ( )

Definition at line 315 of file CombToArith.cpp.

◆ createConvertFSMToSVPass()

std::unique_ptr< mlir::Pass > circt::createConvertFSMToSVPass ( )

Definition at line 743 of file FSMToSV.cpp.

◆ createConvertHWToBTOR2Pass() [1/2]

std::unique_ptr< mlir::Pass > circt::createConvertHWToBTOR2Pass ( )

Definition at line 961 of file HWToBTOR2.cpp.

References lec::outs().

◆ createConvertHWToBTOR2Pass() [2/2]

std::unique_ptr< mlir::Pass > circt::createConvertHWToBTOR2Pass ( llvm::raw_ostream &  os)

Definition at line 956 of file HWToBTOR2.cpp.

◆ createConvertHWToLLHDPass()

std::unique_ptr< OperationPass< ModuleOp > > circt::createConvertHWToLLHDPass ( )

Create a HW to LLHD conversion pass.

Definition at line 285 of file HWToLLHD.cpp.

◆ createConvertHWToLLVMPass()

std::unique_ptr< OperationPass< ModuleOp > > circt::createConvertHWToLLVMPass ( )

Create an HW to LLVM conversion pass.

Definition at line 690 of file HWToLLVM.cpp.

◆ createConvertHWToSystemCPass()

std::unique_ptr< OperationPass< ModuleOp > > circt::createConvertHWToSystemCPass ( )

Create a HW to SystemC dialects conversion pass.

Definition at line 338 of file HWToSystemC.cpp.

◆ createConvertLLHDToLLVMPass()

std::unique_ptr< OperationPass< ModuleOp > > circt::createConvertLLHDToLLVMPass ( )

Create an LLHD to LLVM conversion pass.

Definition at line 1926 of file LLHDToLLVM.cpp.

◆ createConvertMooreToCorePass()

std::unique_ptr< OperationPass< ModuleOp > > circt::createConvertMooreToCorePass ( )

Create an Moore to Comb/HW/LLHD conversion pass.

Create a Moore to core dialects conversion pass.

Definition at line 313 of file MooreToCore.cpp.

◆ createConvertToArcsPass()

std::unique_ptr< OperationPass< ModuleOp > > circt::createConvertToArcsPass ( const ConvertToArcsOptions &  options = {})

Definition at line 459 of file ConvertToArcs.cpp.

◆ createDCToHWPass()

std::unique_ptr< mlir::Pass > circt::createDCToHWPass ( )

Definition at line 865 of file DCToHW.cpp.

◆ createExportChiselInterfacePass() [1/2]

std::unique_ptr< mlir::Pass > circt::createExportChiselInterfacePass ( )

Definition at line 319 of file ExportChiselInterface.cpp.

References createExportChiselInterfacePass(), and lec::outs().

◆ createExportChiselInterfacePass() [2/2]

std::unique_ptr< mlir::Pass > circt::createExportChiselInterfacePass ( llvm::raw_ostream &  os)

◆ createExportSplitChiselInterfacePass()

std::unique_ptr< mlir::Pass > circt::createExportSplitChiselInterfacePass ( mlir::StringRef  outputDirectory = "./")

◆ createExportSplitVerilogPass()

std::unique_ptr<mlir::Pass> circt::createExportSplitVerilogPass ( llvm::StringRef  directory = "./")

◆ createExportVerilogPass() [1/3]

std::unique_ptr< mlir::Pass > circt::createExportVerilogPass ( )

Definition at line 6637 of file ExportVerilog.cpp.

References createExportVerilogPass(), and lec::outs().

◆ createExportVerilogPass() [2/3]

std::unique_ptr< mlir::Pass > circt::createExportVerilogPass ( llvm::raw_ostream &  os)

Definition at line 6633 of file ExportVerilog.cpp.

◆ createExportVerilogPass() [3/3]

std::unique_ptr< mlir::Pass > circt::createExportVerilogPass ( std::unique_ptr< llvm::raw_ostream >  os)

◆ createFlattenMemRefCallsPass()

std::unique_ptr< mlir::Pass > circt::createFlattenMemRefCallsPass ( )

Definition at line 377 of file FlattenMemRefs.cpp.

◆ createFlattenMemRefPass()

std::unique_ptr< mlir::Pass > circt::createFlattenMemRefPass ( )

Definition at line 373 of file FlattenMemRefs.cpp.

◆ createHandshakeAnalysisPass()

std::unique_ptr<mlir::OperationPass<mlir::ModuleOp> > circt::createHandshakeAnalysisPass ( )

◆ createHandshakeCanonicalizePass()

std::unique_ptr<mlir::OperationPass<handshake::FuncOp> > circt::createHandshakeCanonicalizePass ( )

◆ createHandshakeRemoveBlockPass()

std::unique_ptr< mlir::OperationPass< handshake::FuncOp > > circt::createHandshakeRemoveBlockPass ( )

Definition at line 1762 of file CFToHandshake.cpp.

◆ createHandshakeToDCPass()

std::unique_ptr< mlir::Pass > circt::createHandshakeToDCPass ( )

Definition at line 567 of file HandshakeToDC.cpp.

◆ createHandshakeToHWPass()

std::unique_ptr< mlir::Pass > circt::createHandshakeToHWPass ( )

Definition at line 1974 of file HandshakeToHW.cpp.

◆ createHWArithToHWPass()

std::unique_ptr< Pass > circt::createHWArithToHWPass ( )

Definition at line 445 of file HWArithToHW.cpp.

◆ createHWLowerInstanceChoicesPass()

std::unique_ptr< mlir::Pass > circt::createHWLowerInstanceChoicesPass ( )

Definition at line 109 of file HWLowerInstanceChoices.cpp.

◆ createInsertMergeBlocksPass()

std::unique_ptr< mlir::Pass > circt::createInsertMergeBlocksPass ( )

Definition at line 370 of file InsertMergeBlocks.cpp.

◆ createLegalizeAnonEnumsPass()

std::unique_ptr< mlir::Pass > circt::createLegalizeAnonEnumsPass ( )

Definition at line 203 of file LegalizeAnonEnums.cpp.

◆ createLoopScheduleToCalyxPass()

std::unique_ptr< OperationPass< ModuleOp > > circt::createLoopScheduleToCalyxPass ( )

Create a LoopSchedule to Calyx conversion pass.

Definition at line 1666 of file LoopScheduleToCalyx.cpp.

◆ createLowerArcToLLVMPass()

std::unique_ptr< OperationPass< ModuleOp > > circt::createLowerArcToLLVMPass ( )

Definition at line 655 of file LowerArcToLLVM.cpp.

◆ createLowerFirMemPass()

std::unique_ptr< Pass > circt::createLowerFirMemPass ( )

Definition at line 84 of file LowerFirMem.cpp.

◆ createLowerFIRRTLToHWPass()

std::unique_ptr< mlir::Pass > circt::createLowerFIRRTLToHWPass ( bool  enableAnnotationWarning = false,
bool  emitChiselAssertsAsSVA = false 
)

This is the pass constructor.

Definition at line 582 of file LowerToHW.cpp.

Referenced by circt::firtool::populateLowFIRRTLToHW().

◆ createLowerHWToSVPass()

std::unique_ptr< OperationPass< hw::HWModuleOp > > circt::createLowerHWToSVPass ( )

Definition at line 81 of file HWToSV.cpp.

◆ createLowerSeqFIRRTLInitToSV()

std::unique_ptr<mlir::Pass> circt::createLowerSeqFIRRTLInitToSV ( )

◆ createLowerSeqToSVPass()

std::unique_ptr< Pass > circt::createLowerSeqToSVPass ( const LowerSeqToSVOptions &  options = {})

Definition at line 633 of file SeqToSV.cpp.

Referenced by circt::firtool::populateHWToSV().

◆ createLowerSimToSVPass()

std::unique_ptr< Pass > circt::createLowerSimToSVPass ( )

Definition at line 206 of file SimToSV.cpp.

Referenced by circt::firtool::populateHWToSV().

◆ createLowerVerifToSVPass()

std::unique_ptr< OperationPass< hw::HWModuleOp > > circt::createLowerVerifToSVPass ( )

Create the Verif to SV conversion pass.

Definition at line 153 of file VerifToSV.cpp.

Referenced by circt::firtool::populateHWToSV().

◆ createMapArithToCombPass()

std::unique_ptr< mlir::Pass > circt::createMapArithToCombPass ( )

Definition at line 188 of file MapArithToComb.cpp.

◆ createMaterializeCalyxToFSMPass()

std::unique_ptr< mlir::Pass > circt::createMaterializeCalyxToFSMPass ( )

Definition at line 242 of file MaterializeFSM.cpp.

◆ createMaximizeSSAPass()

std::unique_ptr< mlir::Pass > circt::createMaximizeSSAPass ( )

Definition at line 242 of file MaximizeSSA.cpp.

Referenced by circt::ibis::loadIbisHighLevelPassPipeline().

◆ createPipelineToHWPass()

std::unique_ptr< mlir::Pass > circt::createPipelineToHWPass ( const PipelineToHWOptions &  options = {})

Create an SCF to Calyx conversion pass.

Definition at line 499 of file PipelineToHW.cpp.

◆ createPrepareForEmissionPass()

std::unique_ptr< mlir::Pass > circt::createPrepareForEmissionPass ( )

Definition at line 1279 of file PrepareForEmission.cpp.

◆ createRemoveGroupsFromFSMPass()

std::unique_ptr< mlir::Pass > circt::createRemoveGroupsFromFSMPass ( )

Definition at line 308 of file RemoveGroupsFromFSM.cpp.

◆ createSCFToCalyxPass()

std::unique_ptr< OperationPass< ModuleOp > > circt::createSCFToCalyxPass ( )

Create an SCF to Calyx conversion pass.

Definition at line 1867 of file SCFToCalyx.cpp.

◆ createSimpleCanonicalizerPass()

std::unique_ptr< Pass > circt::createSimpleCanonicalizerPass ( )

Create a simple canonicalizer pass.

Definition at line 15 of file Passes.cpp.

Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL(), circt::firtool::populateHWToSV(), and circt::firtool::populateLowFIRRTLToHW().

◆ createStripDebugInfoWithPredPass()

std::unique_ptr< Pass > circt::createStripDebugInfoWithPredPass ( const std::function< bool(mlir::Location)> &  pred)

Creates a pass to strip debug information from a function.

Definition at line 123 of file StripDebugInfoWithPred.cpp.

Referenced by detail::populatePrepareForExportVerilog().

◆ createTestApplyLoweringOptionPass() [1/2]

std::unique_ptr< mlir::Pass > circt::createTestApplyLoweringOptionPass ( )

Definition at line 41 of file ApplyLoweringOptions.cpp.

◆ createTestApplyLoweringOptionPass() [2/2]

std::unique_ptr<mlir::Pass> circt::createTestApplyLoweringOptionPass ( llvm::StringRef  options)

◆ debugFooter()

llvm::raw_ostream & circt::debugFooter ( int  width = 80)

Write a boilerplate footer to the debug stream to indicate that a pass has ended.

This produces text like the following:

===--------------------------------—===

Definition at line 35 of file Debug.cpp.

References lec::dbgs(), and width.

◆ debugHeader()

llvm::raw_ostream & circt::debugHeader ( llvm::StringRef  str,
int  width = 80 
)

Write a "header"-like string to the debug stream with a certain width.

This produces output like the following:

===- Hello World --------------------===

This is commonly used for generating a header in debug information. The format is modeled after LLVM/MLIR/CIRCT source file headers.

Definition at line 18 of file Debug.cpp.

References lec::dbgs(), and width.

Referenced by debugPassHeader().

◆ debugPassHeader()

llvm::raw_ostream & circt::debugPassHeader ( const mlir::Pass *  pass,
int  width = 80 
)

Write a boilerplate header for a pass to the debug stream.

This generates output like the following if the pass's name is "FooPass":

===- Running FooPass --------------—===

This is commonly used to generate a header in debug when a pass starts running.

Definition at line 31 of file Debug.cpp.

References debugHeader().

◆ doTypeConversion()

LogicalResult circt::doTypeConversion ( Operation *  op,
ValueRange  operands,
ConversionPatternRewriter &  rewriter,
const TypeConverter *  typeConverter 
)

◆ elideImplicitSSAName()

void circt::elideImplicitSSAName ( OpAsmPrinter &  printer,
Operation *  op,
DictionaryAttr  attrs,
SmallVectorImpl< StringRef > &  elides 
)

Check if the name attribute in attrs matches the SSA name of the operation's first result.

If it does, add name to elides. This is helpful during printing of attribute dictionaries in order to determine if the inclusion of the name field would be redundant.

Definition at line 81 of file CustomDirectiveImpl.cpp.

References isdigit.

Referenced by printFIRRTLImplicitSSAName(), and printImplicitSSAName().

◆ exportSplitVerilog()

mlir::LogicalResult circt::exportSplitVerilog ( mlir::ModuleOp  module,
llvm::StringRef  dirname 
)

Export a module containing HW, and SV dialect code, as one file per SV module.

Requires that the SV dialect is loaded in to the context.

Files are created in the directory indicated by dirname.

Referenced by mlirExportSplitVerilog().

◆ exportVerilog()

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

Export a module containing HW, and SV dialect code.

Requires that the SV dialect is loaded in to the context.

Referenced by mlirExportVerilog().

◆ extOrTruncZeroWidth()

APSInt circt::extOrTruncZeroWidth ( APSInt  value,
unsigned  width 
)

A safe version of APSInt::extOrTrunc that will NOT assert on zero-width signed APSInts.

Instead of asserting, this will zero extend.

Definition at line 22 of file APInt.cpp.

References width.

Referenced by getExtendedConstant().

◆ getCirctVersion()

const char* circt::getCirctVersion ( )

◆ getCirctVersionComment()

const char* circt::getCirctVersionComment ( )

◆ getConstantInt()

static std::optional<APInt> circt::getConstantInt ( Attribute  operand)
inlinestatic

Determine the integer value of a constant operand.

Definition at line 18 of file FoldUtils.h.

Referenced by isConstantOne(), and isConstantZero().

◆ getSlangVersion()

std::string circt::getSlangVersion ( )

Return a human-readable string describing the slang frontend version linked into CIRCT.

Definition at line 34 of file ImportVerilog.cpp.

◆ hash_value()

inline ::llvm::hash_code circt::hash_value ( const FieldRef fieldRef)

◆ importVerilog()

mlir::LogicalResult circt::importVerilog ( llvm::SourceMgr &  sourceMgr,
mlir::MLIRContext *  context,
mlir::TimingScope &  ts,
mlir::ModuleOp  module,
const ImportVerilogOptions options = nullptr 
)

Parse files in a source manager as Verilog source code and populate the given MLIR module with corresponding ops.

Referenced by registerFromVerilogTranslation().

◆ inferImplicitSSAName()

bool circt::inferImplicitSSAName ( OpAsmParser &  parser,
NamedAttrList &  attrs 
)

Ensure that attrs contains a name attribute by inferring its value from the SSA name of the operation's first result if necessary.

Returns true if a name was inferred, false if attrs already contained a name.

Definition at line 40 of file CustomDirectiveImpl.cpp.

References circt::calyx::direction::get(), and isdigit.

Referenced by parseFIRRTLImplicitSSAName(), and parseImplicitSSAName().

◆ insertMergeBlocks()

LogicalResult circt::insertMergeBlocks ( mlir::Region &  r,
mlir::ConversionPatternRewriter &  rewriter 
)

Insert additional blocks that serve as counterparts to the blocks that diverged the control flow.

Manually run merge block insertion on a region.

The resulting merge block tree is guaranteed to be a binary tree.

This transformation does treat loops like a single block and thus does not affect them.

This transformation does treat loops like a single block and thus does not affect them.

◆ isConstantOne()

static bool circt::isConstantOne ( Attribute  operand)
inlinestatic

Determine whether a constant operand is a one value.

Definition at line 34 of file FoldUtils.h.

References getConstantInt().

◆ isConstantZero()

static bool circt::isConstantZero ( Attribute  operand)
inlinestatic

Determine whether a constant operand is a zero value.

Definition at line 27 of file FoldUtils.h.

References getConstantInt().

Referenced by eraseIfPredFalse().

◆ isRegionSSAMaximized()

bool circt::isRegionSSAMaximized ( Region &  region)

Definition at line 57 of file MaximizeSSA.cpp.

References getDefiningBlock().

◆ isUniDimensional()

bool circt::isUniDimensional ( mlir::MemRefType  memref)

Referenced by hasMultiDimMemRef().

◆ isUselessName()

bool circt::isUselessName ( StringRef  name)

Return true if this is a possibly useless temporary name.

This method is FIRRTL-centric, dropping useless temporaries.

Definition at line 16 of file Naming.cpp.

Referenced by isNameBetter().

◆ maximizeSSA() [1/4]

LogicalResult circt::maximizeSSA ( Block *  block,
SSAMaximizationStrategy strategy,
PatternRewriter &  rewriter 
)

Considers all values defined by a block (i.e., block arguments and operation results within the block) for SSA maximization, following a provided strategy.

This removes any implicit dataflow of the selected values within the enclosing function. The function adds new block arguments wherever necessary to carry the values explicitly between blocks. Succeeds when it was possible to convert the selected values defined by the block into maximal SSA form.

Definition at line 166 of file MaximizeSSA.cpp.

References circt::SSAMaximizationStrategy::maximizeArgument(), circt::SSAMaximizationStrategy::maximizeOp(), and maximizeSSA().

◆ maximizeSSA() [2/4]

LogicalResult circt::maximizeSSA ( Operation *  op,
SSAMaximizationStrategy strategy,
PatternRewriter &  rewriter 
)

Considers all of an operation's results for SSA maximization, following a provided strategy.

This removes any implicit dataflow of the selected operation's results within the enclosing function. The function adds new block arguments wherever necessary to carry the results explicitly between blocks. Succeeds when it was possible to convert the selected operation's results into maximal SSA form.

Definition at line 154 of file MaximizeSSA.cpp.

References circt::SSAMaximizationStrategy::maximizeResult(), and maximizeSSA().

◆ maximizeSSA() [3/4]

LogicalResult circt::maximizeSSA ( Region &  region,
SSAMaximizationStrategy strategy,
PatternRewriter &  rewriter 
)

Considers all blocks within a region for SSA maximization, following a provided strategy.

This removes any implicit dataflow of the values defined by selected blocks within the region. The function adds new block arguments wherever necessary to carry the region's values explicitly between blocks. Succeeds when it was possible to convert all of the values defined by selected blocks into maximal SSA form.

Definition at line 184 of file MaximizeSSA.cpp.

References circt::SSAMaximizationStrategy::maximizeBlock(), and maximizeSSA().

◆ maximizeSSA() [4/4]

LogicalResult circt::maximizeSSA ( Value  value,
PatternRewriter &  rewriter 
)

Converts a single value within a function into maximal SSA form.

This removes any implicit dataflow of this specific value within the enclosing function. The function adds new block arguments wherever necessary to carry the value explicitly between blocks. Succeeds when it was possible to convert the value into maximal SSA form.

Definition at line 81 of file MaximizeSSA.cpp.

References addArgToTerminator(), and getDefiningBlock().

Referenced by maximizeSSA(), maximizeSSANoMem(), and circt::handshake::HandshakeLowering::setControlOnlyPath().

◆ parseImplicitSSAName() [1/2]

ParseResult circt::parseImplicitSSAName ( OpAsmParser &  parser,
NamedAttrList &  attrs 
)

Parse an attribute dictionary and ensure that it contains a name field by inferring its value from the SSA name of the operation's first result if necessary.

Definition at line 32 of file CustomDirectiveImpl.cpp.

References inferImplicitSSAName().

◆ parseImplicitSSAName() [2/2]

ParseResult circt::parseImplicitSSAName ( OpAsmParser &  parser,
StringAttr &  attr 
)

Parse an implicit SSA name string attribute.

If the name is not provided in the input text, its value is inferred from the SSA name of the operation's first result.

implicit-name ::= (name str-attr)?

Definition at line 14 of file CustomDirectiveImpl.cpp.

References isdigit.

◆ parseInputPortList()

ParseResult circt::parseInputPortList ( OpAsmParser &  parser,
SmallVectorImpl< OpAsmParser::UnresolvedOperand > &  inputs,
SmallVectorImpl< Type > &  inputTypes,
ArrayAttr &  inputNames 
)

Parse a list of instance input ports.

input-list ::= ( ( input-element (, input-element )* )? ) input-element ::= identifier : value : type

Definition at line 15 of file CustomDirectiveImpl.cpp.

References circt::calyx::direction::get(), inputs, and parseInputPort().

◆ parseKeywordBool()

ParseResult circt::parseKeywordBool ( OpAsmParser &  parser,
BoolAttr &  attr,
StringRef  trueKeyword,
StringRef  falseKeyword 
)

Parse a boolean as one of two keywords.

The trueKeyword will result in a true boolean; the falseKeyword will result in a false boolean.

labeled-bool ::= (true-label | false-label)

Definition at line 118 of file CustomDirectiveImpl.cpp.

References circt::calyx::direction::get().

◆ parseOptionalBinaryOpTypes()

ParseResult circt::parseOptionalBinaryOpTypes ( OpAsmParser &  parser,
Type &  lhs,
Type &  rhs 
)

Definition at line 95 of file CustomDirectiveImpl.cpp.

◆ parseOptionalParameterList()

ParseResult circt::parseOptionalParameterList ( OpAsmParser &  parser,
ArrayAttr &  parameters 
)

Parse an parameter list if present.

module-parameter-list ::= < parameter-decl (, parameter-decl)* > parameter-decl ::= identifier : type parameter-decl ::= identifier : type = attribute

Definition at line 93 of file CustomDirectiveImpl.cpp.

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

Referenced by parseHWModuleOp().

◆ parseOutputPortList()

ParseResult circt::parseOutputPortList ( OpAsmParser &  parser,
SmallVectorImpl< Type > &  resultTypes,
ArrayAttr &  resultNames 
)

Parse a list of instance output ports.

output-list ::= ( ( output-element (, output-element )* )? ) output-element ::= identifier : type

Definition at line 56 of file CustomDirectiveImpl.cpp.

References circt::calyx::direction::get().

◆ populateCombToArithConversionPatterns()

void circt::populateCombToArithConversionPatterns ( TypeConverter &  converter,
RewritePatternSet &  patterns 
)

◆ populateCombToLLVMConversionPatterns()

void circt::populateCombToLLVMConversionPatterns ( mlir::LLVMTypeConverter &  converter,
RewritePatternSet &  patterns 
)

Get the Comb to LLVM conversion patterns.

◆ populateCombToSMTConversionPatterns()

void circt::populateCombToSMTConversionPatterns ( TypeConverter &  converter,
RewritePatternSet &  patterns 
)

Get the HW to SMT conversion patterns.

Definition at line 232 of file CombToSMT.cpp.

◆ populateGenericReducePatterns()

void circt::populateGenericReducePatterns ( MLIRContext *  context,
ReducePatternSet patterns 
)

Populate reduction patterns that are not specific to certain operations or dialects.

Definition at line 56 of file GenericReductions.cpp.

References createSimpleCanonicalizerPass().

◆ populateHWArithToHWConversionPatterns()

void circt::populateHWArithToHWConversionPatterns ( HWArithToHWTypeConverter typeConverter,
RewritePatternSet &  patterns 
)

Get the HWArith to HW conversion patterns.

Definition at line 402 of file HWArithToHW.cpp.

◆ populateHWToLLVMConversionPatterns()

void circt::populateHWToLLVMConversionPatterns ( mlir::LLVMTypeConverter &  converter,
RewritePatternSet &  patterns,
Namespace globals,
DenseMap< std::pair< Type, ArrayAttr >, mlir::LLVM::GlobalOp > &  constAggregateGlobalsMap 
)

Get the HW to LLVM conversion patterns.

◆ populateHWToLLVMTypeConversions()

void circt::populateHWToLLVMTypeConversions ( mlir::LLVMTypeConverter &  converter)

Get the HW to LLVM type conversions.

◆ populateHWToSMTConversionPatterns()

void circt::populateHWToSMTConversionPatterns ( TypeConverter &  converter,
RewritePatternSet &  patterns 
)

Get the HW to SMT conversion patterns.

Definition at line 118 of file HWToSMT.cpp.

◆ populateHWToSMTTypeConverter()

void circt::populateHWToSMTTypeConverter ( TypeConverter &  converter)

Get the HW to SMT type conversions.

Definition at line 52 of file HWToSMT.cpp.

References builder, circt::calyx::direction::get(), inputs, and width.

◆ populateLLHDToLLVMConversionPatterns()

void circt::populateLLHDToLLVMConversionPatterns ( mlir::LLVMTypeConverter &  converter,
RewritePatternSet &  patterns,
size_t &  sigCounter,
size_t &  regCounter 
)

Get the LLHD to LLVM conversion patterns.

◆ populateLLHDToLLVMTypeConversions()

void circt::populateLLHDToLLVMTypeConversions ( mlir::LLVMTypeConverter &  converter)

Get the LLHD to LLVM type conversions.

◆ populateVerifToSMTConversionPatterns()

void circt::populateVerifToSMTConversionPatterns ( TypeConverter &  converter,
RewritePatternSet &  patterns 
)

Get the Verif to SMT conversion patterns.

Definition at line 162 of file VerifToSMT.cpp.

◆ preprocessVerilog()

mlir::LogicalResult circt::preprocessVerilog ( llvm::SourceMgr &  sourceMgr,
mlir::MLIRContext *  context,
mlir::TimingScope &  ts,
llvm::raw_ostream &  os,
const ImportVerilogOptions options = nullptr 
)

Run the files in a source manager through Slang's Verilog preprocessor and emit the result to the given output stream.

◆ printImplicitSSAName() [1/2]

void circt::printImplicitSSAName ( OpAsmPrinter &  p,
Operation *  op,
DictionaryAttr  attrs,
ArrayRef< StringRef >  extraElides = {} 
)

Print an attribute dictionary and elide the name field if its value matches the SSA name of the operation's first result.

Definition at line 73 of file CustomDirectiveImpl.cpp.

References elideImplicitSSAName().

◆ printImplicitSSAName() [2/2]

void circt::printImplicitSSAName ( OpAsmPrinter &  p,
Operation *  op,
StringAttr  attr 
)

Print an implicit SSA name string attribute.

If the given string attribute does not match the SSA name of the operation's first result, the name is explicitly printed. Prints a leading space in front of name if any name is present.

implicit-name ::= (name str-attr)?

Definition at line 55 of file CustomDirectiveImpl.cpp.

References isdigit.

◆ printInputPortList()

void circt::printInputPortList ( OpAsmPrinter &  p,
Operation *  op,
OperandRange  inputs,
TypeRange  inputTypes,
ArrayAttr  inputNames 
)

Print a list of instance input ports.

Definition at line 42 of file CustomDirectiveImpl.cpp.

References inputs.

◆ printKeywordBool()

void circt::printKeywordBool ( OpAsmPrinter &  printer,
Operation *  op,
BoolAttr  attr,
StringRef  trueKeyword,
StringRef  falseKeyword 
)

Print a boolean as one of two keywords.

If the boolean is true, the trueKeyword is used; if it is false, the falseKeyword is used.

labeled-bool ::= (true-label | false-label)

Definition at line 133 of file CustomDirectiveImpl.cpp.

◆ printOptionalBinaryOpTypes()

void circt::printOptionalBinaryOpTypes ( OpAsmPrinter &  p,
Operation *  op,
Type  lhs,
Type  rhs 
)

Print/parse binary operands type only when types are different.

optional-bin-op-types := type($lhs) (, type($rhs))?

Definition at line 110 of file CustomDirectiveImpl.cpp.

◆ printOptionalParameterList()

void circt::printOptionalParameterList ( OpAsmPrinter &  p,
Operation *  op,
ArrayAttr  parameters 
)

Print a parameter list for a module or instance.

Definition at line 126 of file CustomDirectiveImpl.cpp.

Referenced by printModuleOp().

◆ printOutputPortList()

void circt::printOutputPortList ( OpAsmPrinter &  p,
Operation *  op,
TypeRange  resultTypes,
ArrayAttr  resultNames 
)

Print a list of instance output ports.

Definition at line 80 of file CustomDirectiveImpl.cpp.

◆ registerAllDialects()

void circt::registerAllDialects ( mlir::DialectRegistry &  registry)
inline

Definition at line 51 of file InitAllDialects.h.

◆ registerAllPasses()

void circt::registerAllPasses ( )
inline

◆ registerAllTranslations()

void circt::registerAllTranslations ( )
inline

◆ registerFromVerilogTranslation()

void circt::registerFromVerilogTranslation ( )

Register the import-verilog MLIR translation.

Entry point as an MLIR translation.

Definition at line 376 of file ImportVerilog.cpp.

References circt::calyx::direction::get(), and importVerilog().

◆ sextZeroWidth()

APInt circt::sextZeroWidth ( APInt  value,
unsigned  width 
)

A safe version of APInt::sext that will NOT assert on zero-width signed APSInts.

Instead of asserting, this will zero extend.

Definition at line 18 of file APInt.cpp.

References width.

Variable Documentation

◆ circtBugReportMsg

constexpr const char* circt::circtBugReportMsg
constexpr
Initial value:
=
"PLEASE submit a bug report to https://github.com/llvm/circt and include "
"the crash backtrace.\n"

A generic bug report message for CIRCT-related projects.

Definition at line 11 of file Version.h.