Product Documentation
Cadence VHDL-AMS Overview
Product Version 22.09, April 2022

A


Standard Packages Supported

This chapter includes information on:

IEEE Libraries for VHDL-AMS

The software supplied by Cadence includes two libraries designed for use with VHDL-AMS. The first library is a superset of the default IEEE library. The second library is a superset of the IEEE (pure) library. Both libraries include the VHDLAMS specific packages:

package IEEE.ELECTRICAL_SYSTEMS
package IEEE.ENERGY_SYSTEMS
package IEEE.FLUIDIC_SYSTEMS
package IEEE.FUNDAMENTAL_CONSTANTS
package IEEE.MATERIAL_CONSTANTS
package IEEE.MECHANICAL_SYSTEMS
package IEEE.RADIANT_SYSTEMS
package IEEE.THERMAL_SYSTEMS
These VHDLAMS packages are in draft form. They are not yet official IEEE standards.

To use the VHDL-AMS superset of the IEEE library, include the following lines in your cds.lib files.

SOFTINCLUDE $AMSHOME/tools/xcelium/files/cds.lib
UNDEFINE ieee
DEFINE ieee $AMSHOME/tools/xcelium/files/IEEE_vhdlams/IEEE

To use the VHDL-AMS superset of the IEEE (pure) library, include the following lines in your cds.lib files.

SOFTINCLUDE $AMSHOME/tools/xcelium/files/cds.lib
UNDEFINE ieee
DEFINE ieee $AMSHOME/tools/xcelium/files/IEEE_vhdlams_pure/IEEE

With this preparation, you can access the VHDL-AMS specific definitions that are included in the packages. For example, to access electrical natures in your design, you specify the following in your code:

library ieee;
use ieee.electrical_systems.all

For more information, see the VHDL-AMS package source located in

your_install_directory/tools/xcelium/files/IEEE_vhdlams.src

IEEE Standard VHDL Mathematical Packages

The AMS Designer simulator supports the VHDL mathematical packages defined in IEEE Standard VHDL Mathematical Packages (IEEE Std 1076.2-1996). This standard defines two package declarations: MATH_REAL and MATH_COMPLEX. The packages define a standard for designers to use in describing VHDL models that make use of common REAL or COMPLEX constants and common REAL or COMPLEX mathematical functions and operators.

Because of the IEEE copyright on these packages, Cadence cannot redistribute the source code. The source files (MATH_COM.vhd and MATH_REAL.vhd) that are shipped with the AMS Designer simulator have been stripped of all VHDL code.

The precompiled packages are included with the simulator. You can use the precompiled mathematical packages without the source code if you know which constants, functions, procedures, and operators are defined in the packages. The following sections tell you what the two packages contain.

See the NC-VHDL Simulator Known Problems and Solutions document for a list of known issues in using the IEEE math libraries.

If, for some reason, you need the VHDL source code for the mathematical packages (for example, if you must recompile the packages because a library on which they depend has changed), you can get the source code, and a copy of the IEEE Std 1076.2-1996 standard, by contacting the IEEE directly at:

http://www.ieee.org

As explained in the previous section, two sets of IEEE packages are shipped with the simulator (the Synopsys packages and the “IEEE_pure” packages). However, unlike the other packages, the IEEE mathematical packages are compiled under both the IEEE and IEEE_pure directories. The AMS Designer simulator also supports the Synopsys version of the packages. To use the Synopsys version, you must first purchase it and then compile it into the IEEE library. Before you compile the source code, remove the following line from MATH_REAL.vhd:

attribute FOREIGN : string;

This line of code redefines the FOREIGN attribute, which is already defined in the STANDARD package. When the AMS Designer simulator detects the redefinition of the FOREIGN attribute, it hides both definitions of the attribute, in compliance with the VHDL LRM.

To avoid warning messages while compiling the Synopsys version, remove the dummy VHDL implementations of RAND, SRAND, and GET_RAND_MAX from MATH_REAL.vhd. Because these three functions are defined as FOREIGN functions, the AMS Designer simulator issues the following warning message when it sees the VHDL implementations of the three functions that have the FOREIGN attribute:

ncvhdl_p: *W,FATSPB : FOREIGN subprogram has body which will never be called.

If you are using the Synopsys version, you can use the “C_NATIVE” functions RAND, SRAND, and GET_RAND_MAX.

MATH_REAL

This section lists the constants, functions and procedures available in the MATH_REAL package.

Constants

The MATH_REAL package defines the following constants:

Functions and Procedures

The MATH_REAL package contains the following functions and procedures:

MATH_COMPLEX

The MATH_COMPLEX package defines two complex types, constants, functions, and arithmetic operators.

Types

The types are defined as follows:

type COMPLEX is
record
RE: REAL; -- Real part
IM: REAL; -- Imaginary part
end record;
subtype POSITIVE_REAL is REAL range 0.0 to REAL’HIGH;
subtype PRINCIPAL_VALUE is REAL range -MATH_PI to MATH_PI;
type COMPLEX_POLAR is
record
MAG: POSITIVE_REAL; -- Magnitude
ARG: PRINCIPAL_VALUE; -- Angle in radians; -MATH_PI is illegal
end record;

Constants

Functions and Operators

Arithmetic operators


Return to top
 ⠀
X