Loading [MathJax]/extensions/tex2jax.js
CIRCT 21.0.0git
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
Expressions.cpp File Reference
#include "ImportVerilogInternals.h"
#include "slang/ast/SystemSubroutine.h"
#include "slang/syntax/AllSyntax.h"
Include dependency graph for Expressions.cpp:

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 (OpBuilder &builder, 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.
 

Function Documentation

◆ convertSVIntToFVInt()

static FVInt convertSVIntToFVInt ( const slang::SVInt &  svint)
static

Convert a Slang SVInt to a CIRCT FVInt.

Definition at line 18 of file Expressions.cpp.

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

◆ getSelectIndex()

static Value getSelectIndex ( OpBuilder &  builder,
Location  loc,
Value  index,
const slang::ConstantRange &  range 
)
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 33 of file Expressions.cpp.