EDN首页   博客首页

日志档案

发表于 2008-1-16 11:13:19

0

标签: VHDL  MUX  多路复用  

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

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;

系统分类: 汽车电子   |   用户分类: FPGA   |   来源: 原创   |   【推荐给朋友】   |   【添加到收藏夹】

    阅读(471)    回复(0)  

投一票您将和博主都有获奖机会!