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.
This commit is contained in:
Cary R 2008-04-18 15:18:27 -07:00 committed by Stephen Williams
parent 33466250f5
commit 35e511d0c0
1 changed files with 2 additions and 2 deletions

View File

@ -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;