Instruction/ Operator Term Assign Priority Term Priority Type Description ------------------------------------------------------------------------------------------------------------------------------------------------- ++ (pre) ++var 1 ++var 1 var prefix Pre-increment -- (pre) --var 1 --var 1 var prefix Pre-decrement ?? (pre) ??var 1 ??var 1 var prefix XORO32, iterate and return pseudo-random ++ (post) var++ 1 var++ 1 var postfix Post-increment -- (post) var-- 1 var-- 1 var postfix Post-decrement !! (post) var!! 1 var!! 1 var postfix Post-logical NOT ! (post) var! 1 var! 1 var postfix Post-bitwise NOT \ (post) var\x 1 var\x 1 var postfix Post-set to y ~ (post) var~ 1 var~ 1 var postfix Post-set to 0 ~~ (post) var~~ 1 var~~ 1 var postfix Post-set to -1 ! != var 1 !x 2 unary Bitwise NOT, 1's complement - -= var 1 -x 2 unary Negation, 2's complement ABS ABS= var 1 ABS x 2 unary Absolute value ENCOD ENCOD= var 1 ENCOD x 2 unary Encode MSB, 31..0 DECOD DECOD= var 1 DECOD x 2 unary Decode, 1 << (x & \$1F) BMASK BMASK= var 1 BMASK x 2 unary Bitmask, (2 << (x & \$1F)) - 1 ONES ONES= var 1 ONES x 2 unary Count ones SQRT SQRT= var 1 SQRT x 2 unary Square root of unsigned x QLOG QLOG= var 1 QLOG x 2 unary Unsigned to logarithm QEXP QEXP= var 1 QEXP x 2 unary Logarithm to unsigned >> var >>= x 17 x >> y 3 binary Shift right, insert 0's << var <<= x 17 x << y 3 binary Shift left, insert 0's SAR var SAR= x 17 x SAR y 3 binary Shift right, insert MSB's ROR var ROR= x 17 x ROR y 3 binary Rotate right ROL var ROL= x 17 x ROL y 3 binary Rotate left REV var REV= x 17 x REV y 3 binary Reverse y LSBs of x and zero-extend ZEROX var ZEROX= x 17 x ZEROX y 3 binary Zero-extend above bit y SIGNX var SIGNX= x 17 x SIGNX y 3 binary Sign-extend from bit y & var &= x 17 x & y 4 binary Bitwise AND ^ var ^= x 17 x ^ y 5 binary Bitwise XOR | var |= x 17 x | y 6 binary Bitwise OR * var *= x 17 x * y 7 binary Signed multiply / var /= x 17 x / y 7 binary Signed divide, return quotient +/ var +/= x 17 x +/ y 7 binary Unsigned divide, return quotient // var //= x 17 x // y 7 binary Signed divide, return remainder +// var +//= x 17 x +// y 7 binary Unsigned divide, return remainder SCA var SCA= x 17 x SCA y 7 binary Unsigned scale (x * y) >> 32 SCAS var SCAS= x 17 x SCAS y 7 binary Signed scale (x * y) >> 30 FRAC var FRAC= x 17 x FRAC y 7 binary Unsigned fraction {x, 32'b0} / y + var += x 17 x + y 8 binary Add - var -= x 17 x - y 8 binary Subtract #> var #>= x 17 x #> y 9 binary Ensure x => y, signed <# var <#= x 17 x <# y 9 binary Ensure x <= y, signed ADDBITS var ADDBITS= x 17 x ADDBITS y 10 binary Make bitfield, (x & \$1F) | (y & \$1F) << 5 ADDPINS var ADDPINS= x 17 x ADDPINS y 10 binary Make pinfield, (x & \$3F) | (y & \$1F) << 6 < x < y 11 binary Signed less than (returns 0 or -1) +< x +< y 11 binary Unsigned less than (returns 0 or -1) <= x <= y 11 binary Signed less than or equal (returns 0 or -1) +<= x +<= y 11 binary Unsigned less than or equal (returns 0 or -1) == x == y 11 binary Equal (returns 0 or -1) <> x <> y 11 binary Not equal (returns 0 or -1) >= x >= y 11 binary Signed greater than or equal (returns 0 or -1) +>= x +>= y 11 binary Unsigned greater than or equal (returns 0 or -1) > x > y 11 binary Signed greater than (returns 0 or -1) +> x +> y 11 binary Unsigned greater than (returns 0 or -1) <=> x <=> y 11 binary Signed comparison (<,=,> returns -1,0,1) !!, NOT !!= var 1 !!x 12 unary Logical NOT (x == 0, returns 0 or -1) &&, AND var &&= x 17 x && y 13 binary Logical AND (x <> 0 AND y <> 0, returns 0 or -1) ^^, XOR var ^^= x 17 x ^^ y 14 binary Logical XOR (x <> 0 XOR y <> 0, returns 0 or -1) ||, OR var ||= x 17 x || y 15 binary Logical OR (x <> 0 OR y <> 0, returns 0 or -1) ? : x ? y : z 16 ternary If x <> 0 then choose y, else choose z := var := x 17 assign Set var to x v1,v2,... := x,y,... 17 assign set v1 to x, v2 to y, etc. '_' = ignore Complex math functions --------------------------------------------------------------------------------------------------- var_x,var_y := ROTXY(x,y,t) Rotate cartesian (x,y) by t and assign resultant (x,y) var_r,var_t := XYPOL(x,y) Convert cartesian (x,y) to polar and assign resultant (r,t) var_x,var_y := POLXY(r,t) Convert polar (r,t) to cartesian and assign resultant (x,y)