CIRCT 22.0.0git
Loading...
Searching...
No Matches
Functions
Structure.cpp File Reference
#include "ImportVerilogInternals.h"
#include "slang/ast/Compilation.h"
#include "slang/ast/symbols/ClassSymbols.h"
#include "llvm/ADT/ScopeExit.h"
Include dependency graph for Structure.cpp:

Go to the source code of this file.

Functions

static void guessNamespacePrefix (const slang::ast::Symbol &symbol, SmallString< 64 > &prefix)
 
static moore::ProcedureKind convertProcedureKind (slang::ast::ProceduralBlockKind kind)
 
static moore::NetKind convertNetKind (slang::ast::NetType::NetKind kind)
 
static FunctionType getFunctionSignature (Context &context, const slang::ast::SubroutineSymbol &subroutine, llvm::SmallVectorImpl< Type > &extraParams)
 Helper function to generate the function signature from a SubroutineSymbol and optional extra arguments (used for this argument)
 
static LogicalResult rewriteCallSitesToPassCaptures (mlir::func::FuncOp callee, ArrayRef< Value > captures)
 Special case handling for recursive functions with captures; this function fixes the in-body call of the recursive function with the captured arguments.
 

Function Documentation

◆ convertNetKind()

static moore::NetKind convertNetKind ( slang::ast::NetType::NetKind  kind)
static

Definition at line 218 of file Structure.cpp.

◆ convertProcedureKind()

static moore::ProcedureKind convertProcedureKind ( slang::ast::ProceduralBlockKind  kind)
static

Definition at line 200 of file Structure.cpp.

◆ getFunctionSignature()

static FunctionType getFunctionSignature ( Context context,
const slang::ast::SubroutineSymbol &  subroutine,
llvm::SmallVectorImpl< Type > &  extraParams 
)
static

Helper function to generate the function signature from a SubroutineSymbol and optional extra arguments (used for this argument)

Definition at line 1068 of file Structure.cpp.

References circt::ImportVerilog::Context::convertType(), and circt::ImportVerilog::Context::getContext().

Referenced by circt::ImportVerilog::Context::declareCallableImpl().

◆ guessNamespacePrefix()

static void guessNamespacePrefix ( const slang::ast::Symbol &  symbol,
SmallString< 64 > &  prefix 
)
static

◆ rewriteCallSitesToPassCaptures()

static LogicalResult rewriteCallSitesToPassCaptures ( mlir::func::FuncOp  callee,
ArrayRef< Value >  captures 
)
static

Special case handling for recursive functions with captures; this function fixes the in-body call of the recursive function with the captured arguments.

Definition at line 1140 of file Structure.cpp.

Referenced by circt::ImportVerilog::Context::convertFunction().