mul3.vhd

来自「FPGA语音通信平台设计实例哦」· VHDL 代码 · 共 22 行

VHD
22
字号
library ieee;
use ieee.std_logic_1164.all;

entity mul3 is
port(in1,in2,in3:std_logic_vector(7 downto 0);
     sela,selb,selc:in std_logic;
     dout:out std_logic_vector(7 downto 0)
     );
end mul3;
architecture behav of mul3 is
signal sel:std_logic_vector(2 downto 0);
begin
process(sela,selb,selc)
begin
if sela='0' then dout<=in1;
elsif selb='0' then dout<=in2;
elsif selc='0' then dout<=in3;
end if;
end process;
end behav;

⌨️ 快捷键说明

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