📄 mux2to1.vhd
字号:
--mux2to1.vhd n-bit 2-to-1 multiplexer
library ieee ;
use ieee.std_logic_1164.all ;
entity mux2to1 is
generic ( n : integer := 14 ) ;
port (
w0 : in std_logic_vector(n-1 downto 0) ;--input first term
w1 : in std_logic_vector(n-1 downto 0) ;--input second term
s : in std_logic ;--select line
f : out std_logic_vector(n-1 downto 0) ) ;--output seleted term
end mux2to1 ;
architecture behavior of mux2to1 is
begin
with s select
f <= w0 when '0',
w1 when others ;
end behavior ;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -