Compiler errors 使用了VHDL错误(10482)对象标准逻辑向量,但未声明
我已经写了一些关于使用全加器作为组件的8位加法器的代码。当我开始编译时,它显示了一个我找不到的错误。我可能还有其他我注意不到的错误。 这是我的密码:Compiler errors 使用了VHDL错误(10482)对象标准逻辑向量,但未声明,compiler-errors,vhdl,quartus,Compiler Errors,Vhdl,Quartus,我已经写了一些关于使用全加器作为组件的8位加法器的代码。当我开始编译时,它显示了一个我找不到的错误。我可能还有其他我注意不到的错误。 这是我的密码: library ieee; use ieee.std_logic_1164.all; entity F_A is port( a,b,c_in : in std_logic; sum,c_out : out std_logic); end F_A; architecture behave of F_A is
library ieee;
use ieee.std_logic_1164.all;
entity F_A is
port(
a,b,c_in : in std_logic;
sum,c_out : out std_logic);
end F_A;
architecture behave of F_A is
begin
sum <= a xor b xor c_in;
c_out <= (a and b)or(a and c_in)or(b and c_in);
end behave;
entity Adder_8bit is
port( a,b: in std_logic_vector(7 downto 0);
Cin: in std_logic;
sum: out std_logic_vector(7 downto 0);
Cout: out std_logic);
end Adder_8bit;
architecture RTL of Adder_8bit is
signal c : std_logic_vector(7 downto 0);
component F_A
port( a,b,c_in : in std_logic;
sum,c_out: out std_logic);
end component;
begin
FA0 : F_A
port map(a(0),b(0),Cin,sum(0),c(0));
FA1 : F_A
port map(a(1),b(1),c(0),sum(1),c(1));
FA2 : F_A
port map(a(2),b(2),c(1),sum(2),c(2));
FA3 : F_A
port map(a(3),b(3),c(2),sum(3),c(3));
FA4 : F_A
port map(a(4),b(4),c(3),sum(4),c(4));
FA5 : F_A
port map(a(5),b(5),c(4),sum(5),c(5));
FA6 : F_A
port map(a(6),b(6),c(5),sum(6),c(6));
FA7 : F_A
port map(a(7),b(7),c(6),sum(7),c(7));
Cout <= c(7);
end RTL;
上下文条款适用于以下主要设计单元,即实体或包。您需要在每个实体之前重复,即:
上下文条款适用于以下主要设计单元,即实体或包。您需要在每个实体之前重复,即:
Error (10482): VHDL error at Adder_8bit.vhd(17): object "std_logic_vector" is used but not declared
library ieee;
use ieee.std_logic_1164.all;
entity Adder_8bit is