四位串行移位寄存器设计的VHDL实现代码 25
展开全部
library ieee;
use ieee.std_logic_1164.all;
entity mux4_1 is
port(d0,d1,d2,d3,a1,a2:in std_logic;
q:out std_logic);
end entity mux4_1;
architecture rtl of mux4_1 is
signal sel:std_logic_vector(1 downto 0);
begin
sel<=a1&a2;
process(sel) is
begin
case sel is
when "00"=>q<=d0;
when "01"=>q<=d1;
when "10"=>q<=d2;
when "11"=>q<=d3;
when others=>q<='X';
end case;
end process;
end architecture rtl;
use ieee.std_logic_1164.all;
entity mux4_1 is
port(d0,d1,d2,d3,a1,a2:in std_logic;
q:out std_logic);
end entity mux4_1;
architecture rtl of mux4_1 is
signal sel:std_logic_vector(1 downto 0);
begin
sel<=a1&a2;
process(sel) is
begin
case sel is
when "00"=>q<=d0;
when "01"=>q<=d1;
when "10"=>q<=d2;
when "11"=>q<=d3;
when others=>q<='X';
end case;
end process;
end architecture rtl;
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询