In the following we have highlighted areas where the SIMetrix Verilog-A compiler is not compliant with the LRM 2.4 standard.
In this topic:
All number formats are accepted except sized values, e.g. 4'h1234. Also the signed prefix (s or S) is not recognised.
Hex, binary and octal values are allowed. E.g. 'hFF is 255 as is 'b11111111 and 'o377. All hex, binary and octal values are unsigned that is the leading bit in such a number is never interpreted as a sign bit. However a unary '-' may prefix any value.
The LRM allows for the base prefix (e.g. 'b or 'h) and the value to be individually macro substituted. This is not currently supported. The number as a whole may be macro substituted but not individual components.
All integer values are represented as signed 32 bit values. This means that the largest unsigned value that can be represented is ???MATH???2^{31}???MATH???-1. Any larger value entered will be interpreted as ???MATH???2^{31}???MATH???-1; no error message will be displayed.
String literals are not supported but the string data type is supported. See LRM 2.4, 3.3
The LRM requires that all identifiers are case sensitive. SIMetrix Verilog-A complies with this except that parameters and instance names cannot be distinguished exclusively by case. For example, this would lead to an error:
parameter real BANDWIDTH = 300.0 ; parameter real bandwidth = 500.0 ;
The above is legal Verilog-A but the simulator's parameter handling is not case-sensitive so it would not be possible to distinguish between the above two parameters. However, case-sensitivity is maintained within the Verilog-A module. The following would be allowed:
parameter real BANDWIDTH = 300.0 ; real bandwidth ;
Note also that localparam objects that differ only by case are permitted.
The same rules also apply to instance names used for hierarchical structures.
Attributes are supported for variables, parameters and module declarations.
desc, units and op attributes applied to a variable declaration are recognised but the function differs slightly from the LRM. op is compliant with the LRM and if applied to a variable and set to "yes", the variable will be marked as an output variable and if set to "no" will not be set as an output variable.
For compatibility with older SIMetrix versions, the presence of desc or units will mark the variable as an output variable as long as op is not present.
A output variable is one whose DC operating point value is written to the list file. Data for output variables is also written to the binary data file and may be plotted. See Output Variables
Fully compliant. Note that an apostrophe is required before a string value range specification. This changed from LRM 2.2 and some older Verilog-A designs will show a syntax error if the apostrophe is omitted.
Syntax for "desc" and "units" is recognised but non-functional.
Non-standard SIMetrix attribute "instance" has been implemented. This defines the parameter as an instance parameter, that is, its value can be set on the device line. See Instance Parameters.
Anything other than "domain continuous" will raise an error.
Accepted but non-functional
Not supported
Accepted but non-functional
Not implemented. This will lead to a syntax error if used.
Not implemented. This will lead to a syntax error if used.
Not meaningful as hierarchical structures are not yet implemented.
Not supported in Verilog-A
Not supported in Verilog-A
Not supported in Verilog-A
Discipline of all nets is defined in the local module only. Out-of-module references are not implemented.
This is partially implemented within the simulator. If you connect different disciplines together you will get a warning. But the inherited disciplines will not be compatible, only the same disciplines may be inter-connected. ... and you only get a warning not an error.
Compliant for scalars only. Currently named vector branches are not supported. Unnamed branches are however fully supported.
Discipline compatibility is checked, but it seems that the discipline for each node in a branch must be identical. The spec requires them to be 'compatible' which is not the same thing.
Minor issue: if a branch is unused then the discipline of each node will not be checked at all and no error will be raised if they are incompatible. This is not defined in the standard.
Not supported in Verilog-A
String concatenations are supported, Numeric concatenation are unsupported.
Simple assignment patterns are supported. Replication multiplier is not supported.
All functions supported. Verilog-HDL style functions with '$' prefix are now supported.
SIMetrix Verilog-A is mostly compliant with this section with the exception detailed below.
Analog operators (such as ddt, transition etc) are not allowed in places where their execution could be dependent on values that change during the course of a simulation. This is because analog operators store state information which could become invalid. SIMetrix does not always implement this restriction correctly and there are situation where it will allow you to use an analog operator but shouldn't.
Compliant except tolerance is currently ignored.
Fully implemented except abstol and nature parameters. These parameters are accepted but are non-functional.
Fully implemented except abstol and nature parameters. These parameters are accepted but are non-functional.
Compliant except for "nodeset"
Compliant except for "nodeset"
Not implemented
Not implemented
Compliant except cannot use local parameters
Partially compliant. Can use return value for output. Output via passed argument is not supported.
Not relevant for Verilog-A
Not implemented in Verilog-A
Most of this section is concerned with Verilog-AMS which is the mixed-signal version and so is not relevant.
Not relevant for Verilog-A
$finish compliant except behaviour of function argument differs from LRM. See $finish
$stop compliant except argument to function is ignored. $stop will cause the simulation to pause in the same way as clicking on the Pause button in the simulator status box. To resume after a call to $stop, click on the Resume button in the simulator status box or the equivalent menu.
Not relevant for Verilog-A
Not relevant for Verilog-A
$abstime compliant. $realtime not supported and now deprecated
Not relevant for Verilog-A
Not relevant for Verilog-A
Compliant except SIMetrix is lenient on usage of type_string. LRM 2.4 states that the type_string argument is only accepted for paramset statements used to assign parameter values. SIMetrix allows type_string to be used anywhere although a warning condition will be raised if used in an analog block.
All functions implemented. See notes on $arandom with regard to type_string parameter.
$temperature, $vt, $simparam and $simparam$str compliant.
Reports a discontinuity in the main equation if argument is zero. Discontinuities reported in derivatives are ignored. Discontinuities should always be avoided and this function should never be used except as a temporary work around. It will not fix problems caused by discontinuities but will enable some strategies that overcome some of the problems that they cause at the expense of simulation accuracy.
Compliant using built-in "pnjlim". User functions not implemented.
$mfactor implemented. Others are not
Both $param_given and $port_connected are compliant
Not implemented
Not relevant for Verilog-A
Not relevant for Verilog-A
These directives are compliant:
'define, 'else, 'endif, 'ifdef, 'include, 'undef
The macro __VAMS_COMPACT_MODELING__ is always defined indicating that SIMetrix Verilog-A supports the extensions required for supporting compact modelling. This macro is defined in the LRM although the LRM is not clear about what compact modeling extensions are but the support for output variables, the ddx() function and extended support for parameters would seem to be important. SIMetrix supports all of these.
The macro __VAMS_SX_VERSION_GE_840 is always defined and is specific to SIMetrix. It is defined in version 8.4 and later. In general macros of the form __VAMS_SX_VERSION_GE_majorminor will always be defined where major is the major version number (e.g. 8 for version 8.4) and minor is the minor version number (40 for version 8.4). This feature was introduced at version 8.4 and does not apply to versions 8.3 and earlier.
The macro __VAMS_SX_VERSION is always defined and has a value equal to majorminor where major is the major version number (e.g. 8 for version 8.4) and minor is the minor version number (40 for version 8.4).
Not implemented
SIMetrix Verilog-A supports access to SPICE primitives as described in E.2.2.3. See SPICE compatibility
◄ Overview | SIMetrix Extensions ▶ |