UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 16008

5.1i COMPXLIB, XilinxCoreLib - Errors report "Subprogram 'xx' is ambiguous"/"Use the '-explicit' option..."

Description

Keywords: COMPXLIB, XilinxCoreLib, error, subprogram, =, ambiguous, explicit

Urgency: Standard

General Description:
When I compile the VHDL XilinxCoreLib models, errors similar to the following are reported:

"ERROR: C:\xilinx\vhdl\src\XilinxCoreLib\xxx.vhd: Subprogram "xx" is ambiguous. Suitable definitions exist in package 'xxx' and 'xxx'."
"ERROR: C:\Xilinx_51i\vhdl\src\XilinxCoreLib\xxx.vhd: (Use the '-explicit' option to disable the previous error check)"
"ERROR: C:\Xilinx_51i\vhdl\src\XilinxCoreLib\xxx.vhd: VHDL Compiler exiting."

Solution

This error occurs because a subprogram such as "=" is defined in more than one of the packages that is declared in the model. To fix this problem, set the "-explicit" option as a default option in ModelSim before running COMPXLIB by following the instructions below:

1. Browse to the modelsim.ini file that is located in the modeltech_xxxx directory (e.g., c:\modeltech_5.6a\modelsim.ini).

2. Right-click on the modelsim.ini file, select "Properties", and uncheck the Read-only attribute.

3. Open the modelsim.ini file and find the following:

; Turn on resolving of ambiguous function overloading in favor of the
; "explicit" function declaration (not the one automatically created by
; the compiler for each type declaration). Default is off.
; Explicit = 1

4. Uncomment the last line to turn on the "Explicit" switch:

; Turn on resolving of ambiguous function overloading in favor of the
; "explicit" function declaration (not the one automatically created by
; the compiler for each type declaration). Default is off.
Explicit = 1

5. Rerun COMPXLIB to compile the XilinxCoreLib models.

Xilinx recommends that, after you compile the XilinxCoreLib models, you go back to the modelsim.ini file and turn off the "Explicit" switch by commenting out the line that was uncommented. There is no negative impact when any of the Xilinx simulation models are compiled when the "-explicit" switch is used; however, unexpected behavior may occur when other files are compiled, so this should not be set as the default for all model compilation.
AR# 16008
Date Created 09/03/2007
Last Updated 08/12/2005
Status Archive
Type General Article