mux8_2.vhd
来自「CPLDFPGA嵌入式应用开发技术白金手册 》源代码」· VHDL 代码 · 共 22 行
VHD
22 行
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity mux8_2 is
generic(n:integer:=24);
port(
sel:in bit;
A,B:in std_logic_vector(7 downto 0);
Y:out std_logic_vector(7 downto 0));
end mux8_2;
architecture behave of mux8_2 is
signal data:std_logic_vector(7 downto 0);
begin
with sel select
data<=A when '1',
B when '0';
Y<=data;
end behave;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?