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

2019-04-15 18:46

使用if_then语句来描述四选一数据选择器 library ieee;

use ieee.std_logic_1164.all; entity ze is

port(s0,s1 : in std_logic; a,b,c,d : in std_logic; y:out std_logic); end ze;

architecture ab of ze is

signal s: std_logic_vector(1 downto 0); begin

s<=s1&s0; process(s) begin

if s<=\elsif s<=\elsif s<=\else y<=d; end if;

end process; end ab;

使用case语句来描述四选一数据选择器 library ieee;

use ieee.std_logic_1164.all; entity xuan is

port(s0,s1 : in std_logic; a,b,c,d : in std_logic; y:out std_logic); end xuan;

architecture ab of xuan is

signal s: std_logic_vector(1 downto 0); begin

s<=s1&s0; process(s) begin case s is

when \ when \ when \ when \ when others=>null; end case; end process; end ab;

使用when_else语句来描述四选一数据选择器

library ieee;

use ieee.std_logic_1164.all; entity xuan is

port(s0,s1 : in std_logic; a,b,c,d : in std_logic; y:out std_logic); end xuan;

architecture ab of xuan is

signal s: std_logic_vector(1 downto 0); begin

s<=s1&s0;

y<=a when s<=\ b when s<=\

c when s<=\ d ;

end ab;


VHDL语言 四选一数据选择器 多种描述.doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:广东省幼儿园教育指南(试行)

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: