Function to_hstring from std.textio is not working [VHDL]

I tried to run some code from Stack Overflow (How to write an integer to stdout as hexadecimal in VHDL?) and it turned out that to_hstring doesn't work (Even though std library is standard for VHDL). I am using Active-HDL 9.1 (probably the root of the problem is in the old version of Active-HDL). I'm new to VHDL coding, so I believe I missed something obvious there. Thanks for any help!

Here is the sample code:

library ieee,std;
    use std.textio.all;
    use ieee.std_logic_1164.all;
    use ieee.numeric_std.all;

entity min is
end min;

architecture behav of min is
begin
    process is
    begin
        report "i = 0x" & to_hstring(to_signed(16, 32));
    end process;
end behav; 

And output of the compiler: enter image description here

Upvotes: 1

Views: 5671

Answers (1)

While writing the question, I read again (How to write an integer to stdout as hexadecimal in VHDL?) and found that was mentioned VHDL-2008. After that I checked my compile command (automatically generated by Active-HDL) it turned out that VHDL-2002 is the default for compilation command: enter image description here

After changing the parameter to -2008, everything worked:

enter image description here

Below is part of the

help acom

output

enter image description here

And the output of the program execution:

enter image description here

Upvotes: 1

Related Questions