45 inst(inst_), thread(thread_), let(let_)
50 unsigned int num_defns =
let->
defns.size();
89 uint64_t arg_value =
arg->
eval(context);
93 case Enums::timingExprSizeInBits:
99 case Enums::timingExprNot:
100 ret = arg_value != 0;
102 case Enums::timingExprInvert:
105 case Enums::timingExprSignExtend32To64:
106 ret =
static_cast<int64_t
>(
107 static_cast<int32_t
>(arg_value));
109 case Enums::timingExprAbs:
110 if (
static_cast<int64_t
>(arg_value) < 0)
124 uint64_t left_value =
left->
eval(context);
125 uint64_t right_value =
right->
eval(context);
129 case Enums::timingExprAdd:
130 ret = left_value + right_value;
132 case Enums::timingExprSub:
133 ret = left_value - right_value;
135 case Enums::timingExprUMul:
136 ret = left_value * right_value;
138 case Enums::timingExprUDiv:
139 if (right_value != 0) {
140 ret = left_value / right_value;
143 case Enums::timingExprUCeilDiv:
144 if (right_value != 0) {
145 ret = (left_value + (right_value - 1)) / right_value;
148 case Enums::timingExprSMul:
149 ret =
static_cast<int64_t
>(left_value) *
150 static_cast<int64_t
>(right_value);
152 case Enums::timingExprSDiv:
153 if (right_value != 0) {
154 ret =
static_cast<int64_t
>(left_value) /
155 static_cast<int64_t
>(right_value);
158 case Enums::timingExprEqual:
159 ret = left_value == right_value;
161 case Enums::timingExprNotEqual:
162 ret = left_value != right_value;
164 case Enums::timingExprULessThan:
165 ret = left_value < right_value;
167 case Enums::timingExprUGreaterThan:
168 ret = left_value > right_value;
170 case Enums::timingExprSLessThan:
171 ret =
static_cast<int64_t
>(left_value) <
172 static_cast<int64_t
>(right_value);
174 case Enums::timingExprSGreaterThan:
175 ret =
static_cast<int64_t
>(left_value) >
176 static_cast<int64_t
>(right_value);
178 case Enums::timingExprAnd:
179 ret = (left_value != 0) && (right_value != 0);
181 case Enums::timingExprOr:
182 ret = (left_value != 0) || (right_value != 0);
193 uint64_t cond_value =
cond->
eval(context);
202 TimingExprLiteralParams::create()
208 TimingExprSrcRegParams::create()
214 TimingExprReadIntRegParams::create()
220 TimingExprLetParams::create()
226 TimingExprRefParams::create()
232 TimingExprUnParams::create()
238 TimingExprBinParams::create()
244 TimingExprIfParams::create()