Expressions
Indexing
coefs[3]
coefs[3:0]
coefs[{5,3,1}]
Signals
V(out)
I(in,gnd)
V(in[1])
Operators
Arithmetic Operators
Symbol |
Usage |
Description |
---|---|---|
|
|
Sum |
|
|
Subtract |
|
|
Negate |
|
|
Multiply |
|
|
Divide |
|
|
Modulus (remainder) of |
|
|
|
Bitwise Operators
Symbol |
Usage |
Description |
---|---|---|
|
|
Invert each bit of |
|
|
Logical ‘and’ of each bit of |
|
|
Logical ‘nand’ of each bit of |
|
|
Logical ‘or’ of each bit of |
|
|
Logical ‘nor’ of each bit of |
|
|
Logical ‘xor’ of each bit of |
|
|
Logical ‘xnor’ of each bit of |
|
|
Same as |
Reduction Operators
Symbol |
Usage |
Description |
---|---|---|
|
|
Logical ‘and’ all bits in |
|
|
Logical ‘nand’ all bits in |
|
|
Logical ‘or’ all bits in |
|
|
Logical ‘nor’ all bits in |
|
|
Logical ‘xor’ all bits in |
|
|
Logical ‘xnor’ all bits in |
|
|
Same as |
Logical Operators
Symbol |
Usage |
Description |
---|---|---|
|
|
Is |
|
|
Are both |
|
|
Are either |
Equality Operators
Symbol |
Usage |
Description |
---|---|---|
|
|
Is |
|
|
Is |
Identity Operators
Symbol |
Usage |
Description |
---|---|---|
|
|
Is |
|
|
Is |
Relational Operators
Symbol |
Usage |
Description |
---|---|---|
|
|
Is |
|
|
Is |
|
|
Is |
|
|
Is |
Shift Operators
Symbol |
Usage |
Description |
---|---|---|
|
|
Shift |
|
|
Shift |
|
|
Shift |
|
|
Shift |
Miscellaneous Operators
Symbol |
Usage |
Description |
---|---|---|
|
|
Evaluated to |
|
|
Concatenates sized bit vectors |
|
|
Replicate |
Size of Integer Results
Form |
Operators |
Size |
---|---|---|
i op j |
|
max(L(i), L(j)) |
op i |
|
L(i) |
i op j |
|
1 |
op i |
|
1 |
i op j |
|
L(i) |
i ? j : k |
max(L(j), L(k) |
|
{i, …, j} |
L(i) + … + L(j) |
|
{i {j, …, k}} |
i |
Math Functions
Verilog-A and Verilog-AMS support the following functions.
Function |
Description |
---|---|
|
Natural logarithm (base e) |
|
Common logarithm (base 10) |
|
Exponential |
|
Square root: √ |
|
Minimum |
|
Maximum |
|
Absolute value |
|
Floor (largest integer less than or equal to |
|
Ceiling (smallest integer greater than or equal to |
|
Power: |
|
Sine (argument is in radians) |
|
Cosine (argument is in radians) |
|
Tangent (argument is in radians) |
|
Arc sine (result is in radians) |
|
Arc cosine (result is in radians) |
|
Arc tangent (result is in radians) |
|
Angle from the origin to the point |
|
Distance from the origin to the point |
|
Hyperbolic sine (argument is in radians) |
|
Hyperbolic cosine (argument is in radians) |
|
Hyperbolic tangent (argument is in radians) |
|
Hyperbolic arc sine (result is in radians) |
|
Hyperbolic arc cosine (result is in radians) |
|
Hyperbolic arc tangent (result is in radians) |
|
The current time in seconds |
|
The current time in the current Verilog time units. |
|
The ambient temperature |
|
The thermal voltage (VT = kT/q) at the ambient temperature |
|
The thermal voltage (VT = kT/q) at the given temperature |
Verilog, SystemVerilog, and Verilog-AMS all support the following functions.
Function |
Description |
---|---|
|
Ceiling of the base-2 logarithm |
|
Natural logarithm (base e) |
|
Common logarithm (base 10) |
|
Exponential |
|
Square root: √ |
|
Floor (largest integer less than or equal to |
|
Ceiling (smallest integer greater than or equal to |
|
Power: |
|
Sine (argument is in radians) |
|
Cosine (argument is in radians) |
|
Tangent (argument is in radians) |
|
Arc sine (result is in radians) |
|
Arc cosine (result is in radians) |
|
Arc tangent (result is in radians) |
|
Angle from the origin to the point |
|
Distance from the origin to the point |
|
√(x2 + y2) |
|
Hyperbolic sine (argument is in radians) |
|
Hyperbolic cosine (argument is in radians) |
|
Hyperbolic tangent (argument is in radians) |
|
Hyperbolic arc sine (result is in radians) |
|
Hyperbolic arc cosine (result is in radians) |
|
Hyperbolic arc tangent (result is in radians) |
Random Functions
Function |
Description |
---|---|
|
Uniformly distributed random 32-bit integer |
|
Uniformly distributed random integer |
|
Uniformly distributed random real value |
|
Normally distributed random integer |
|
Normally distributed random real value |
|
Exponentially distributed random integer |
|
Exponentially distributed random real value |
|
Poisson distributed random integer |
|
Poisson distributed random real value |
|
Chi square distributed random integer |
|
Chi square distributed random real value |
|
Student T distributed random integer |
|
Student T distributed random real value |
|
Erlang distributed random integer |
|
Erlang distributed random real value |
Analog Operators
Operator |
Description |
---|---|
|
Time derivative |
|
Time integral |
|
Circular integrator |
|
Transition |
|
Slew |
|
Delay |
|
Laplace, zero-pole form |
|
Laplace, numerator-denominator form |
|
Laplace, zero-denominator form |
|
Laplace, numerator-pole form |
|
Z transform, zero-pole form |
|
Z transform, numerator-denominator form |
|
Z transform, zero-denominator form |
|
Z transform, numerator-pole form |
|
Last crossing |
|
Limited exponential |
Small-Signal Stimulus Functions
Function |
Description |
---|---|
|
AC stimulus |
|
White noise |
|
Flicker noise |
|
Noise table |
File Operations
Function |
Description |
---|---|
|
File open |
|
File close |