diff --git a/slang_frontend.cc b/slang_frontend.cc index bace6c0..0cc7882 100644 --- a/slang_frontend.cc +++ b/slang_frontend.cc @@ -1275,7 +1275,8 @@ RTLIL::SigSpec SignalEvalContext::operator()(ast::Expression const &expr) const ast::UnaryExpression &unop = expr.as(); RTLIL::SigSpec left = (*this)(unop.operand()); - if (unop.op == ast::UnaryOperator::Postincrement) { + if (unop.op == ast::UnaryOperator::Postincrement + || unop.op == ast::UnaryOperator::Preincrement) { require(expr, procedural != nullptr); procedural->do_simple_assign(expr.sourceRange.start(), lhs(unop.operand()), ret = netlist.Biop(ID($add), left, {RTLIL::S0, RTLIL::S1},