错误
Else clause following a clock edge must hold the state of signal"d7"我在Q2上可以编译,但是到MAX+2上就不能~模块也不能生成,学校试验箱只能支持MAX+2,毕设的最后一步了 搞了好久都过不去~求大神们帮忙啊~
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;
en
tity xian is
port (
clk:in std_logic;
en:in std_logic;
data0:in std_logic_vector(3 downto 0);
data1:in std_logic_vector(3 downto 0);
data2:in std_logic_vector(3 downto 0);
data3:in std_logic_vector(3 downto 0);
data4:in std_logic_vector(3 downto 0);
data5:in std_logic_vector(3 downto 0);
data6:in std_logic_vector(3 downto 0);
data7:in std_logic_vector(3 downto 0);
led:out std_logic_vector(7 downto 0);
we:out std_logic_vector(7 downto 0)
);
end xian;
architecture one of xian is
component display is
port(
din:in std_logic_vector(3 downto 0);
dout:out std_logic_vector(7 downto 0));
end component;
signal d0,d1,d2,d3,d4,d5,d6,d7:std_logic_vector(3 downto 0);
signal dd0,dd1,dd2,dd3,dd4,dd5,dd6,dd7:std_logic_vector(7 downto 0);
begin
U1: display port map(d0,dd0);
U2: display port map(d1,dd1);
U3: display port map(d2,dd2);
U4: display port map(d3,dd3);
U5: display port map(d4,dd4);
U6: display port map(d5,dd5);
U7: display port map(d6,dd6);
U8: display port map(d7,dd7);
process(en)
begin
if(en='0') then
d0<=d0;
d1<=d1;
d2<=d2;
d3<=d3;
d4<=d4;
d5<=d5;
d6<=d6;
d7<=d7;
else
d0<=data0;
d1<=data1;
d2<=data2;
d3<=data3;
d4<=data4;
d5<=data5;
d6<=data6;
d7<=data7;
end if;
end process;
process(clk)
variable cnt2:std_logic_vector(3 downto 0);
begin
if clk'event and clk='1' then cnt2:=cnt2+1;
if cnt2="0001" then
we<="11111110";
led<=dd0;
elsif cnt2="0010" then
we<="11111101";
led<=dd1;
elsif cnt2="0011" then
we<="11111011";
led<=dd2;
elsif cnt2="0100" then
we<="11110111";
led<=dd3;
elsif cnt2="0101" then
we<="11101111";
led<=dd4;
elsif cnt2="0110" then
we<="11011111";
led<=dd5;
elsif cnt2="0111" then
we<="10111111";
led<=dd6;
elsif cnt2="1000" then
we<="01111111";
led<=dd7;
cnt2:="0000";
end if;
end if;
end process;
end one;
一周热门 更多>