diff --git a/PExpr.h b/PExpr.h index e58eae287..e424355f2 100644 --- a/PExpr.h +++ b/PExpr.h @@ -53,7 +53,7 @@ class PExpr : public LineInfo { // be. It is used by elaboration of assignments to figure out // the width of the expression. // - // The "min" is the width of the local context, so it the + // The "min" is the width of the local context, so is the // minimum width that this function should return. Initially // this is the same as the lval width. // @@ -581,6 +581,7 @@ class PEBinary : public PExpr { NetExpr*elaborate_expr_base_lshift_(Design*, NetExpr*lp, NetExpr*rp, int use_wid) const; NetExpr*elaborate_expr_base_rshift_(Design*, NetExpr*lp, NetExpr*rp, int use_wid) const; + NetExpr*elaborate_expr_base_add_(Design*, NetExpr*lp, NetExpr*rp, int use_wid) const; static void suppress_operand_sign_if_needed_(NetExpr*lp, NetExpr*rp); diff --git a/netmisc.h b/netmisc.h index cc6f9a7fe..f54237b03 100644 --- a/netmisc.h +++ b/netmisc.h @@ -137,9 +137,11 @@ extern unsigned count_lval_width(const class NetAssign_*first); * The expr_width is the width of the context where the expression is * being elaborated, or -1 if the expression is self-determined width. * - * Also, the prune_width is the maximum width of the result, and it - * passed to the eval_tree method of the expression to limit constant - * results if possible. + * The prune_width is the maximum width of the result, and is passed + * to the eval_tree method of the expression to limit constant + * results. The evaluation will prune any constant result down to the + * prune_width (if >0) so should only be used at the point where it is + * bound to the destination. */ class PExpr; extern NetExpr* elab_and_eval(Design*des, NetScope*scope,