fourmux6.vhd

来自「DDS直接数字频率合成器」· VHDL 代码 · 共 34 行

VHD
34
字号
--fourmux6
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;

entity fourmux6 is
  port(
       s:in integer range 0 to 5;
      a,b,c,d,e,f:in integer range 0 to 9;          
         fout:out integer range 0 to 9
); 
end;

architecture a of fourmux6 is
begin
 process(s)
begin
 if(s=0) then
fout<=a;
elsif(s=1) then
fout<=b;
elsif(s=2) then
fout<=c;
elsif(s=3) then
fout<=d;
elsif(s=4) then
fout<=e;
elsif(s=5) then
fout<=f;
end if;
end process;
end;

⌨️ 快捷键说明

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