首 页文档资料下载资料维修视频包年699元
请登录  |  免费注册
当前位置:精通维修下载 > 文档资料 > 家电技术 > 维修教程知识 > 学习园地
[VHDL实例]解复用器
来源:本站整理  作者:佚名  2006-07-19 19:10:23



------------------------------------------------------------------------------------
-- DESCRIPTION   :  Demultiplexer
--                  Width: 8
--                  Number of terminals: 4
--                  Output enable active: HIGH
--                  Output active : HIGH
------------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.STD_LOGIC_UNSIGNED.all;
entity dmux is
          port (
                    EN : in STD_LOGIC;
                    DATA_OUT0 : out STD_LOGIC_VECTOR (7 downto 0);
                    DATA_OUT1 : out STD_LOGIC_VECTOR (7 downto 0);
                    DATA_OUT2 : out STD_LOGIC_VECTOR (7 downto 0);
                    DATA_OUT3 : out STD_LOGIC_VECTOR (7 downto 0);
                    SEL : in STD_LOGIC_VECTOR (1 downto 0);
                    DATA_IN : in STD_LOGIC_VECTOR (7 downto 0)
          );
end entity;
architecture dmux_arch of dmux is
constant NON_ACTIVE : STD_LOGIC_VECTOR (7 downto 0) := (others => '0');
begin
 
          DATA_OUT0 <= DATA_IN when (SEL = 0) and (EN = '1') else NON_ACTIVE;
          DATA_OUT1 <= DATA_IN when (SEL = 1) and (EN = '1') else NON_ACTIVE;
          DATA_OUT2 <= DATA_IN when (SEL = 2) and (EN = '1') else NON_ACTIVE;
          DATA_OUT3 <= DATA_IN when (SEL = 3) and (EN = '1') else NON_ACTIVE;
 
end architecture;

关键词:

文章评论评论内容只代表网友观点,与本站立场无关!

   评论摘要(共 0 条,得分 0 分,平均 0 分)

推荐阅读

图文阅读

热门阅读

Copyright © 2007-2017 down.gzweix.Com. All Rights Reserved .
页面执行时间:11,820.31000 毫秒