S
Santosh
Guest
I have got a clock divider code as follows:
entity divClk8 is
Port ( CLK : in std_logic;
CLK_OUT : out std_logic);
end divClk8;
architecture Behavioral of divClk8 is
signal count : std_logic_vector (3 downto 0) := "1111";
signal reset : std_logic := '0';
begin
process(CLK)
begin
if(reset = '1') then
count <= "0000";
elsif(rising_edge(CLK)) then
count <= count + 1;
end if;
end process;
CLK_OUT <= count(3);
reset <= (count(3) and not(count(2))and not(count(1))and
not(count(0)));
end Behavioral;
But when I try to compile it using ModelSim I get the following error
-- No feasible entries for infix operator "+". Type error resolving
infix expression "+" as type ieee.std_logic_1164.std_logic_vector.
I didn't get what the error message says. A little word of advice
would be really helpful!
Regards
San
entity divClk8 is
Port ( CLK : in std_logic;
CLK_OUT : out std_logic);
end divClk8;
architecture Behavioral of divClk8 is
signal count : std_logic_vector (3 downto 0) := "1111";
signal reset : std_logic := '0';
begin
process(CLK)
begin
if(reset = '1') then
count <= "0000";
elsif(rising_edge(CLK)) then
count <= count + 1;
end if;
end process;
CLK_OUT <= count(3);
reset <= (count(3) and not(count(2))and not(count(1))and
not(count(0)));
end Behavioral;
But when I try to compile it using ModelSim I get the following error
-- No feasible entries for infix operator "+". Type error resolving
infix expression "+" as type ieee.std_logic_1164.std_logic_vector.
I didn't get what the error message says. A little word of advice
would be really helpful!
Regards
San