Altera_Forum
Honored Contributor
14 years agoWrong answer when calling component
I'm having a big problem. I'm in this over 10 hours and can't fix it.
I have a project that works fine. But I want to call it as a component inside other project. I'm sure that the right values are going to the component, but it returns me the wrong answer. And if I test it individually with the same values it returns the right answer. Maybe when working with arrays is different tha way to call a component? Does someone knows some possible reason to that? I didn't put the part of the code where the array "sinal_entrada_a" receives the values, but I tested and I'm sure it have the right numbers.
LIBRARY ieee;
USE ieee.std_logic_1164.all;
PACKAGE matrizes IS
TYPE array_t IS ARRAY (0 TO 7, 0 to 7) OF STD_LOGIC_VECTOR(0 TO 7);
TYPE array_t2 IS ARRAY (0 TO 7, 0 to 7) OF STD_LOGIC_VECTOR(0 TO 11);
END matrizes;
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE work.matrizes.all;
ENTITY rct_512 IS
PORT (
clk: IN STD_LOGIC;
entrada: IN STD_LOGIC_VECTOR(7 DOWNTO 0);
saida: OUT array_t2
);
END rct_512;
ARCHITECTURE comportamento OF rct_512 IS
signal sinal_entrada_a: array_t;
COMPONENT rct IS
PORT (
clk: IN STD_LOGIC;
entrada: IN array_t;
saida: OUT array_t2
);
END COMPONENT;
BEGIN
label_10: rct PORT MAP (clk, sinal_entrada_a, saida);
END comportamento;
Thank you very much!