⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mux4.vhd

📁 用vhdl硬件语言设计的16位cpu
💻 VHD
字号:
-- mux4.vhd

-- This module implements a 4-to-1 multiplexor for ALU

-- Inputs: 
--    A, B, C, D  - 16-bit mux inputs 
--    Sel         - 2-bit Select for mux 

-- Outputs: 
--    Z           - 16-bit mux output

-- Author:    Easyright
-- E-mail:    support@easyright.net
-- Date:      17-08-2003
-- Copyright: http://www.EasyRight.net

------------------------------------------------------------------------------------------------------ 

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;

entity mux4 is
  port (
    Sel:        in std_logic_vector(1 downto 0);
    A, B, C, D: in std_logic_vector(15 downto 0);
    Z:          out std_logic_vector(15 downto 0)
  );
end mux4;

architecture arc_mux4 of mux4 is
begin
  with Sel select 
    Z <= A when "00",
         B when "01", 
         C when "10", 
         D when "11", 
         A when others;
end arc_mux4;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -