ilang  1.1.4
ILAng: A Modeling and Verification Platform for SoCs
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros
u_abs_knob.h
Go to the documentation of this file.
1 
4 #ifndef ILANG_ILA_MNGR_U_ABS_KNOB_H__
5 #define ILANG_ILA_MNGR_U_ABS_KNOB_H__
6 
8 
10 namespace ilang {
11 
13 namespace absknob {
14 /****************************************************************************/
16 void InsertVar(const ExprPtr& e, ExprSet& vars);
18 ExprSet GetVar(const ExprPtr& e);
19 
20 /****************************************************************************/
22 void InsertStt(const InstrCnstPtr instrs, ExprSet& stts);
24 void InsertSttTree(const InstrCnstPtr instrs, ExprSet& stts);
25 
26 /****************************************************************************/
28 void InsertVar(const InstrLvlAbsCnstPtr& m, ExprSet& vars);
30 void InsertStt(const InstrLvlAbsCnstPtr& m, ExprSet& stts);
32 void InsertInp(const InstrLvlAbsCnstPtr& m, ExprSet& inps);
34 void InsertVarTree(const InstrLvlAbsCnstPtr& top, ExprSet& vars);
36 void InsertSttTree(const InstrLvlAbsCnstPtr& top, ExprSet& stts);
38 void InsertInpTree(const InstrLvlAbsCnstPtr& top, ExprSet& inps);
39 
41 ExprSet GetVar(const InstrLvlAbsCnstPtr& m);
43 ExprSet GetStt(const InstrLvlAbsCnstPtr& m);
45 ExprSet GetInp(const InstrLvlAbsCnstPtr& m);
47 ExprSet GetVarTree(const InstrLvlAbsCnstPtr& top);
49 ExprSet GetSttTree(const InstrLvlAbsCnstPtr& top);
51 ExprSet GetInpTree(const InstrLvlAbsCnstPtr& top);
52 
54 void InsertInstr(const InstrLvlAbsCnstPtr& m, InstrVec& instrs);
56 void InsertInstrTree(const InstrLvlAbsCnstPtr& top, InstrVec& instrs);
57 
59 InstrVec GetInstr(const InstrLvlAbsCnstPtr& m);
61 InstrVec GetInstrTree(const InstrLvlAbsCnstPtr& top);
62 
63 /****************************************************************************/
66 ExprPtr Rewrite(const ExprPtr& e, const ExprMap& rule);
67 
69 void RewriteInstr(const InstrCnstPtr instr_src, const InstrPtr& instr_dst,
70  const ExprMap& expr_map);
71 
79 void FlattenIla(const InstrLvlAbsPtr& ila_ptr_);
80 
83 InstrLvlAbsPtr ExtrDeptModl(const InstrPtr& instr, const std::string& name);
84 
86 InstrLvlAbsPtr CopyIlaTree(const InstrLvlAbsCnstPtr& src,
87  const std::string& dst_name);
88 
89 /****************************************************************************/
91 void DuplInp(const InstrLvlAbsCnstPtr& src, const InstrLvlAbsPtr& dst,
92  ExprMap& expr_map);
94 void DuplStt(const InstrLvlAbsCnstPtr& src, const InstrLvlAbsPtr& dst,
95  ExprMap& expr_map);
97 ExprPtr DuplFetch(const InstrLvlAbsCnstPtr& src, const InstrLvlAbsPtr& dst,
98  const ExprMap& expr_map);
100 ExprPtr DuplValid(const InstrLvlAbsCnstPtr& src, const InstrLvlAbsPtr& dst,
101  const ExprMap& expr_map);
103 void DuplInit(const InstrLvlAbsCnstPtr& src, const InstrLvlAbsPtr& dst,
104  const ExprMap& expr_map);
106 InstrPtr DuplInstr(const InstrCnstPtr instr_src, const InstrLvlAbsPtr& dst,
107  const ExprMap& expr_map, const CnstIlaMap& ila_map);
109 void DuplInstrSeq(const InstrLvlAbsCnstPtr& src, const InstrLvlAbsPtr& dst);
110 
111 }; // namespace absknob
112 
113 } // namespace ilang
114 
115 #endif // ILANG_ILA_MNGR_U_ABS_KNOB_H__
Expr::ExprPtr ExprPtr
Pointer type for normal use of Expr.
Definition: expr.h:138
std::vector< InstrPtr > InstrVec
Type for storing a set of Instr.
Definition: instr.h:136
InstrLvlAbs::InstrLvlAbsCnstPtr InstrLvlAbsCnstPtr
Pointer type for read-only usage of InstrLvlAbs.
Definition: instr_lvl_abs.h:328
Instr::InstrCnstPtr InstrCnstPtr
Pointer type for read-only use of Instr.
Definition: instr.h:134
std::unordered_set< ExprPtr, ExprHash > ExprSet
Type for storing a set of Expr.
Definition: expr.h:153
Instr::InstrPtr InstrPtr
Pointer type for normal use of Instr.
Definition: instr.h:132
std::map< InstrLvlAbsCnstPtr, InstrLvlAbsPtr > CnstIlaMap
Type for storing a mapping from constant ILA ptr to ILA ptr.
Definition: instr_lvl_abs.h:330
std::unordered_map< const ExprPtr, const ExprPtr, ExprHash > ExprMap
Type for mapping between Expr.
Definition: expr.h:151
InstrLvlAbs::InstrLvlAbsPtr InstrLvlAbsPtr
Pointer type for normal use of InstrLvlAbs.
Definition: instr_lvl_abs.h:326