mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-06 09:07:15 +02:00
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:
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user