如何将 std_logic 向量、bit_vector 或任何其他向量转换为字符串?
Signal a,b : UNSIGNED(7 DOWNTO 0);
SIGNAL x,y,z : BIT_VECTOR(7 DOWNTO 0);
...
report "value: " & BIT_VECTOR'Image(x) severity note;
report "and this one: " & to_string(a) severity note;
这不起作用,那么如何将向量转换为字符串?
最佳答案
VHDL-2008 标准定义了 to_string
为 std_logic_vector
和 std_ulogic_vector
,以及各种其他类型。使用 VHDL-2008 模式可能是最简单的(现在大多数模拟器都支持 2008)。
关于arrays - vhdl:将向量转换为字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15406887/