|
CIRCT 23.0.0git
|
#include "ImportVerilogInternals.h"#include "circt/Dialect/Moore/MooreTypes.h"#include "mlir/IR/Operation.h"#include "mlir/IR/Value.h"#include "slang/ast/EvalContext.h"#include "slang/ast/SystemSubroutine.h"#include "slang/ast/types/AllTypes.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. | |
| template<typename OpTy > | |
| static Value | convertRealMathBI (Context &context, Location loc, StringRef name, std::span< const slang::ast::Expression *const > args) |
| Helper function to convert real math builtin functions that take exactly one argument. | |
| static mlir::Operation * | resolve (Context &context, mlir::SymbolRefAttr sym) |
|
static |
Helper function to convert real math builtin functions that take exactly one argument.
Definition at line 2968 of file Expressions.cpp.
|
static |
Convert a Slang SVInt to a CIRCT FVInt.
Definition at line 24 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 39 of file Expressions.cpp.
References context.
|
static |
Get the currently active timescale as an integer number of femtoseconds.
Definition at line 85 of file Expressions.cpp.
References assert(), and context.
Referenced by circt::ImportVerilog::Context::materializeConversion(), 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 2674 of file Expressions.cpp.
References assert(), context, 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 2711 of file Expressions.cpp.
References assert(), circt::moore::PackedType::containsTimeType(), context, 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 2747 of file Expressions.cpp.
References context.
Referenced by circt::ImportVerilog::Context::materializeConversion().
|
static |
Definition at line 3281 of file Expressions.cpp.
References context.
Referenced by verilator.Verilator::_find_verilator_root(), pytest::_run_hw_script(), tests.conftest::get_runtime_root(), circt::ImportVerilog::Context::getAncestorClassWithProperty(), LowerXMRPass::handleRefResolve(), circt::ImportVerilog::Context::isClassDerivedFrom(), simulator.Simulator::run_proc(), and LowerXMRPass::runOnOperation().
|
static |
Definition at line 106 of file Expressions.cpp.
References context.