Allow zero width replications only in a concatenation.

1364-2001 does not allow a replication count of zero, but
1364-2005 allows them when the replication is enclosed in
a concatenation with other valid bits. This patch adds
code to perform these checks for procedural expressions.
Because of the NetNet object must have a width greater
than zero a replication used in a continuous assignment
can never have a count of zero.
This commit is contained in:
Cary R
2008-05-01 20:33:04 -07:00
committed by Stephen Williams
parent cb5260b2ce
commit 9db9aa4ccb
2 changed files with 22 additions and 2 deletions
+1 -2
View File
@@ -1591,7 +1591,7 @@ NetNet* PEConcat::elaborate_net(Design*des, NetScope*scope,
if (repeat == 0) {
cerr << get_fileline() << ": error: Concatenation repeat "
"may not be 0."
"may not be zero."
<< endl;
des->errors += 1;
return 0;
@@ -1689,7 +1689,6 @@ NetNet* PEConcat::elaborate_net(Design*des, NetScope*scope,
}
}
osig->local_flag(true);
return osig;
}