ilasynth  1.0
ILASynth: Template-based ILA Synthesis Engine
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Static Private Member Functions | Private Attributes | Friends | List of all members
ilasynth::BitvectorOp Class Reference

#include <bitvec.hpp>

Inheritance diagram for ilasynth::BitvectorOp:
ilasynth::BitvectorExpr ilasynth::Node

Public Types

enum  Arity { UNARY, BINARY, TERNARY, NARY }
 
enum  Op {
  INVALID, NEGATE, COMPLEMENT, LROTATE,
  RROTATE, Z_EXT, S_EXT, EXTRACT,
  ADD, SUB, AND, OR,
  XOR, XNOR, NAND, NOR,
  SDIV, UDIV, SREM, UREM,
  SMOD, SHL, LSHR, ASHR,
  MUL, CONCAT, GET_BIT, READMEM,
  READMEMBLOCK, IF, APPLY_FUNC
}
 

Public Member Functions

 BitvectorOp (Op op, const nptr_t &n1)
 
 BitvectorOp (Op op, const nptr_t &n1, int param)
 
 BitvectorOp (Op op, const nptr_t &n1, int p1, int p2)
 
 BitvectorOp (Op op, const nptr_t &n1, const nptr_t &n2)
 
 BitvectorOp (Op op, const nptr_t &n1, const nptr_t &n2, int blocks, endianness_t e)
 
 BitvectorOp (Op op, nptr_vec_t &args_)
 
 BitvectorOp (const BitvectorOp *other, nptr_vec_t &args_)
 
virtual ~BitvectorOp ()
 
virtual Nodeclone () const
 
virtual bool equal (const Node *that) const
 
virtual std::ostream & write (std::ostream &out) const
 
virtual unsigned nArgs () const
 
virtual nptr_t arg (unsigned i) const
 
Op getOp () const
 
unsigned nParams () const
 
int param (unsigned i) const
 
- Public Member Functions inherited from ilasynth::BitvectorExpr
 BitvectorExpr (int width)
 
 BitvectorExpr (NodeType t)
 
virtual ~BitvectorExpr ()
 
- Public Member Functions inherited from ilasynth::Node
 Node ()
 
 Node (NodeType t)
 
virtual ~Node ()
 
std::string & getName ()
 
const std::string & getName () const
 
const std::string & getRefName () const
 
void setRefName (const std::string &refN)
 
int getId ()
 
NodeType getType ()
 
virtual py::object getValue () const
 
virtual bool isConstant () const
 
template<class F >
void depthFirstVisit (F &func) const
 
void getSupportVars (nodeset_t &sup)
 
void visit (NodeVisitorI &vi)
 
bool hasSynthesisConstructs () const
 

Public Attributes

enum ilasynth::BitvectorOp::Arity arity
 
enum ilasynth::BitvectorOp::Op op
 
- Public Attributes inherited from ilasynth::Node
NodeType type
 

Static Public Attributes

static const std::string operatorNames []
 

Static Private Member Functions

static bool isUnary (Op op)
 
static bool isBinary (Op op)
 
static bool isTernary (Op op)
 
static bool isNary (Op op)
 
static int getUnaryResultWidth (Op op, const nptr_t &n)
 
static int getBinaryResultWidth (Op op, const nptr_t &n1, const nptr_t &n2)
 
static int getBinaryResultWidth (Op op, const nptr_t &n1, const nptr_t &n2, int param)
 
static int getBinaryResultWidth (Op op, const nptr_t &n1, int param)
 
static int getNaryResultWidth (Op op, nptr_vec_t &args)
 
static int getNaryResultWidth (Op op, nptr_vec_t &args, std::vector< int > &params)
 
static bool checkUnaryOpWidth (Op op, const nptr_t &n, int width)
 
static int checkBinaryOpWidth (Op op, const nptr_t &n1, const nptr_t &n2, int width)
 
static int checkBinaryOpWidth (Op op, const nptr_t &n1, const nptr_t &n2, int param, int width)
 
static int checkBinaryOpWidth (Op op, const nptr_t &n1, int param, int width)
 
static int checkNaryOpWidth (Op op, nptr_vec_t &args, int width)
 
static int checkNaryOpWidth (Op op, nptr_vec_t &args, std::vector< int > &params, int width)
 

Private Attributes

nptr_vec_t args
 
std::vector< int > params
 

Friends

class FuncReduction
 

Additional Inherited Members

- Static Public Member Functions inherited from ilasynth::Node
static nptr_t ite (const nptr_t &cond, const nptr_t &t, const nptr_t &f)
 
- Static Protected Member Functions inherited from ilasynth::Node
static void _getSupportVarsHelper (nodeset_t &supp, const Node *n)
 
- Protected Attributes inherited from ilasynth::Node
std::string name
 
std::string refName
 
const int id
 
bool hash_inited
 
size_t hash_value
 

Member Enumeration Documentation

◆ Arity

Enumerator
UNARY 
BINARY 
TERNARY 
NARY 

◆ Op

Enumerator
INVALID 
NEGATE 
COMPLEMENT 
LROTATE 
RROTATE 
Z_EXT 
S_EXT 
EXTRACT 
ADD 
SUB 
AND 
OR 
XOR 
XNOR 
NAND 
NOR 
SDIV 
UDIV 
SREM 
UREM 
SMOD 
SHL 
LSHR 
ASHR 
MUL 
CONCAT 
GET_BIT 
READMEM 
READMEMBLOCK 
IF 
APPLY_FUNC 

Constructor & Destructor Documentation

◆ BitvectorOp() [1/7]

ilasynth::BitvectorOp::BitvectorOp ( Op  op,
const nptr_t n1 
)

