cosimWizard problems in order to do a cosimulation Simulink/ModelSim

1 次查看(过去 30 天)
During the cosimWizard creation when we arrive at the third step ( HDL compilation ) we didn't arrive to compile the project. My project is build of 28 VHDL files, certains files came from Altera. These files give me problems during the compilation, I will show you the Error message
Error:
Failed to compile HDL files with the following message:Model Technology ModelSim SE vcom 6.6c Compiler 2010.08 Aug 23 2010
-- Loading package standard
-- Loading package std_logic_1164
** Error: (vcom-11) Could not find lpm.lpm_components.
** Error: c:/Users/to103985/Desktop/modelsim_test/mux_test.vhd(40): (vcom-1195) Cannot find expanded name "lpm.lpm_components".
** Error: c:/Users/to103985/Desktop/modelsim_test/mux_test.vhd(40): Unknown expanded name.
** Error: c:/Users/to103985/Desktop/modelsim_test/mux_test.vhd(42): VHDL Compiler exiting
I will show you the compilation commands, we add the package where is normally placed the lpm package. In fact we didn't arrive to find lpm.lpm_components but with ModelSim we have no problem to compile and simulate the project.
vlib work
vcom -bindAtLoad "Z:/Altera/11.1/Windows/quartus/eda/sim_lib/220pack.vhd"
vcom -bindAtLoad "Z:/Altera/11.1/Windows/quartus/eda/sim_lib/220model.vhd"
vlog -incr "Z:/Altera/11.1/Windows/quartus/eda/sim_lib/220model.v"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/fixed_pkg_c.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/math_utility_pkg.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/float_pkg_c.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/conv_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/valid_conv_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/synchro_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/fp_sub_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/valid_fp_sub_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/subtraction_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/fp_mult_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/valid_fp_mult_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/valid1_fp_mult_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/mux_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/valid_mux_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/fp_add_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/valid_fp_add_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/lock_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/sat_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/conv_integer_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/valid_conv_integer_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/adder_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/synchro1_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/triangle_function_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/compare_test.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/block1.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/block2.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/block3.vhd"
vcom -bindAtLoad "c:/Users/to103985/Desktop/modelsim_test/block_total.vhd"
Thank you in advance for your help and time,
Faithfully,
Gautier

采纳的回答

Tao Jia
Tao Jia 2012-8-8
The error occurs since ModelSim cannot find Altera LPM library.
To use the Altera LPM library, you need to compile that library first in ModelSim. The compilation instruction can be found at:
In the third step in cosimWizard, you can customize the compilation command. I would recommend prefixing the LPM compilation command to the default compilation commands.
Hope this helps.
Tao

更多回答(2 个)

Gautier
Gautier 2012-8-13
Thank you Tao for your answering.
The process doesn't work and currently I use exactly the good library. I don't know why cosimWizard cannot take the lpm.lpm_components... The library is correctly compiled on ModelSim and when I launch my simulation on modelSim the all functions work good. I really don't know where is the problem and I am blocked to be able to test my VHDL regualtion.
Gautier

Yam
Yam 2012-9-29
Hi Gautier,
The problem could be solved if you prioritise your HDL f iles by moving up and down before compilation. First compile in model sim. Modelsim arrange files in order and assign top level file. Now switch to co-simulation wizard and arrange your .vhdl or .verilog files in order by moving the files up or down (important to assign top level file). Normally top level files is at the end of file list.
I hope this will solve your problem. I encounter the same problem but with xilinx environment.
[ Don't forget to set path to altera library]

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by