Reputation: 131
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;
Upvotes: 1
Views: 5671
Reputation: 131
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:
After changing the parameter to -2008, everything worked:
Below is part of the
help acom
output
And the output of the program execution:
Upvotes: 1