|
CIRCT 22.0.0git
|
#include "ImportVerilogInternals.h"#include "slang/ast/EvalContext.h"#include "slang/ast/SystemSubroutine.h"#include "slang/syntax/AllSyntax.h"#include "llvm/ADT/ScopeExit.h"
Go to the source code of this file.
Functions | |
| static FVInt | convertSVIntToFVInt (const slang::SVInt &svint) |
Convert a Slang SVInt to a CIRCT FVInt. | |
| static Value | getSelectIndex (Context &context, Location loc, Value index, const slang::ConstantRange &range) |
Map an index into an array, with bounds range, to a bit offset of the underlying bit storage. | |
| static uint64_t | getTimeScaleInFemtoseconds (Context &context) |
| Get the currently active timescale as an integer number of femtoseconds. | |
| static Value | visitClassProperty (Context &context, const slang::ast::ClassPropertySymbol &expr) |
| static Value | materializePackedToSBVConversion (Context &context, Value value, Location loc) |
Create the necessary operations to convert from a PackedType to the corresponding simple bit vector IntType. | |
| static Value | materializeSBVToPackedConversion (Context &context, moore::PackedType packedType, Value value, Location loc) |
Create the necessary operations to convert from a simple bit vector IntType to an equivalent PackedType. | |
| static mlir::Value | maybeUpcastHandle (Context &context, mlir::Value actualHandle, moore::ClassHandleType expectedHandleTy) |
| Check whether the actual handle is a subclass of another handle type and return a properly upcast version if so. | |
| static mlir::Operation * | resolve (Context &context, mlir::SymbolRefAttr sym) |
|
static |
Convert a Slang SVInt to a CIRCT FVInt.
Definition at line 20 of file Expressions.cpp.
Referenced by circt::ImportVerilog::Context::materializeFixedSizeUnpackedArrayType(), and circt::ImportVerilog::Context::materializeSVInt().
|
static |
Map an index into an array, with bounds range, to a bit offset of the underlying bit storage.
This is a dynamic version of slang::ConstantRange::translateIndex.
Definition at line 35 of file Expressions.cpp.
References circt::ImportVerilog::Context::builder, and circt::ImportVerilog::Context::materializeConversion().
|
static |
Get the currently active timescale as an integer number of femtoseconds.
Definition at line 81 of file Expressions.cpp.
References assert(), and circt::ImportVerilog::Context::timeScale.
Referenced by materializePackedToSBVConversion(), and materializeSBVToPackedConversion().
|
static |
Create the necessary operations to convert from a PackedType to the corresponding simple bit vector IntType.
This will apply special handling to time values, which requires scaling by the local timescale.
Definition at line 2169 of file Expressions.cpp.
References assert(), circt::ImportVerilog::Context::builder, circt::moore::FourValued, getTimeScaleInFemtoseconds(), and circt::moore::isIntType().
Referenced by circt::ImportVerilog::Context::materializeConversion().
|
static |
Create the necessary operations to convert from a simple bit vector IntType to an equivalent PackedType.
This will apply special handling to time values, which requires scaling by the local timescale.
Definition at line 2206 of file Expressions.cpp.
References assert(), circt::ImportVerilog::Context::builder, circt::moore::PackedType::containsTimeType(), circt::moore::FourValued, circt::moore::PackedType::getSimpleBitVector(), getTimeScaleInFemtoseconds(), and circt::moore::isIntType().
Referenced by circt::ImportVerilog::Context::materializeConversion().
|
static |
Check whether the actual handle is a subclass of another handle type and return a properly upcast version if so.
Definition at line 2242 of file Expressions.cpp.
References circt::ImportVerilog::Context::builder, and circt::ImportVerilog::Context::isClassDerivedFrom().
Referenced by circt::ImportVerilog::Context::materializeConversion().
|
static |
Definition at line 2544 of file Expressions.cpp.
References circt::ImportVerilog::Context::intoModuleOp, and circt::ImportVerilog::Context::symbolTable.
Referenced by circt::ImportVerilog::Context::getAncestorClassWithProperty(), LowerXMRPass::handleRefResolve(), circt::ImportVerilog::Context::isClassDerivedFrom(), and LowerXMRPass::runOnOperation().
|
static |
Definition at line 102 of file Expressions.cpp.
References circt::ImportVerilog::Context::builder, circt::ImportVerilog::Context::convertLocation(), circt::ImportVerilog::Context::convertType(), circt::ImportVerilog::Context::getAncestorClassWithProperty(), circt::ImportVerilog::Context::getImplicitThisRef(), and circt::ImportVerilog::Context::materializeConversion().