VHDL语言 四选一数据选择器 多种描述.doc

上传人:cn****1 文档编号:557484716 上传时间:2023-10-27 格式:DOC 页数:3 大小:33.50KB
返回 下载 相关 举报
VHDL语言 四选一数据选择器 多种描述.doc_第1页
第1页 / 共3页
VHDL语言 四选一数据选择器 多种描述.doc_第2页
第2页 / 共3页
VHDL语言 四选一数据选择器 多种描述.doc_第3页
第3页 / 共3页
亲,该文档总共3页,全部预览完了,如果喜欢就下载吧!
资源描述

《VHDL语言 四选一数据选择器 多种描述.doc》由会员分享,可在线阅读,更多相关《VHDL语言 四选一数据选择器 多种描述.doc(3页珍藏版)》请在金锄头文库上搜索。

1、使用if_then语句来描述四选一数据选择器library ieee;use ieee.std_logic_1164.all;entity ze isport(s0,s1 : in std_logic; a,b,c,d : in std_logic; y:out std_logic);end ze;architecture ab of ze issignal s: std_logic_vector(1 downto 0);begins=s1&s0;process(s)beginif s=00 then y=a;elsif s=01 then y=b;elsif s=10 then y=c;el

2、se y=d;end if;end process; end ab; 使用case语句来描述四选一数据选择器library ieee;use ieee.std_logic_1164.all;entity xuan isport(s0,s1 : in std_logic; a,b,c,d : in std_logic; y:out std_logic);end xuan;architecture ab of xuan issignal s: std_logic_vector(1 downto 0);begins y y y ynull; end case;end process; end ab;

3、 使用when_else语句来描述四选一数据选择器library ieee;use ieee.std_logic_1164.all;entity xuan isport(s0,s1 : in std_logic; a,b,c,d : in std_logic; y:out std_logic);end xuan;architecture ab of xuan issignal s: std_logic_vector(1 downto 0);begins=s1&s0;y=a when s=00 else b when s=01 else c when s=10 else d ; end ab;

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 生活休闲 > 社会民生

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号