Hello Abraham, Hello Vicky,
I did not think that Abraham's advice would solve the issue, however I took it very serious; I made a brand new demo project, I let Quartus generate all Ip simulation blocks and launched modelsim-altera (rtl) from Quartus: Identical Modelsim error:
Loading altera_mf.altsquare(altsquare_syn)
# ** Error: (vsim-3732) C:/FpgaProjects/Q17/DE10_STD_AUTO_SIMU/FloatLn.vhd(5922): No default binding for component instance 'squarer'.
# The following component port is not on the entity:
# sclr
# Time: 0 ps Iteration: 0 Instance: /ent_de10_std_auto_simu_bench/main/psd_03_14_floatLn/FloatLn_altfp_log_qca_component/squarer File: C:/intelFPGA_lite/17.1/modelsim_ase/win32aloem/../altera/vhdl/src/altera_mf/altera_mf.vhd
# Error loading design
# Error: Error loading design
My demo project instantiaties 2 Intel/Altera Ip components:
psd_03_14_conv : component intToFloat -- ALTFP_CONVERT ip
PORT map
(
clock =>clock_50,
dataa =>psd03_14_i,
result =>psd03_14_f
);
psd_03_14_floatLn : component FloatLn -- ALTFP_LOG ip
PORT map
(
clock =>clock_50,
data =>psd03_14_f,
result =>psd03_14_ln_f
);
If I comment out FloatLn instantiation (ALTFP_LOG based), compilation, simulation run smooth, no problem at all.
When I ad FloatLn I get the error described above in modelsim. So I doubt that my way of work is the culprit.
To me what is happening points more in the direction of an altera/intel bug? But I am not sure, since I am not an expert.
Analysis (1):
ALTFP_LOG instantiates in line 5910 (FloatLn is Ip generation of ALTFP_LOG)
squarer : altsquare
GENERIC MAP (
DATA_WIDTH => 13,
PIPELINE => 1,
REPRESENTATION => "UNSIGNED",
RESULT_ALIGNMENT => "MSB",
RESULT_WIDTH => 14
)
PORT MAP (
aclr => aclr,
clock => clock,
data => squarerIn,
ena => clk_en,
result => wire_squarer_result
);
Analysis (2): altsquare ip has various versions on my system (only 1 version of quartus was installed),
altsquare is defined in altera_mf.vhd (c:\...\modelsim_ase\vhdl\src\altera_mf) at line 48852
altsquare is also defined in altera_mf.vhd (c:\..\quartus\eda\sim_lib) at line 48852
entity altsquare is /../
-- PORT DECLARATION
port
(
data : in std_logic_vector (data_width - 1 downto 0);
clock : in std_logic := '0';
ena : in std_logic := '1';
aclr : in std_logic := '0';
result : out std_logic_vector (result_width - 1 downto 0)
);
end altsquare;
-- END OF ENTITY
=> Both definitions are EQUAL = OK
Analysis (3) : But the component delcarations are different.
altsquare is defined in altera_mf_components.vhd (c:\..\altera_mf) at line 2972:
component altsquare
port(
aclr : in std_logic := '0';
clock : in std_logic := '1';
data : in std_logic_vector(data_width-1 downto 0);
ena : in std_logic := '1';
result : out std_logic_vector(result_width-1 downto 0)
sclr : in std_logic := '0'
);
altsquare is also defined in altera_mf_components.vhd (c:\..\sim_lib) at line 1643
component altsquare
port(
aclr : in std_logic := '0';
clock : in std_logic := '1';
data : in std_logic_vector(data_width-1 downto 0);
ena : in std_logic := '1';
result : out std_logic_vector(result_width-1 downto 0)
);
end component;
So the sclr port is added to the signature of the block in altera_mf_components in the directory altera_mf, but not in sim_lib,
the implementation of the components is identical. I do not consider myself an expert, but wether we are simulating RTL or Gate level,
I would expect that the block signatures in altera_mf_components (component definition) and in (altera_mf) (implementation) need to be equal.
So I am not surprised that modelsim, as it refers to the directory altera_mf, signals an error.
My initial question remains on the table: how to I change the library references of altera_mf & altera_components_mf to the right directories?
Possibly there is an other solution, I 'm open to suggestions, but since it is IP code referring to IP code, my options are limited.
To support my thesis, there is an Altera Quartus 13.1 help web page:
https://www.intel.com/content/www/us/en/programmable/quartushelp/13.1/mergedProjects/hdl/mega/mega_file_altsquare.htm
That clearly states:
"To perform functional and timing simulations, you must use the altera_mf.v library located in the <Quartus II installation directory>\eda\sim_lib directory.
For VHDL, you must use the altera_mf.vhd library located in the <Quartus II installation directory>\eda\sim_lib directory.
The VHDL component declaration file is located in the altera_mf_components.vhd library in the <Quartus II installation directory>\eda\sim_lib directory"
So also there, according to the manual, reference to sim_lib seems mandatory for simulation and modelsim and Q17.1 (on my system) do not refer to the right directory by default.
So my problem how to change the directory altera_mf referes to on my system to enable me to simulate ALTFP_LOG remains on the table.
Best Regards,
Johi.