1个回答
展开全部
我试试,程序如下:
library IEEE;
use IEEE.std_logic_1164.all;
entity choose_8_1 is
port( a,b,c,d,e,f,g,h : in std_logic_vector( 7 downto 0 );
choose : in std_logic_vector( 2 downto 0 );
Z : out std_logic_vector( 7 downto 0 ) );
end choose_8_1;
architecture Medied of choose_8_1 is
begin
process(choose)
begin
case choose is
when "000" => Z<=a;
when "001" => Z<=b;
when "010" => Z<=c;
when "011" => Z<=d;
when "100" => Z<=e;
when "101" => Z<=f;
when "110" => Z<=g;
when others => Z<=h;
end case;
end process;
end Medied;
希望你以后自己多动手写,安装个Quartus II,自己学,进步很快的。
——Medied.Lee
library IEEE;
use IEEE.std_logic_1164.all;
entity choose_8_1 is
port( a,b,c,d,e,f,g,h : in std_logic_vector( 7 downto 0 );
choose : in std_logic_vector( 2 downto 0 );
Z : out std_logic_vector( 7 downto 0 ) );
end choose_8_1;
architecture Medied of choose_8_1 is
begin
process(choose)
begin
case choose is
when "000" => Z<=a;
when "001" => Z<=b;
when "010" => Z<=c;
when "011" => Z<=d;
when "100" => Z<=e;
when "101" => Z<=f;
when "110" => Z<=g;
when others => Z<=h;
end case;
end process;
end Medied;
希望你以后自己多动手写,安装个Quartus II,自己学,进步很快的。
——Medied.Lee
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询