From 451783056d4aeb3c2f567f8b2a000040abb16a34 Mon Sep 17 00:00:00 2001 From: Cary R Date: Fri, 21 Nov 2008 16:30:35 -0800 Subject: [PATCH] V0.8: Can not have and undefined repeat. This patch mirrors what was done in development to fail when the repeat has an undefined value. --- elab_expr.cc | 7 +++++++ elab_net.cc | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/elab_expr.cc b/elab_expr.cc index 336cdb60b..037b04da2 100644 --- a/elab_expr.cc +++ b/elab_expr.cc @@ -428,6 +428,13 @@ NetExpr* PEConcat::elaborate_expr(Design*des, NetScope*scope, bool) const des->errors += 1; } + if (!rep->value().is_defined()) { + cerr << get_line() << ": error: Concatenation repeat " + << "may not be undefined (" << rep->value() + << ")." << endl; + des->errors += 1; + } + repeat = rep; } diff --git a/elab_net.cc b/elab_net.cc index 6e443b923..098e3f7a7 100644 --- a/elab_net.cc +++ b/elab_net.cc @@ -1341,6 +1341,14 @@ NetNet* PEConcat::elaborate_net(Design*des, NetScope*scope, des->errors += 1; return 0; } + + if (!erep->value().is_defined()) { + cerr << get_line() << ": error: Concatenation repeat " + << "may not be undefined (" << erep->value() + << ")." << endl; + des->errors += 1; + return 0; + } } /* The operands of the concatenation must contain all