BEGIN
IF(CLK'EVENT AND CLK='1') THEN
IF NC=4 THEN
IF DATA_F(2)='1'THEN --上锁控制信号有效 (0100)
REG<=ACC; --密码存储
QA<='1'; QB<='0';
ELSIF DATA_F(0)='1'THEN --开锁控制信号有效 (0001)
IF REG<=ACC THEN --密码核对
QA<='0'; QB<='1';
ELSE
IF CNT="11"THEN
ALERT<='1';CNT<="00";
ELSE
CNT<=CNT+1;QA<='1';QB<='0';ALERT<='0';
END IF;
END IF;
ELSIF ACC<="1000100010001000"THEN
--设置"8888"为万用密码
QA<='0';QB<='1';
END IF;
END IF;
END PROCESS;
程序出现以下问题error:line 7:assignment statement must have ':='or'<=',but found<identifier> REG instead.
error:line 10:assignment statement must have ':='or'<=',but found IF instead.
不知道怎么改,求帮忙