library ieee;
use ieee.std_logic_1164.all;
entity exa_2_7 is
port(a0:in std_logic_vector(3 downto 0);
a1:in std_logic_vector(3 downto 0);
a2:in std_logic_vector(3 downto 0);
a3:in std_logic_vector(3 downto 0);
a5:in std_logic_vector(3 downto 0);
b0:in std_logic;
b1: in std_logic;
q: out std_logic_vector(3 downto 0));
end exa_2_7;
architecture behave of exa_2_7 is
begin
labela: process(a0,a1,a2,a3,b0,b1)
variable tmp :integer;
begin
tmp:=0;
if(b0='1') then
tmp:=tmp+1;
end if;
if(b1='1')then
tmp:=tmp + 2;
end if;
case tmp is
when 0=>q<=a0;
when 1=>q<=a1;
when 2=>q<=a2;
when 3=>q<=a3;
when others=>null;
end case;
end process;
end behave;
error1: unsupported feature error: channel of width>=32 is not supported
error2: unsupported feature error: cannot process the ' others' choice作者: kenail 时间: 2004-12-4 12:15
不是你的case有问题,是variable tmp :integer; 这条语句有问题,integer 数据超过了32位,所以case不再支持了,你可以改成variable tmp :integer range 0 to 15 ;