Altera_Forum
Honored Contributor
15 years agoCompiler error help
hey guys,
I'm trying to compile some code but i keep getting the following error: Error (10028): Can't resolve multiple constant drivers for net "ctr[3]" at MainTimer2.vhd(43) here is the file that is causing the problem: library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.numeric_std.all; use IEEE.numeric_std; entity MainTimer2 is port( CLK : in std_logic; CLK_en: in std_logic; count_en: in std_logic; syst_reset: in std_logic; maxNUM: in std_logic_vector(3 downto 0); ctr: inout std_logic_vector(3 downto 0); finished: inout std_logic); end entity MainTimer2; architecture behavioral of MainTimer2 is signal en : std_logic; begin process(CLK) begin if (syst_reset = '1') then ctr<=maxNum; finished<='1'; end if; if(RISING_EDGE(CLK) and count_en='1') then if(finished='1') then en<='0'; else en<='1'; end if; end if; end process; process (CLK_en) begin if(RISING_EDGE(CLK_en) and en='1' ) then if (ctr = "0000") then ctr<="0000"; finished<='1'; else ctr<=ctr-1; finished<='0'; end if; end if; end process; end behavioral ; the error is being generated from the second process statement but i dont understand why. any help would be greatly appreciated.