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# 16452

5.1i COMPXLIB, ModelSim 5.7 - When I compile the DCM.v and X_DCM.v models, errors report: "...near "generate": expecting: IDENT"


Keywords: 5.1i, COMPXLIB, ModelSim, 5.7, UNISIM, SIMPRIM, DCM, X_DCM, near, generate, expecting, IDENT

Urgency: Standard

General Description:
When I compile the Verilog UNISIM or SIMPRIM models using ModelSim 5.7, errors occur when I compile the DCM model.

The errors in the compxlib.log file for the UNISIM DCM.v model are:

"COMPXLIB: vlog -work C:\Modeltech_5.7\xilinx_libs_51i_sp3\unisim_ver C:\Xilinx_51i\verilog\src\unisims\DCM.v
Model Technology ModelSim SE vlog 5.7 Compiler 2002.12 Dec 18 2002
-- Compiling module DCM
** Error: C:\Xilinx_51i\verilog\src\unisims\DCM.v(85): near "generate": expecting: IDENT
** Error: C:\Xilinx_51i\verilog\src\unisims\DCM.v(126): near "generate": expecting: IDENT
** Error: C:\Xilinx_51i\verilog\src\unisims\DCM.v(932): near "=": expecting: IDENT"

The errors in the compxlib.log file for the SIMPRIM X_DCM.v model are:

"COMPXLIB: vlog -work C:\Modeltech_5.7\xilinx_libs_51i_sp3\simprim_ver C:\Xilinx_51i\verilog\src\simprims\X_DCM.v
Model Technology ModelSim SE vlog 5.7 Compiler 2002.12 Dec 18 2002
-- Compiling module X_DCM
** Error: C:\Xilinx_51i\verilog\src\simprims\X_DCM.v(85): near "generate": expecting: IDENT
** Error: C:\Xilinx_51i\verilog\src\simprims\X_DCM.v(126): near "generate": expecting: IDENT
** Error: C:\Xilinx_51i\verilog\src\simprims\X_DCM.v(932): near "=": expecting: IDENT"



These errors occur because the word "generate" is used in the DCM model. This is a reserved word in the Verilog-2001 standard, and ModelSim 5.7 uses the Verilog-2001 standard by default. These errors prevent the DCM models from being compiled, and they will occur when you attempt to simulate a design that uses the DCM.

Please see (Xilinx Answer 16436) for information on errors that occur if you attempt to simulate a design when the DCM model is not compiled.

This problem will be fixed in the 5.2i software, which will be available in late February, 2003. The word "generate" will be replaced by a word that is not reserved in the Verilog-2001 standard.


To correct this problem prior to the release of 5.2i, you must manually compile the UNISIM and SIMPRIM DCM models with the "-vlog95compat" switch. Follow the instructions below to compile these models:

1. Open ModelSim 5.7.

2. At the ModelSim prompt, enter the following (the path to the model must be changed based on the installation directory):

ModelSim>vlog -vlog95compat -work UNISIMS_VER C:/Xilinx/verilog/src/unisims/DCM.v
ModelSim>vlog -vlog95compat -work SIMPRIMS_VER C:/Xilinx_51i/verilog/src/simprims/X_DCM.v

These commands will compile the DCM.v model into the UNISIMS_VER library and the X_DCM.v model into the SIMPRIMS_VER library.
AR# 16452
Date 08/12/2005
Status Archive
Type General Article
Page Bookmarked