Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is '<<<' a rotation operator in verilog?

Tags:

verilog

whether <<< 1 will do a left circular rotation by 1 bit. I want to know whether this operator exists?? Whether it will do a left circular rotation by 1 bit or I have to use concatenation for this.

like image 840
june Avatar asked Nov 30 '25 02:11

june


1 Answers

No <<< is an arithmetic left shift operator which pads 0 at the right while keeping the sign if it is signed. But rather << is a logical left shift which does the same but will not consider the sign.

Yes, you need to use concatenation.

The easiest way would be

wire [7:0] in;
wire [7:0] out;

assign out = {in[6:0], in[7]};

Ref http://vlsi.pro/verilog-operators/#shift

like image 119
gmuraleekrishna Avatar answered Dec 02 '25 16:12

gmuraleekrishna



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!