关于quartus 11的错误
时间:10-02
整理:3721RD
点击:
新手求救,这是一个很简单的程序,但是编译时老是说有错误,这是怎么回事,我用的是quartus 11 9.1版本
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY decoder IS
PORT(A,B,C:IN BOOLEAN;
Y:OUT BOOLEAN);
END ENTITY decoder;
ARCHITECTURE FUN OF decoder IS
BEGIN
PROCESS (A,B,C)IS
BEGIN
VARIABLE N:BOOLEAN;
BEGIN
IF A THEN N:=B;
ELSE N:=C;
END IF;
Y<=N;
END PROCESS;
END ARCHITECTURE FUN;
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY decoder IS
PORT(A,B,C:IN BOOLEAN;
Y:OUT BOOLEAN);
END ENTITY decoder;
ARCHITECTURE FUN OF decoder IS
BEGIN
PROCESS (A,B,C)IS
BEGIN
VARIABLE N:BOOLEAN;
BEGIN
IF A THEN N:=B;
ELSE N:=C;
END IF;
Y<=N;
END PROCESS;
END ARCHITECTURE FUN;
library ieee;
use ieee.std_logic_1164.all;
ENTITY decoder IS
PORT(A,B,C:IN BOOLEAN;
Y:OUT BOOLEAN);
END ENTITY decoder;
ARCHITECTURE FUN OF decoder IS
begin
PROCESS (A,B,C)IS
VARIABLE N:BOOLEAN;
BEGIN
IF A THEN N:=B;
ELSE N:=C;
END IF;
Y<=N;
END PROCESS;
END ARCHITECTURE FUN;
红色部件修改成这样就可以了。你的begin位置不对。我已经编译通过了。