Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

replication operator with 0

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.

like image 297
user3472394 Avatar asked Sep 05 '25 01:09

user3472394


1 Answers

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.

like image 164
dave_59 Avatar answered Sep 07 '25 17:09

dave_59