반응형

값에 'Z' or 'X'를 사용하면 결과를 알 수 없습니다.
Verilog Arithmetic Operators
Operator
|
Description
|
a + b
|
a plus b
|
a - b
|
a minus b
|
a * b
|
a multiplied by b
|
a / b
|
a divided by b
|
a % b
|
a modulo b
|
a ** b
|
a to the power of b
|
a = 5 b = 10 c = 1 d = Z
Character
|
Operation performed
|
Example
|
Type
|
+
|
Add
|
b + c = 11
|
Binary
|
-
|
Subtract
|
b - c = 9
|
Binary
|
/
|
Divide
|
b / a = 2
|
Binary
|
* **
|
Multiply, power
|
a * b = 50, a**b
|
Binary
|
%
|
Modulus
|
b % a = 0
|
Binary
|
%=
|
Modulus assignment
|
a %= b ( a = a % b)
|
Binary
|
+= -=
/= *=
|
Arithmethic assignment
|
a += b ( a = a + b)
a += 2 (a = a + 2)
|
Unary
|
++ --
|
Unary increment
|
a = b++ ( a = b, b = b + 1)
a = ++b ( b = b + 1, a = b)
|
Unary
|
728x90
반응형
'Language > Verilog & SV' 카테고리의 다른 글
[Verilog & SV] 논리 연산자(Logical Operators) (0) | 2025.04.09 |
---|---|
[Verilog & SV] Bitwise, 감소 연산자(Reduction Operators) (0) | 2025.04.09 |
[Verilog & SV] 관계 연산자(Relational Operators) (0) | 2025.04.09 |
[Verilog & SV] 비트 연산자(Bitwise Operators) (0) | 2025.04.09 |
[Verilog] Case, Synopsys full case, Synopsys parallel case (0) | 2025.04.08 |