原创 帖一个用VHDL实现4位MUX的简单程序.

2010-2-23 00:31 1579 4 4 分类: 汽车电子

VHDL 4位MUX的实现,很简单,调试玩玩.


 


entity mux is
 port(a,b,c,d,sel_0,sel_1:in bit;out_1:out bit);
end mux;


architecture example of mux is
 begin
  process(a,b,c,d,sel_0,sel_1)
   begin
    case bit_vector'(sel_0 & sel_1) is
     when "00" => out_1<=a;
     when "01" => out_1<=b;
     when "10" => out_1<=c;
     when "11" => out_1<=d;
    end case;
  end process;
end example;

PARTNER CONTENT

文章评论0条评论)

登录后参与讨论
EE直播间
更多
我要评论
0
4
关闭 站长推荐上一条 /3 下一条