📄 mux.vhdl
字号:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
-- Uncomment the following lines to use the declarations that are
-- provided for instantiating Xilinx primitive components.
--library UNISIM;
--use UNISIM.VComponents.all;
entity mux is
port(mode:in std_logic_vector(1 downto 0);
sindata:in std_logic_vector(7 downto 0);
squadata: in std_logic_vector(7 downto 0);
tridata:in std_logic_vector(7 downto 0);
ddsdata:out std_logic_vector(7 downto 0)
);
end mux;
architecture Behavioral of mux is
begin
process(mode,sindata,squadata,tridata)
begin
if mode="00" then
ddsdata<=sindata;
elsif mode="01" then
ddsdata<=squadata;
elsif mode="10" then
ddsdata<=tridata;
else ddsdata<=sindata;
end if;
end process;
end Behavioral;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -