- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Laboratory Exercise 1
Switches, Lights, and Multiplexers
ED 实验参与答案
Part1
library ieee;
use ieee.std_logic_1164.all;
entity part1 is
port(SW :in std_logic_vector(17 downto 0);
LEDR :out std_logic_vector(17 downto 0));
end part1;
architecture Behavior of part1 is
begin
LEDR = SW;
end Behavior;
part2
library ieee;
use ieee.std_logic_1164.all;
--a 2 to 1 multiplexer entity
entity mux21 is
port(in_x, in_y, in_s :in std_logic;
out_m :out std_logic);
end mux21;
--a 2 to 1 multiplexer architecture
architecture structural of mux21 is
signal u, v : std_logic;
begin
u = in_x and (not in_s);
v = in_y and in_s ;
out_m = u or v ;
end structural;
--a eight-bit wide 2 to 1 multiplexer
library ieee;
use ieee.std_logic_1164.all;
--eight-bit wide 2 to 1 multiplexer entity
entity mux21_8bit is
port(
SW : in std_logic_vector (17 downto 0);
--SW: in std_logic_vector (15 downto 8);
--SW: in std_logic_vector (17 downto 17);
LEDR : out std_logic_vector (7 downto 0));
end mux21_8bit;
--eight-bit wide 2 to 1 multiplexera rchitecture
architecture Structural of mux21_8bit is
component mux21
port(in_x, in_y, in_s :in std_logic;
out_m :out std_logic);
end component;
begin
U1: mux21 port map (in_x=SW(0), in_y=SW(8), in_s=SW(17), out_m=LEDR(0));
U2: mux21 port map (in_x=SW(1), in_y=SW(9), in_s=SW(17), out_m=LEDR(1));
U3: mux21 port map (in_x=SW(2), in_y=SW(10), in_s=SW(17),
out_m=LEDR(2));
U4: mux21 port map (in_x=SW(3), in_y=SW(11), in_s=SW(17),
out_m=LEDR(3));
您可能关注的文档
最近下载
- 人教版高中数学精讲精练必修二101 随机事件与概率(精练)(原卷版).pdf VIP
- SYT6391-2014 SEG D Rev3.0地震数据记录格式.pdf VIP
- 2025至2030中国硬盘行业发展分析及发展趋势分析与未来投资战略咨询研究报告.docx
- 石楼南煤层气勘查实施方案.docx VIP
- 人教版高中数学精讲精练必修一1.2 集合间的关系(精讲)(解析版).pdf VIP
- IPV4和IPV6地址.ppt VIP
- 秀出你风采——ppt创意动画知到智慧树期末考试答案题库2024年秋黑龙江幼儿师范高等专科学校.docx VIP
- 我国辽中南工业区等.ppt VIP
- 重大事故隐患安全管理制度.docx VIP
- 电子海图课件--TOKYO-KEIKI8600.ppt VIP
原创力文档


文档评论(0)