library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity conv_enc is
Port ( clk : in STD_LOGIC;
rst : in STD_LOGIC;
inp : in STD_LOGIC;
outp : out STD_LOGIC_VECTOR(3 DOWN TO 0));
end conv_enc;
architecture Behavioral of conv_enc is
begin
process
variable ff:std_logic_vector(3 down to 0);
begin
wait until rising_edge (clk)
if rst='1' then
ff<="0000";
else
for i in 2 down to 0 loop
ff(i)<=ff(i+1);
end loop;
ff(3)<=inp;
end if;
end process;
outp(0) <= inp xor ff(1) xor ff(0) ;
outp(1) <= inp xor ff(3) xor ff(2) xor ff(1) ;
outp(2) <= inp xor ff(3) xor ff(2) xor ff(1) xor ff(0);
end Behavioral;
错误说:HDLParsers:3481 - 图书馆工作没有单位。没有为它保存参考文件“xst/work/hdlib.ref”。请帮忙