设为首页
加入收藏
联系站长
首页 | 文章中心 | 下载中心 | 本站商品 | 学习资料 | 
您现在的位置: 电子爱好者 >> 文章中心 >> 数字电路 >> 正文 用户登录 新用户注册
[VHDL实例]多路选择器(使用if-else语句)          【字体:
[VHDL实例]多路选择器(使用if-else语句)
作者:佚名    文章来源:本站原创    点击数:    更新时间:2006-2-17

-- Multiplexer 16-to-4 using if-then-elsif-else Statement

 

library ieee;

use ieee.std_logic_1164.all;

 

entity mux is port(

        a, b, c, d:     in std_logic_vector(3 downto 0);

        s:              in std_logic_vector(1 downto 0);

        x:              out std_logic_vector(3 downto 0));

end mux;

 

architecture archmux of mux is

begin

mux4_1: process (a, b, c, d)

        begin

                if s = "00" then

                        x <= a;

                elsif s = "01" then

                        x <= b;

                elsif s = "10" then

                        x <= c;

                else

                        x <= d;

                end if;

        end process mux4_1;

end archmux;

文章录入:admin    责任编辑:admin 
  • 上一篇文章: [VHDL实例]8位总线收发器:74245(注2)

  • 下一篇文章: [VHDL实例]多路选择器(使用when-else语句)
  • 发表评论】【告诉好友】【打印此文】【关闭窗口
       最新热点    最新推荐    相关文章
  • [VHDL实例]地址译码(for m68…

  • [VHDL实例]加法器描述

  • [VHDL实例]8位相等比较器

  • [VHDL实例]解复用器

  • [VHDL实例]三态总线(注2)

  • |VHDL实例|双向总线(注2)

  • [VHDL实例]多路选择器(使用c…

  • [VHDL实例]多路选择器(使用w…

  • [VHDL实例]多路选择器(使用…

  • [VHDL实例]8位总线收发器:7…

  • 网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)  
    {$PopAnnouceWindow(400,440)}