I am trying to initialize a (VHDL-2008) ufixed. But the following code gives an error in Modelsim 10.5b
entity test_e is
end entity;
library ieee;
architecture test_a of test_e is
use ieee.fixed_pkg.all;
constant value : ufixed(3 downto 0) := "0001";
begin
end architecture;
The error message is:
Error: [file].vhd(8): Character literal '0' of type ieee.std_logic_1164.STD_ULOGIC is not visible at the place of this string literal.
I can fix it by changing the definition line into
constant value : ufixed(3 downto 0) := to_ufixed(1,3,0);
And then when I run simulation, value holds "0001"....
I cannot figure out what I am doing wrong. I've been browsing the web for an answer, but cannot find it. Does someone know what I am doing wrong?
std_logic_1164for the implicit type conversion (string->std_ulogic_vector) to work? The description must seem logic to the guys that thought it up. But for normal users, it does not hold sufficient information to fix the issue.