From 35e511d0c01bcc2a9748a318364f857abe28478b Mon Sep 17 00:00:00 2001 From: Cary R Date: Fri, 18 Apr 2008 15:18:27 -0700 Subject: [PATCH] Check delay expressions correctly and give a better message. This patch uses the true delay expression count not the truncated one to check that the number of delay expressions is correct. It also prints the actual number of expressions it found when printing the error message. --- elaborate.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elaborate.cc b/elaborate.cc index ca957bc68..b363227db 100644 --- a/elaborate.cc +++ b/elaborate.cc @@ -3331,7 +3331,7 @@ void PSpecPath::elaborate(Design*des, NetScope*scope) const delete cur; } - switch (ndelays) { + switch (delays.size()) { case 1: case 2: case 3: @@ -3340,7 +3340,7 @@ void PSpecPath::elaborate(Design*des, NetScope*scope) const break; default: cerr << get_fileline() << ": error: Incorrect delay configuration." - << endl; + << " Given " << delays.size() << " delay expressions." << endl; ndelays = 1; des->errors += 1; break;