Probème de compilation sur Quartus II
Publié : 25 mai 2005 14:03
bonjour à tous,
Voilà j'ai problème, je n'arrive pas à compiler mon code VHDL sur quartus II(logiciel d'Altera). Alors que sur Galaxy (logiciel de Cypres), j'y arrivais.
Voici mon code en VHDL a l'expension *.vhd :
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity compteur is port (
clk : in bit;
Q : out bit_vector(3 downto 0));
end compteur;
architecture description of compteur is
signal cpt : integer range 15 downto 0;
begin
process(clk)
begin
if (clk='1' and clk'event) then
cpt <= cpt + 1;
end if;
end process;
Q <= bit_vector(cpt);
end description;
et voici le message d'erreur :
Error: VHDL Type Conversion error at cpt.vhd(22): integer type cannot be converted to bit_vector type
Error: Ignored construct description at cpt.vhd(12) because of previous errors
je ne comprends pas pourquoi il ne veut pas convertir le type integer en type bit_vector.
Merci d'avance pour votre aide.
Voilà j'ai problème, je n'arrive pas à compiler mon code VHDL sur quartus II(logiciel d'Altera). Alors que sur Galaxy (logiciel de Cypres), j'y arrivais.
Voici mon code en VHDL a l'expension *.vhd :
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity compteur is port (
clk : in bit;
Q : out bit_vector(3 downto 0));
end compteur;
architecture description of compteur is
signal cpt : integer range 15 downto 0;
begin
process(clk)
begin
if (clk='1' and clk'event) then
cpt <= cpt + 1;
end if;
end process;
Q <= bit_vector(cpt);
end description;
et voici le message d'erreur :
Error: VHDL Type Conversion error at cpt.vhd(22): integer type cannot be converted to bit_vector type
Error: Ignored construct description at cpt.vhd(12) because of previous errors
je ne comprends pas pourquoi il ne veut pas convertir le type integer en type bit_vector.
Merci d'avance pour votre aide.