Quartus II VHDL Error (10482): 'STD_LOGIC_VECTOR' Not Declared - Solution & Corrected Code
I apologize for the previous incorrect fix. Based on the error message, I have identified several issues:
-
In the ENTITY section,
STD_LOGIC_VECTORshould be corrected toSTD_LOGIC_VECTOR. -
In the ARCHITECTURE section,
OFshould be corrected toIS. -
In the ARCHITECTURE section,
STD_LOGIC_VECTORshould be corrected toSTD_LOGIC_VECTOR.
Here's the corrected code:
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY ADD8bit IS
PORT(A, B: IN STD_LOGIC_VECTOR(7 DOWNTO 0);
Cin: IN STD_LOGIC;
Y: OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
Cout: OUT STD_LOGIC);
END ADD8bit;
ARCHITECTURE ONE OF ADD8bit IS
SIGNAL AA, BB, temp: STD_LOGIC_VECTOR(8 DOWNTO 0);
BEGIN
AA <= '0' & A;
BB <= '0' & B;
temp <= AA + BB + Cin;
Y <= temp(7 DOWNTO 0);
Cout <= temp(8);
END ONE;
Please try compiling this corrected code. If you encounter any further errors, please provide the error message so I can assist you better.
原文地址: http://www.cveoy.top/t/topic/bAYF 著作权归作者所有。请勿转载和采集!