我尝试从堆栈溢出(How to write an integer to stdout as hexadecimal in VHDL?)运行一些代码,结果发现to_hstring无法工作(尽管std库是VHDL的标准)。我使用的是Active-HDL9.1(问题的根源可能在Active-HDL的旧版本中)。我刚开始使用VHDL编码,所以我想我忽略了一些显而易见的东西。谢谢你的帮助!
下面是示例代码:
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; 以及编译器的输出:

发布于 2020-11-15 21:31:09
在写这个问题的时候,我又读了一遍(How to write an integer to stdout as hexadecimal in VHDL?),发现提到了VHDL-2008。之后,我检查了编译命令(由Active-HDL自动生成),结果发现VHDL-2002是编译命令的默认命令:

在将参数更改为-2008之后,一切正常工作:

下面是
help acom输出

以及程序执行的输出:

https://stackoverflow.com/questions/64850003
复制相似问题