- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page