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!

cancel
Showing results for 
Search instead for 
Did you mean: 
Newbie hilakal
Newbie
19,567 Views
Registered: ‎01-27-2009

Simulate COREGEN in ModelSim

Hello,

I'm not sure if it's the suitable place to ask this question,
but if it's not please reffer me to the right place.

 

I'm using ISE 10.1 and I've created a single port ROM using COREGEN.
I want to simulate it in ModelSim se 6.3 (using verilog). The compilation is working good, but when I come to simulate it, it gives error "Module 'BLKMEMSP_V6_2' is not defined" , or when I simulate with no optimization it gives error: "Instantiation of 'BLKMEMSP_V6_2' failed. The design unit was not found". This is though I compiled the HDL simulation libraries (mti_se) at the right place (in the work library of my project in ModelSim).

 

What should I do?

 

Thanks for your help. 

0 Kudos
15 Replies
Xilinx Employee
Xilinx Employee
19,552 Views
Registered: ‎08-15-2007

Re: Simulate COREGEN in ModelSim

hilakal,

 

You've come to the right place :smileyhappy:

 

You are running into this error because ModelSim is unable to resolve the module "BLKMEMSP_V6_2", which is defined in the XilinxCoreLib(verilog) libraries.  This means that:

 

1) You have not pre-compiled your libraries

2) You have not pointed ModelSim to a modelsim.ini containing the appropriate library mappings.

3) You are launching vsim without the "-L" switch, to point to the Xilinx.

 

Solutions to the issues above:

 

1) Run the Simulation Libraries Compilation Wizard, under ISE Accessories (you can find it in the Xilinx Start menu, or by typing "compxlibgui" in the command window/terminal)

2) Set the MODELSIM environment variable to point to the modelsim.ini generated by the Compxlib wizard.  Alternatively, you can copy the modelsim.ini file to the current working directory of your simulation.

3) Run your simulation using -L switch.  For example, vsim -L xilinxcorelib_ver work.your_top_unit

 

Hope this helps.

 

-edv 

Eddie
0 Kudos
Newbie hilakal
Newbie
19,533 Views
Registered: ‎01-27-2009

Re: Simulate COREGEN in ModelSim

Thanks very much for your help.

 

I did step number 1 successfully.

My question is about step number 2 - where do I find this modelsim.ini file generated by the Compxlib wizard? and what should I do with it?

I would be glad if you can give me a detailed answer, because I'm not very familiar with ModelSim and ISE...

 

And one more: after I will do step number 2, will I still have to compile the HDL simulation libraries for the ISE?

 

Thanks again :)

0 Kudos
Xilinx Employee
Xilinx Employee
19,509 Views
Registered: ‎08-15-2007

Re: Simulate COREGEN in ModelSim

I'd be more than glad to elaborate.

 

To simulate Xilinx designs that contain instantiated primitives (such as DCMs, and IBUFs/OBUFs), ModelSim needs to know the location of your UNISIM/SIMPRIM libraries.  ModelSim uses the modelsim.ini file to learn the locations of these libraries.

 

But before you worry about all of this, you first need to make sure you run the Compxlib Wizard (i.e., compile the HDL simulation libraries).  Upon completion of the compilation process, if using the Compxlib Wizard, you should be able to find a *new* updated ModelSim.ini file in the ISE install directory.  Otherwise, if you run command line, you'll find a new modelsim.ini in the location where you ran the compxlib command line.

 

Once you have a hold of the new modelsim.ini, either

 

1) Save it to a safe location.  Then set the environment variable MODELSIM to the full path of where modelsim.ini is.  For example:

MODELSIM = C:\my_libs\modelsim.ini

 

ModelSim will then load this modelsim.ini anytime you open ModelSim.

 

2) Save it to a safe location.  Then copy the modelsim.in into the working directory of whichever project you are simulating.  ModelSim will use the modelsim.ini contained in the working directory.

 

So regardless of the situation, you need to make sure you have at least compiled your libraries using Compxlib (via command line or the wizard).

 

Hope this helps.

 

-edv

Message Edited by edv on 01-29-2009 04:35 PM
Eddie
0 Kudos
Visitor help_aero
Visitor
18,914 Views
Registered: ‎03-08-2009

Re: Simulate COREGEN in ModelSim

Hello EDV,

 

I have the same problem. I hve run the compxlibgui appliation, then

 

1) I copied the modelsim.ini file to the directory where Modelsim.pe is installed, I renamed the old modelsim.ini file.

2) I ran the modelsim icon on ISE, to simulate the design,

 

i get the following error...

 

# ** Error: (vish-17) Recursive reference in 'others' clause in "D:\ProgramFiles\ModelSimPE\win32pe_edu/../modelsim.ini" to "D:\ProgramFiles\ModelSimPE\win32pe_edu/../modelsim.ini".
# Reading D:/ProgramFiles/ModelSimPE/tcl/vsim/pref.tcl
# do {i_q_DataGen.fdo}
# ** Warning: (vlib-34) Library already exists at "work".
# Model Technology ModelSim PE Student Edition vlog 6.5 Compiler 2009.01 Jan 23 2009
# ** Error: (vlog-16) The 'others' clause in "D:\ProgramFiles\ModelSimPE\win32pe_edu/../modelsim.ini" is self-referencing.
# -- Compiling module i_q_DataGen
# ** Warning: I_Q_Data_Gen.v(91): [RDGN] - Redundant digits in numeric literal.
# -- Scanning library directory 'D:/ProgramFiles/Xilinx10_1/WorkSpace/Serial_to_Parallel'
#
# Referenced (but uncompiled) modules or primitives:
#     I_Q_DataRom
#
# Top level modules:
#     i_q_DataGen
# ** Error: D:/ProgramFiles/ModelSimPE/win32pe_edu/vlog failed.
# Error in macro ./i_q_DataGen.fdo line 5
# D:/ProgramFiles/ModelSimPE/win32pe_edu/vlog failed.
#     while executing
# "vlog +acc  "I_Q_Data_Gen.v""

 

 Please help.... how do I solve this issue?

 

The strange thing is that, when I first installed the memory ROM form coregen, I was able to successfully simulate teh design, I corrected the verilog code several times. All of a sudden the modelsim stopped loading teh sim files for the ROM, and eversince I have not been able to simulate the coregen design. Can you explain why did this change suddenly occur. 

 

0 Kudos
Xilinx Employee
Xilinx Employee
18,912 Views
Registered: ‎08-15-2007

Re: Simulate COREGEN in ModelSim

Your simulation is erroring out due to a problem in your modelsim.ini:

 

# ** Error: (vlog-16) The 'others' clause in "D:\ProgramFiles\ModelSimPE\win32pe_edu/../modelsim.ini" is self-referencing.

Search for "others" in Modelsim.ini (it probably is listed right under the libraries section).  Comment it out using a semicolon (";") right before the line.

 

The reason this "others" clause exists is because the "new" modelsim.ini expects you to maintain the default modelsim.ini in the ModelSim install directory, and instead, use this "new" modelsim.ini in the working project directories.  This is just a common practice; what you are doing right now works just fine.   Just remove the others clause and you should be on your way.

 

Hope this helps.

Eddie
Visitor ncudsp
Visitor
14,891 Views
Registered: ‎03-21-2011

Re: Simulate COREGEN in ModelSim

hello 

i need some help for the same problem.

 

first, i am using ise12.3 and i've created a project within the ipcore "Aurora 8b/10b v5.2".

then, after i generated the test_core.xco, i edit a testbench for this core and want to simulate it with modelsim 6.5f.

i buttoned the "simulate behavioral model" ,then ise gives the warming:

-------------------------

 

the required file test_core.v for the IP core test_core.xco was not found in the IP core source directory. In order for synthesis to run successfully, you will need to either copy the file(s) to the IP core source directory or regenerate the core. Would you like to create these files by regenerating the IP Core?
Click "Yes" to regenerate this IP core to create the necessary file(s).
Click "No" to skip regeneration of this IP core only.
The Regenerate All Cores process in Project Navigator can also be used to automate the regeneration of all cores in the project.
Click "Abort" to exit the process and return to Project Navigator.

 

------------------------

i click "yes" to regenerate the ipcore.

but modelsim gives error:

-----------------------

 

# vsim -L xilinxcorelib_ver -L unisims_ver -L secureip -lib work -voptargs=\"+acc\" -t 1ps work.tb glbl 

# ** Note: (vsim-3812) Design is being optimized...

# ** Error: tb_fifo.v(67): Module 'test_core' is not defined.

# Optimization failed

# Error loading design

-----------------------

 

 

when i run "xst" for this project in the ise , it gives error:

 

---------------------

ERROR:HDLCompilers:87 - "tb_core.v" line 47 Could not find module/primitive 'test_core'

---------------------

 

i used the same method to try the ipcore "fifo generator v6.2" without any problem.

so i need your help ~~~

Tags (1)
0 Kudos
Xilinx Employee
Xilinx Employee
14,860 Views
Registered: ‎08-02-2007

Re: Simulate COREGEN in ModelSim

please check out and see if there is a file named 'test_core.v or a file have a  module named 'test_core'

this file needs to be compied into the work library

------------------------------------------------------------------------------
Don't forget to reply, give kudo and accept as solution
------------------------------------------------------------------------------
0 Kudos
Visitor ncudsp
Visitor
14,828 Views
Registered: ‎03-21-2011

Re: Simulate COREGEN in ModelSim

thanks for your help~ i remove the test_core.xco file, and add test_core.v into my project. but it need some *.v files. i found them in the ipcore_dir\test_core\src\ folder. but i can't find a file which defined a module called "test_core_gtp_wrapper". the file "test_core.v" need to instantiate a module called "test_core_GTP_WRAPPER" i need your help~thank u~
0 Kudos
Teacher rcingham
Teacher
14,770 Views
Registered: ‎09-09-2010

Re: Simulate COREGEN in ModelSim

It may be one of the many other folders produced by CoreGen. Keep looking!

------------------------------------------
"If it don't work in simulation, it won't work on the board."
0 Kudos
Visitor ncudsp
Visitor
4,719 Views
Registered: ‎03-21-2011

Re: Simulate COREGEN in ModelSim

which folder~?

i found a lot of files about "gtp_wapper" but i don't know one should be inlcude.

 

i need help~

0 Kudos
Teacher rcingham
Teacher
4,698 Views
Registered: ‎09-09-2010

Re: Simulate COREGEN in ModelSim

Probably all of them need compiling.

------------------------------------------
"If it don't work in simulation, it won't work on the board."
0 Kudos
Highlighted
Visitor jkrishnanv
Visitor
4,199 Views
Registered: ‎09-08-2013

Re: Simulate COREGEN in ModelSim

hi edv:

could you explain this into windows environment. 

1. When I compile the libraries, should I give the destination as my sim directory or <sim_directory>/work ? Work is where my design files get compiled into.

2. I  have seen that modelsim.ini is created at the destination directory I gave. Where should I copy this - again to <sim_directory> or <sim_directory>/work ?How do I define MODELSIM environment in a windows environment ? Or if I give destination directory as <simulation directory>/work, it will get resolved ?

 

Thanks

 

 

0 Kudos
Xilinx Employee
Xilinx Employee
4,193 Views
Registered: ‎07-16-2008

Re: Simulate COREGEN in ModelSim

1. You can specify the directory as any pathname, not necessarily the current sim dir. It can be used as a common pre-compiled library path for other Xilinx simulations.

 

2. Modelsim finds the modelsim.ini file by evaluating the following conditions:
use $MODELSIM (which specifies the directory location and name of a modelsim.ini file) if it exists; else
use ./modelsim.ini; else
use $(MODEL_TECH)/modelsim.ini; else
use $(MODEL_TECH)/../modelsim.ini;

The environment variable MODEL_TECH is automatically set by the toolset to the directory in which the binary executable resides.

So you can either set MODELSIM environment variable or copy the modelsim.ini to the current simulation directory.

For how to globally set environment variable in Windows, it depends on your OS type. Just google it.

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Observer quyleng
Observer
2,885 Views
Registered: ‎03-13-2015

Re: Simulate COREGEN in ModelSim

Hi Eddie,

 

I have the same problem when simulating GTX core.

I insert GTX core in ISE 13.2 to developing CPRI protocol in Kintex 7 KC705. I have simulated the GTX by Modelsim SE 6.5 following the guide in Xilinx document ug769_gtwizard.pdf. Then this gets an error "Module B_GTXE2_CHANNEL is not defined". After that I have followed your instruction; however the issue was not resolved.

 

Could you give me some advice?

 

Thanks

Quan.

0 Kudos
Moderator
Moderator
2,764 Views
Registered: ‎04-17-2011

Re: Simulate COREGEN in ModelSim

Hi Quan, This is a pretty old thread. How about opening a new thread with your query. There are few older threads with relevant content about your error:
http://forums.xilinx.com/t5/PCI-Express/Problem-with-B-GTXE2-CHANNEL-when-trying-to-simulate-PCIe-Core/td-p/234256
http://forums.xilinx.com/t5/Simulation-and-Verification/Module-B-GTHE2-CHANNEL-is-not-defined/td-p/390745/page/2

To answer your query here, you are not using a supported Modelsim version. For ISE 13.2, the minimum required version in 6.6d (Refer page 42: http://www.xilinx.com/support/documentation/sw_manuals/xilinx13_2/irn.pdf). So you need to use 6.6d or above. Secureip has encrypted content and the B_GTXE2_CHANNEL module is part of the encrypted content and is sensitive to tool and simulator version.
Regards,
Debraj
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos