I have RTL code in which the replication index in the replicator operator is 0.
inst (. in ( { {0{1'b0}}, 1'b1 })
I am not able to predict the behavior here.
I didn't find anything specified in LRM for 0 or negative replication index in replication operator
.
The 1800-2012 LRM says
A replication operation may have a replication constant with a value of zero. This is useful in parameterized code. A replication with a zero replication constant is considered to have a size of zero and is ignored. Such a replication shall appear only within a concatenation in which at least one of the operands of the concatenation has a positive size.
So your expression will be treated as a 1-bit value 1'b1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With