Sé que esta puede ser una pregunta muy simple. Tengo que simular algunos retrasos para varios sumadores en ISE Suite. ¡( estoy un poco familiarizado con los conceptos vhdl pero ISE Medio Ambiente , no en absoluto ! )
este es el Código vhdl para Carry select adder :
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
use work.all ;
library UNISIM;
use UNISIM.VComponents.all;
entity csa is
generic (
WIDTH : natural := 32 -- adder will add WIDTH bits, should be a power of 2
);
-- some port mappings ..
end csa;
architecture csa_arch of csa is
component csa is
generic (
WIDTH : natural
);
port (
op_1 : in std_logic_vector(WIDTH-1 downto 0);
op_2 : in std_logic_vector(WIDTH-1 downto 0);
c_in : in std_logic;
sum : out std_logic_vector(WIDTH-1 downto 0);
c_out : out std_logic
);
end component;
signal sum_loc_0 : std_logic_vector(WIDTH-1 downto 0);
signal sum_loc_1 : std_logic_vector(WIDTH-1 downto 0);
signal c_out_loc_0 : std_logic_vector(1 downto 0);
signal c_out_loc_1 : std_logic_vector(1 downto 0);
begin
base_case : if (WIDTH = 1) generate
full_adder_0 : full_adder -- GENERATES ERROR --
port map (
op_1 => op_1(0),
op_2 => op_2(0),
c_in => '0',
sum => sum_loc_0(0),
c_out => c_out_loc_0(1)
);
end generate;
y la línea que crea un componente de la entidad sumadora completa aumenta el error:
Line 44: full_adder is not a component
el sumador completo está definido en un archivo separado: ( en el mismo proyecto que otro módulo vhdl )
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
library work ;
library UNISIM;
use UNISIM.VComponents.all;
entity full_adder is
port (
op_1 : in std_logic;
op_2 : in std_logic;
c_in : in std_logic;
sum : out std_logic;
c_out : out std_logic
);
end full_adder;
architecture full_adder_arch of full_adder is
begin
sum <= op_1 xor op_2 xor c_in;
c_out <= (op_1 and c_in) or (op_2 and c_in) or (op_1 and op_2);
end full_adder_arch;