1.端口图

2.VHDL语言

2.1case语句
library ieee; use ieee.std_logic_1164.all; entity mux4 is port(a,b,c,d : in
std_logic; s1,s2 : in std_logic; z : out std_logic); end mux4; architecture
behave of mux4 is signal s: std_logic_vector(1 downto 0); begin s <= s1&s2;
process(a,b,c,d,s1,s2) begin case s is when "00" => z <= a; when "01" => z <= b;
when"10" => z <= c; when "11" => z <= d; when others => z <= 'X'; end case;
end process; end behave;
if语句
architecture behave of mux4 is signal s : std_logic_vector(1 downto 0); begin s
<= s1&s2; process(a,b,c,d,s1,s2) begin if(s = "00") then z <= a; elsif(s = "01")
then z<= b; elsif(s = "10")then z <= c; else z <= d; end if; end process; end
behave;

技术
©2019-2020 Toolsou All rights reserved,
在算法研究过程中如何进行算法创新七大排序算法(java代码)MYSQL中的索引与事务———javaweb(8)(面试必考)2022蓝桥杯JavaB组省赛试题网络安全-wifi攻防网络层协议——ICMP协议MySQL查询表中指定条件下的最新记录JavaSE笔记(一)Java基础语法mysql 查询条件之外的数据_mysql 查询符合条件的数据qt使用数据库sqlite