本帖最后由 xiaohuihui1989 于 2015-1-17 16:15 编辑
2输入与非门
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
EN
tiTY AND IS
PORT (A,B:IN STD_LOGIC;
Y:OUT STD_LOGIC)
END ENTITY AND;
ARCHITECTURE AND2 OF AND IS
BEGIN
T1:PROCESS(A,B)IS
VARIABLE COMB:STD_LOGIC_VECTOR(1 DOWNTO 0);
BEGIN
COMB:=A&B;
CASE COMB IS
WHEN "00"=>Y<='1';
WHEN "01"=>Y<='1';
WHEN "10"=>Y<='1';
WHEN "11"=>Y<='0';
WHEN OTHERS=>Y<='X';
END CASE;
END PROCESS T1;
END ARCHITECTURE AND2;
错误提示为:
Error (10500): VHDL syntax error at AND.vhd(3) near text "AND"; expecting an identifier
Error (10500): VHDL syntax error at AND.vhd(7) near text "AND"; expecting an identifier
求解答
Error (10500): VHDL syntax error at AND.vhd(7) near text "AND"; expecting an identifier
LZ 试试这个:
一周热门 更多>