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

Example code

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 NameDescription
$rdist_chi_squareChi square distribution
$rdist_erlangErlang distribution
$rdist_exponentialExponential distribution
$rdist_normalNormal (Gaussian) distribution
$rdist_poissonPoisson distribution
$rdist_tT distribution
$rdist_uniformUniform 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 NameDescription
$errorSignals an error condition and terminates
$fatalSignals an error condition and terminates immediately
$ferrorCompiles an error message for a file operation
$fgetsReads a line of text from a file
$fscanfReads input from a file and writes to arguments
$fseekMoves a file position
$ftellGets a file position
$infoWrites a message or low-level warning to the list file
$rewindMoves a file position to the start
$sformatWrites formatted output to a string variable
$sscanfDecodes a string and writes to arguments
$swriteWrites formatted output to a string variable
$warningRaises a warning condition and writes message to the list file

Other Functions

The following additional new functions have been introduced:

Function NameDescription
$arandomRandom number generator
$clog2Minimum number of bits required to represent the integer
$simparam$strReturns string-valued simulation parameters
$simprobeReturns the value of an output variable from another instance in the circuit
aboveEvent function similar to @cross but works with DC