I think this is wrong.  The function to_integer should convert to integer.

best regard
Rene


ghdl -r t_tb
Hello World
../../../src/ieee/numeric_std-body.v93:2124:7:@0ms:(assertion warning):
NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
0

And now the code.
-------------------------------------------------------------------------------------

LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
--USE ieee.std_logic_unsigned.all;
USE ieee.numeric_std.ALL;
use STD.textio.all;                     -- basic I/O
ENTITY t_tb IS
END t_tb;
 
ARCHITECTURE behavior OF t_tb IS
  signal data : signed (15 downto 0);

BEGIN
data<=to_signed(1111,16);      ----------------this is the correct value
process
variable my_line : line;  -- type 'line' comes from textio

begin
write(my_line, string'("Hello World"));   -- formatting
               writeline(output, my_line);               -- write to
"output"

 write(my_line,to_integer(data));
 

writeline(output, my_line);   
wait;
   end process;

END;


_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to