mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-22 13:57:18 +02:00
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:
+1
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user