i want to resize a sfixed number of size(9 downto -6) to sfixed/signed of size (9 downto 0):
here's the code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
library ieee_proposed;
use ieee_proposed.fixed_pkg.all;
USE ieee.numeric_std.all;
ENTITY dwt IS
END dwt;
ARCHITECTURE dwt_behaviour OF dwt IS
signal k : sfixed(9 downto -6) ;
signal kk : signed(9 downto 0);
BEGIN
k <= "1100110011000010";
kk <= signed(resize(signed(k), kk'length)); -- error line
END dwt_behaviour;
error is:
Index value -6 (of type std.STANDARD.NATURAL) is out of range 0 to 2147483647.
here's the code:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
library ieee_proposed;
use ieee_proposed.fixed_pkg.all;
USE ieee.numeric_std.all;
ENTITY dwt IS
END dwt;
ARCHITECTURE dwt_behaviour OF dwt IS
signal k : sfixed(9 downto -6) ;
signal kk : signed(9 downto 0);
BEGIN
k <= "1100110011000010";
kk <= signed(resize(signed(k), kk'length)); -- error line
END dwt_behaviour;
error is:
Index value -6 (of type std.STANDARD.NATURAL) is out of range 0 to 2147483647.