Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17049 Discussions

VHDL Subprogram error at ...failed to elaborate call to subprogram "to_integer"

Altera_Forum
Honored Contributor II
1,805 Views

HI. I need get the integer value of real value passed as input parameters.  

 

My code: 

 

LIBRARY ieee; use ieee.float_pkg.all; entity teste is PORT ( my_input : float32 ); end entity; architecture arquitetura_teste of teste is begin process(my_input) is variable my_float_a : float32; variable my_float_b : float32; variable my_integer : integer; begin my_float_a := my_input; my_float_b := to_float(3.14, my_float_b); my_integer := to_integer(my_float_b); -- work fine. my_integer := to_integer(my_float_a); -- Error! end process; end arquitetura_teste;  

 

In compilation step get the error : 

 

error (10657): vhdl subprogram error at teste.vhd(19): failed to elaborate call to subprogram "to_integer" 

 

I am using the VHDL-2008 Support Library (http://www.eda.org/fphdl/) and  

Altera Quartus 64 bits version 13.0.1 Build.
0 Kudos
0 Replies
Reply