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:
parent
33466250f5
commit
35e511d0c0
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue