作业帮 > 综合 > 作业

纯小白在写作业,可是map过不去?报错啊.求助! xilinx,ISE

来源:学生作业帮 编辑:百度作业网作业帮 分类:综合作业 时间:2024/05/09 18:40:43
纯小白在写作业,可是map过不去?报错啊.求助! xilinx,ISE

写期末作业,很简单的键盘译码.但是在map中过不去,貌似是键盘扫描程序有问题.贴在下面了,下面还有report,问题简单,大家不要笑,麻烦指出错误,谢谢!为什么被删了那么多信号呢?report中.

 

 

library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

use IEEE.STD_LOGIC_ARITH.ALL;

use IEEE.STD_LOGIC_UNSIGNED.ALL;

ENTITY KEY_SCAN IS

PORT (

clk : IN std_logic:='0'; 

row : IN std_logic_vector(3 DOWNTO 0):="1111"; -- 键盘行向量

press : OUT std_logic:='0'; 

column : BUFFER std_logic_vector(3 DOWNTO 0); -- 输出列向量

code : BUFFER std_logic_vector(3 DOWNTO 0):="ZZZZ" -- 键盘编码0~f

); 

END KEY_SCAN;

ARCHITECTURE Behavioral OF KEY_SCAN IS

SIGNAL clk_scan : std_logic;

SIGNAL code_old : std_logic_vector(3 DOWNTO 0):="ZZZZ"; 

SIGNAL cnt_key : integer range 1 to 8; 
BEGIN

process(clk)

variable tt: integer:=0;

begin

tt:=tt+1;

if(tt=9) then tt:=1; end if; 

cnt_key<=tt;

end process;

process(clk,cnt_key)

begin

if(cnt_key<5)then

clk_scan<='1';

else

clk_scan<='0'; 

end if;

end process;

process(clk_scan)

variable t: integer:=0;

begin

if(clk_scan'EVENT and clk_scan='1')then

case t is

when 0=>column<="1110";

when 1=>column<="1101";

when 2=>column<="1011";

when 3=>column<="0111";

when others=>null;

end case;

t:=t+1;

if(t=4) then t:=0; end if; 

end if;

end process;

process(clk)

begin 

if(cnt_key>1 and cnt_key<5)then

case column is 

when "1110" =>

case row is

when "1110" =>code<= "0000";

when "1101" =>code<= "0001"; 

when "1011" =>code<= "0010";

when "0111" =>code<= "0011"; 

when OTHERS =>code<= "ZZZZ"; 

end case;

省略一部分译码

when OTHERS =>code<= "ZZZZ";

end case;

when OTHERS =>code<= "ZZZZ";

end case;

else

code<= "ZZZZ";

end if;

if(cnt_key=4) then

code_old<=code;

end if;

end process;

process(clk)

begin

if(code_old/=code and code/="ZZZZ") then

if(cnt_key=3) then

press<='1';

else

press<='0';

end if;

else

press<='0';

end if;

end process; 

END Behavioral;



这是report.

 

Section 1 - Errors

------------------

ERROR:MapLib:661 - LUT3 symbol "XLXI_4/_n0046131" (output signal=CHOICE875) has

input signal "XLXI_4/_n0034" which will be trimmed. See the trim report for

details about why the input signal will become undriven.

省略

 

Section 5 - Removed Logic

 

The signal "XLXI_4/t<1>" is unused and has been removed.

The signal "XLXI_4/code_old<2>" is unused and has been removed.

The signal "XLXI_4/code_old<0>" is unused and has been removed.

The signal "XLXI_4/key_scan__n0007<4>_cyo" is unused and has been removed.

 

省略

纯小白在写作业,可是map过不去?报错啊.求助! xilinx,ISE
这个这么长... 你把工程发我邮箱1962983818@qq.com 我看看