我正在尝试为电路创建此代码,但它告诉我存在错误。 代码是:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity seq is
port( CLK : in std_logic;
GEN : in std_logic;
INI : in std_logic;
B : in std_logic_vector(3 downto 0);
Qo : out std_logic_vector(3 downto 0)
);
end seq;
architecture behavior of seq is
signal Qo_pre: std_logic_vector(3 downto 0);
begin
process (GEN, INI, CLK, B)
begin
if INI='1' then
Qo <= B;
elsif (INI='0' and GEN='1' and rising_edge(CLK)) then
Qo(0)<= Qo_pre(1);
Qo(1)<= Qo_pre(2);
Qo(2)<= Qo_pre(3);
end if;
end process;
Qo(3)<= not Qo_pre(3) when (INI='0' and GEN='1' and rising_edge(CLK) and (Qo_pre(3) xnor Qo_pre(0))='1')
end behavior;
出现的错误是: 第51行。解析错误,意外IDENTIFIER
请帮助:(答案 0 :(得分:0)
您在end behavior;
之前的作业中缺少分号。
当我将代码粘贴到我的工具中时,它就在第31行。