>>>verilog 中的符号是什么?
What is >>>symbol in verilog?
请问verilog中这个符号>>>是什么?我应该什么时候使用它?谢谢!
例如
always @(posedge Clock) begin
if (Clear) begin
a < = c>>>8;
b < = d>>>16;
end
end
它是一个 arithmetic right shift operator(参见 link 的第 19-20 页)。它是 Java 的相反情况(Java >>
是算术右移,而 >>>
是逻辑右移)。
算术右移用于处理右移的数字为 positive/negative 的情况:
Shift right specified number of bits, fill with value of sign bit if
expression is signed, othewise fill with zero
为了说明,如果您有 signed
表达式,其值为 ,可以这样说:
1000 1100
--------- >>> 2
1110 0011 //note the left most bits are 1
但是 unsigned
:
1000 1100
--------- >>> 2
0010 0011
最左边会填0
。
请问verilog中这个符号>>>是什么?我应该什么时候使用它?谢谢!
例如
always @(posedge Clock) begin
if (Clear) begin
a < = c>>>8;
b < = d>>>16;
end
end
它是一个 arithmetic right shift operator(参见 link 的第 19-20 页)。它是 Java 的相反情况(Java >>
是算术右移,而 >>>
是逻辑右移)。
算术右移用于处理右移的数字为 positive/negative 的情况:
Shift right specified number of bits, fill with value of sign bit if expression is signed, othewise fill with zero
为了说明,如果您有 signed
表达式,其值为 ,可以这样说:
1000 1100
--------- >>> 2
1110 0011 //note the left most bits are 1
但是 unsigned
:
1000 1100
--------- >>> 2
0010 0011
最左边会填0
。