Verilog-A New Features
Hierarchical Structures
Allows the creation of a complete sub-system by joining Verilog-A modules in the Verilog-A environment. Previously this required interconnection at the netlist level
Access to SPICE Primitives
Provides the ability to connect to SPICE primitives such as MOSFETs entirely within the Verilog-A module without requiring external connections
Analog Initial Block
This is a block that is only executed once on initialisation and may be used to set variables that need only to be calculated once. This is not the same as the initial_step event that is calculated for every iteration during the DC operating point
Statistical Functions
These are random functions that return real random values subject to a number of statistical distributions as shown below
Function Name | Description |
---|---|
$rdist_chi_square | Chi square distribution |
$rdist_erlang | Erlang distribution |
$rdist_exponential | Exponential distribution |
$rdist_normal | Normal (Gaussian) distribution |
$rdist_poisson | Poisson distribution |
$rdist_t | T distribution |
$rdist_uniform | Uniform distribution |
In additions to the above, the integer equivalents available in Verilog-HDL are also supported.
Support for Strings and String Parameters
Sring variables, string parameters, and functions and operators to process them are now supported. Strings may be input from parameter values or from files. Some processing within the limits of the Verilog-A language is also supported.
File and String Processing Function
The following new functions for file and string processing have been introduced:
Function Name | Description |
---|---|
$error | Signals an error condition and terminates |
$fatal | Signals an error condition and terminates immediately |
$ferror | Compiles an error message for a file operation |
$fgets | Reads a line of text from a file |
$fscanf | Reads input from a file and writes to arguments |
$fseek | Moves a file position |
$ftell | Gets a file position |
$info | Writes a message or low-level warning to the list file |
$rewind | Moves a file position to the start |
$sformat | Writes formatted output to a string variable |
$sscanf | Decodes a string and writes to arguments |
$swrite | Writes formatted output to a string variable |
$warning | Raises a warning condition and writes message to the list file |
Other Functions
The following additional new functions have been introduced:
Function Name | Description |
---|---|
$arandom | Random number generator |
$clog2 | Minimum number of bits required to represent the integer |
$simparam$str | Returns string-valued simulation parameters |
$simprobe | Returns the value of an output variable from another instance in the circuit |
above | Event function similar to @cross but works with DC |