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

📄 mux8.vhd

📁 在maxplusII上用VHDL语言编程实现的数字基带信号的同步提取
💻 VHD
字号:
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
USE IEEE.STD_LOGIC_ARITH.ALL;

entity mux8 is
port(d:in std_logic_vector(31 downto 0);
     sel:in std_logic_vector(2 downto 0);
     y:out std_logic_vector(3 downto 0));
end mux8;

architecture rtl of mux8 is
signal s:std_logic_vector(2 downto 0);
signal n:std_logic_vector(3 downto 0);

begin
 s<=sel;
  process(d,sel)
  begin
    case s is
    when "111"=>n<=d(3 downto 0);
    when "110"=>n<=d(7 downto 4);
    when "101"=>n<=d(11 downto 8);
    when "100"=>n<=d(15 downto 12);
    when "011"=>n<=d(19 downto 16);
    when "010"=>n<=d(23 downto 20);
    when "001"=>n<=d(27 downto 24);
    when others=>n<=d(31 downto 28);
  end case;
  end process;
   y<=n;     
  end rtl;


⌨️ 快捷键说明

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