VHDL——4选1数据选择器
数据 选择器 VHDL
2023-09-11 14:22:52 时间
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;
相关文章
- PHP Mysql-插入多条数据
- FPGA中case语句4选1数据选择器
- Google Earth Engine ——Google Earth Engine ——ALOS World 3D - 30m (AW3D30) 是一个全球数字表面模型 (DSM) V2_2版本数据集
- 数据说:春节前假冒银行诈骗短信影响200万人
- 《R语言数据挖掘:实用项目解析》——第1章,第1.5节索引或切分数据框
- 《R数据可视化手册》——2.3 绘制条形图
- Jsoup获取部分页面数据失败 org.jsoup.UnsupportedMimeTypeException: Unhandled content type. Must be text/*, application/xml, or application/xhtml+xml.
- Scrapy 2.6 Selectors 数据选择器使用指南
- SwiftUI 2.0 List 实力加强新增呈现分层数据功能(wwdc20 教程含源码)
- pt-table-checksum工具MySQL主从复制数据一致性
- 智慧医疗大数据现状和需求的矛盾
- element-ui中el-date-picker时间选择器限制选择7天内数据、获取某一天0点或23:59:59
- 浅析JSR303数据校验
- 大数据征信面临的挑战与对策
- 从大数据的应用现状,看企业运营决策该何去何从
- nodejs 在MYSQL 数据库中插入和查询数据