Bonjour,
j'ai un petit code trés simple que réalise un compteur, cependant j'ai quelques erreurs:
Comment puis-je faire fonctionner ce programme ?Code:ERROR:HDLCompiler:1731 - Line 49: found '0' definitions of operator "+", cannot determine exact overloaded matching definition for "+" ERROR:HDLCompiler:806 - Line 54: Syntax error near "<=". ERROR:HDLCompiler:1728 - Line 54: Type error near q ; current type std_logic_vector; expected type void ERROR:HDLCompiler:806 -Line 56: Syntax error near "Behavioral". ERROR:HDLCompiler:841 - Line 56: Expecting type void for <behavioral>.
Merci
Code:library IEEE; use IEEE.STD_LOGIC_1164.ALL; --use ieee.std_logic_unsigned.ALL; use IEEE.numeric_std.all; entity compteur is Port ( CLK : in STD_LOGIC; Qs : out STD_LOGIC_VECTOR (3 downto 0)); end compteur; architecture Behavioral of compteur is signal q : std_logic_vector(3 downto 0); begin process(clk) begin if (rising_edge(clk)) then if(q = "1111") then q <= "0000" ; else q <= q + 1; end if ; end if; end process Qs <= q ; end Behavioral;
-----