Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Conversion uses all combinational logic

Hi,

I'm having trouble converting from an integer to an 8 bit std_logic_vector. It complies and gives an error that all my combinational logic nodes are used. I'm using a cyclone II FPGA chip.


type DATE_ARRAY is array(5 downto 0) of integer range 0 to 2100;
variable SC_Var : std_logic_vector(7 downto 0) := x"00";
        variable MN_Var : std_logic_vector(7 downto 0) := x"00";
        variable HR_Var : std_logic_vector(7 downto 0) := x"00";
        variable DT_Var : std_logic_vector(7 downto 0) := x"00";
        variable MO_Var : std_logic_vector(7 downto 0) := x"00";
        variable YR_Var : std_logic_vector(7 downto 0) := x"00";
        variable DW_Var : std_logic_vector(7 downto 0) := x"00";
date := ntpToRTC(timestamp_var);
                                SC_Var := std_logic_vector(to_unsigned(date(0),8));
                                MN_Var := std_logic_vector(to_unsigned(date(1),8));
                                HR_Var := std_logic_vector(to_unsigned(date(2),8)) or x"80";
                                DT_Var := std_logic_vector(to_unsigned(date(3),8));
                                MO_Var := std_logic_vector(to_unsigned(date(4),8));
                                YR_Var := std_logic_vector(to_unsigned(date(5),8));
                                DW_Var := "00000000";

The function I call fills the data with integers representing year, month, day... I also tried putting each conversion in a sepearate state and it made no difference.

Any help much appreciated

23 Replies