◆ BitvectorOp() [2/7]

ilasynth::BitvectorOp::BitvectorOp ( Op  op,
const nptr_t n1,
int  param 
)

◆ BitvectorOp() [3/7]

ilasynth::BitvectorOp::BitvectorOp ( Op  op,
const nptr_t n1,
int  p1,
int  p2 
)

◆ BitvectorOp() [4/7]

ilasynth::BitvectorOp::BitvectorOp ( Op  op,
const nptr_t n1,
const nptr_t n2 
)

◆ BitvectorOp() [5/7]

ilasynth::BitvectorOp::BitvectorOp ( Op  op,
const nptr_t n1,
const nptr_t n2,
int  blocks,
endianness_t  e 
)

◆ BitvectorOp() [6/7]

ilasynth::BitvectorOp::BitvectorOp ( Op  op,
nptr_vec_t args_ 
)

◆ BitvectorOp() [7/7]

ilasynth::BitvectorOp::BitvectorOp ( const BitvectorOp other,
nptr_vec_t args_ 
)

◆ ~BitvectorOp()

virtual ilasynth::BitvectorOp::~BitvectorOp ( )
virtual

Member Function Documentation

◆ arg()

virtual nptr_t ilasynth::BitvectorOp::arg ( unsigned  i) const
virtual

Reimplemented from ilasynth::Node.

◆ checkBinaryOpWidth() [1/3]

static int ilasynth::BitvectorOp::checkBinaryOpWidth ( Op  op,
const nptr_t n1,
const nptr_t n2,
int  width 
)
staticprivate

◆ checkBinaryOpWidth() [2/3]

static int ilasynth::BitvectorOp::checkBinaryOpWidth ( Op  op,
const nptr_t n1,
const nptr_t n2,
int  param,
int  width 
)
staticprivate

◆ checkBinaryOpWidth() [3/3]

static int ilasynth::BitvectorOp::checkBinaryOpWidth ( Op  op,
const nptr_t n1,
int  param,
int  width 
)
staticprivate

◆ checkNaryOpWidth() [1/2]

static int ilasynth::BitvectorOp::checkNaryOpWidth ( Op  op,
nptr_vec_t args,
int  width 
)
staticprivate

◆ checkNaryOpWidth() [2/2]

static int ilasynth::BitvectorOp::checkNaryOpWidth ( Op  op,
nptr_vec_t args,
std::vector< int > &  params,
int  width 
)
staticprivate

◆ checkUnaryOpWidth()

static bool ilasynth::BitvectorOp::checkUnaryOpWidth ( Op  op,
const nptr_t n,
int  width 
)
staticprivate

◆ clone()

virtual Node* ilasynth::BitvectorOp::clone ( ) const
virtual

Reimplemented from ilasynth::Node.

◆ equal()

virtual bool ilasynth::BitvectorOp::equal ( const Node that) const
virtual

Reimplemented from ilasynth::Node.

◆ getBinaryResultWidth() [1/3]

static int ilasynth::BitvectorOp::getBinaryResultWidth ( Op  op,
const nptr_t n1,
const nptr_t n2 
)
staticprivate

◆ getBinaryResultWidth() [2/3]

static int ilasynth::BitvectorOp::getBinaryResultWidth ( Op  op,
const nptr_t n1,
const nptr_t n2,
int  param 
)
staticprivate

◆ getBinaryResultWidth() [3/3]

static int ilasynth::BitvectorOp::getBinaryResultWidth ( Op  op,
const nptr_t n1,
int  param 
)
staticprivate

◆ getNaryResultWidth() [1/2]

static int ilasynth::BitvectorOp::getNaryResultWidth ( Op  op,
nptr_vec_t args 
)
staticprivate

◆ getNaryResultWidth() [2/2]

static int ilasynth::BitvectorOp::getNaryResultWidth ( Op  op,
nptr_vec_t args,
std::vector< int > &  params 
)
staticprivate

◆ getOp()

Op ilasynth::BitvectorOp::getOp ( ) const
inline

◆ getUnaryResultWidth()

static int ilasynth::BitvectorOp::getUnaryResultWidth ( Op  op,
const nptr_t n 
)
staticprivate

◆ isBinary()

static bool ilasynth::BitvectorOp::isBinary ( Op  op)
inlinestaticprivate

◆ isNary()

static bool ilasynth::BitvectorOp::isNary ( Op  op)
inlinestaticprivate

◆ isTernary()

static bool ilasynth::BitvectorOp::isTernary ( Op  op)
inlinestaticprivate

◆ isUnary()

static bool ilasynth::BitvectorOp::isUnary ( Op  op)
inlinestaticprivate

◆ nArgs()

virtual unsigned ilasynth::BitvectorOp::nArgs ( ) const
virtual

Reimplemented from ilasynth::Node.

◆ nParams()

unsigned ilasynth::BitvectorOp::nParams ( ) const

◆ param()

int ilasynth::BitvectorOp::param ( unsigned  i) const

◆ write()

virtual std::ostream& ilasynth::BitvectorOp::write ( std::ostream &  out) const
virtual

Reimplemented from ilasynth::Node.

Friends And Related Function Documentation

◆ FuncReduction

friend class FuncReduction
friend

Member Data Documentation

◆ args

nptr_vec_t ilasynth::BitvectorOp::args
private

◆ arity

enum ilasynth::BitvectorOp::Arity ilasynth::BitvectorOp::arity

◆ op

enum ilasynth::BitvectorOp::Op ilasynth::BitvectorOp::op

◆ operatorNames

const std::string ilasynth::BitvectorOp::operatorNames[]
static

◆ params

std::vector<int> ilasynth::BitvectorOp::params
private

The documentation for this class was generated from the following file: