EEVblog Electronics Community Forum

Electronics => FPGA => Topic started by: ali_asadzadeh on May 31, 2021, 12:32:02 pm

Title: Simulating ISE 14.7 in Modelsim
Post by: ali_asadzadeh on May 31, 2021, 12:32:02 pm
Hi,
I have a very basic project in ISE, I'm using an IP core for generating a 96MHz clock from a 50MHz input, and use it to blink some LED's and generate a second CLOCK on another IO, the project works perfectly fine, Now I want to make simulation in Modelsim, the Modelsim lunches, But it would complain with these errors

Code: [Select]
# ** Error: ipcore_dir/Clock96MHz.v(77): Module 'IBUFG' is not defined.
# ** Error: ipcore_dir/Clock96MHz.v(109): Module 'PLL_BASE' is not defined.
# ** Error: ipcore_dir/Clock96MHz.v(128): Module 'BUFG' is not defined.

How should I solve the problem, the ISE project is attached for your reference.
Title: Re: Simulating ISE 14.7 in Modelsim
Post by: emece67 on May 31, 2021, 12:44:46 pm
Have you generated/compiled the libraries for ModelSim using compxlib?
Title: Re: Simulating ISE 14.7 in Modelsim
Post by: ali_asadzadeh on May 31, 2021, 12:58:25 pm
Quote
Have you generated/compiled the libraries for ModelSim using compxlib?
I have just compiled the project with this right click menu
(https://i.ibb.co/dMskBZv/Untitled.png) (https://imgbb.com/)

I do not know How to do compxlib!?
Title: Re: Simulating ISE 14.7 in Modelsim
Post by: ali_asadzadeh on June 01, 2021, 06:05:18 am
emece67 is this the way to compile libs?
Title: Re: Simulating ISE 14.7 in Modelsim
Post by: emece67 on June 01, 2021, 07:12:57 am
The last time I did that it was with tool compxlib, that launched a Wizard where you selected the target simulator and language. Unfortunately, this was years ago.
Title: Re: Simulating ISE 14.7 in Modelsim
Post by: ali_asadzadeh on June 05, 2021, 12:04:44 pm
I can not resolve the issues in here, I will get these errors in modelsim

Quote
# ** Error: ipcore_dir/clokgen.v(77): Module 'IBUFG' is not defined.
# ** Error: ipcore_dir/clokgen.v(105): Module 'DCM_SP' is not defined.
# ** Error: ipcore_dir/clokgen.v(134): Module 'BUFG' is not defined.
# ** Error: ipcore_dir/clokgen.v(138): Module 'BUFG' is not defined.
# ** Error: ipcore_dir/ROM.v(114): Module 'BLK_MEM_GEN_V7_3' is not defined.

I have attached all the possible project settings,

(https://i.ibb.co/sCYQVb0/1.jpg) (https://ibb.co/gdKwRm5)
(https://i.ibb.co/qnxf4YS/2.jpg) (https://ibb.co/mBSwY5j)
(https://i.ibb.co/MZrkWWW/3.jpg) (https://ibb.co/Xj1xNNN)

Any Idea what should I do?
Title: Re: Simulating ISE 14.7 in Modelsim
Post by: ali_asadzadeh on June 05, 2021, 01:54:58 pm
I have changed the VoptFlow to 0 like this

Code: [Select]
VoptFlow = 0In modelsim.ini
Now those errors would go away and a new error comes!

Quote
Error (suppressible): (vlog-12110) All optimizations are disabled because the -novopt option is in effect. This will cause your simulation to run very slowly. If you are using this switch to preserve visibility for Debug or PLI features, please see the User's Manual section on Preserving Object Visibility with vopt. -novopt option is now deprecated and will be removed in future releases.
But there is novopt  in modelsim.ini file |O
Any help in here?
Title: Re: Simulating ISE 14.7 in Modelsim
Post by: BrianHG on June 05, 2021, 09:44:53 pm
Are Xilins' IP library included in your VSIM command line in the transcript?
Are the libraries properly located in Modelsim's available library list?

EG: (Altera example..)

My VSIM line:
Code: [Select]
vsim -t 1ps -L altera_ver -L lpm_ver -L sgate_ver -L altera_mf_ver -L altera_lnsim_ver -L cycloneive_ver -L work -voptargs="+acc"  BrianHG_DDR3_PHY_SEQ_tb
All the -L  except for '-L work (contains all my source codes)' contain the Altera IP Mega-functions my DDR3 core needs to simulate.  IE, Cyclone PLL and DDRIO buffers, FIFO, CORE ram and SERDES which I use.


See photo:  (Xilinx could have set this up automatically like Altera.  If not, it just introduces hassle...)
Title: Re: Simulating ISE 14.7 in Modelsim
Post by: emece67 on June 05, 2021, 10:51:49 pm
I have changed the VoptFlow to 0 like this

Code: [Select]
VoptFlow = 0In modelsim.ini
Now those errors would go away and a new error comes!

Quote
Error (suppressible): (vlog-12110) All optimizations are disabled because the -novopt option is in effect. This will cause your simulation to run very slowly. If you are using this switch to preserve visibility for Debug or PLI features, please see the User's Manual section on Preserving Object Visibility with vopt. -novopt option is now deprecated and will be removed in future releases.
But there is novopt  in modelsim.ini file |O
Any help in here?

VoptFlow = 0 is the modelsim.ini way to disable optimization. The same can be achieved calling vsim/vcom with -novopt option. So basically ModelSim is telling you that you must not disable optimization and return VoptFlow to its default value.

IMHO, you have problems with the libraries. Maybe ISE didn't generated them successfully or you haven't told to ModelSim (via modelsim.ini) where they are. Sorry, no Xilinx software in my HDDs now, so cannot pursue it more.

Regards.
Title: Re: Simulating ISE 14.7 in Modelsim
Post by: ali_asadzadeh on June 06, 2021, 10:37:11 am
Thanks, I could do the simulation by downgrading Modelsim to 10.6d version, I think there should be something with the new version, maybe it's not compatible with ISE.
Title: Re: Simulating ISE 14.7 in Modelsim
Post by: Bassman59 on June 07, 2021, 04:20:52 am
Thanks, I could do the simulation by downgrading Modelsim to 10.6d version, I think there should be something with the new version, maybe it's not compatible with ISE.

Of course it's compatible with ISE. You just need to make sure you've compiled the ISE libraries with the version of ModelSim you're using, and that the library is visible to your design.
Title: Re: Simulating ISE 14.7 in Modelsim
Post by: BrianHG on June 07, 2021, 04:45:15 am
This might be better answered on Xilins' forum, or even try to google -> 'Modelsim Error: Module 'BUFG' is not defined.'

Title: Re: Simulating ISE 14.7 in Modelsim
Post by: ali_asadzadeh on June 07, 2021, 05:50:33 am
Quote
Of course it's compatible with ISE. You just need to make sure you've compiled the ISE libraries with the version of ModelSim you're using, and that the library is visible to your design.
That's what I have done exactly for a lower version number! the exact things I do for the new version, simply do not work.
Title: Re: Simulating ISE 14.7 in Modelsim
Post by: mrflibble on June 18, 2021, 08:21:20 pm
Search for a file called "compxlib.log" in your ISE install directory. That should contain a few hints on what went wrong. It also contains the command that was used for that particular compxlib run. If you want, you can use that to re-run compxlib.

AFAIK there is a separate directory with compiled xilinx code for each simulator version.
So if you have 2 different versions of Modelsim installed, you should have 2 compiled-xilinx-library sub-directories.

In general ... reading the compxlib logs should give you enough information of why things are behaving the way they are.

... Oh, and of course the ISE log messages you get when launching modelsim from ISE.