mux2to1.vhd
来自「CPLDFPGA嵌入式应用开发技术白金手册所配套源代码」· VHDL 代码 · 共 23 行
VHD
23 行
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity mux2to1 is
port(a :in std_logic;
b :in std_logic;
sel:in std_logic;
c:out std_logic);
end mux2to1;
architecture rtl of mux2to1 is
begin
process(sel,a,b)
begin
if(sel='0')then
c<=a;
else
c<=b;
end if;
end process;
end rtl;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?