第一范文网 - 专业文章范例文档资料分享平台

实验五 用VHDL语言进行多位减法器的设计

来源:用户分享 时间:2020-06-22 本文由只剩骄傲 分享 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

实验5 用VHDL语言进行多位减法器的设计

一、实验目的

学习在QuartusⅡ下用VHDL语言设计复杂组合电路与功能仿真的方法。 二、实验仪器设备 1、PC机一台 2、QuartusⅡ。 三、实验要求

1、预习教材中的相关内容,编写出多位减法器的VHDL源程序。

2、用VHDL语言输入方式完成电路设计,编译、仿真后,在试验箱上实现。 四、实验内容及参考实验步骤

1、用VHDL语言设计一个半减器。并进行编译仿真。

2、在半减器的基础上,利用元件例化语句,设计一个一位的全减器,并编译仿真。

3、在一位全减器的基础上,利用元件例化语句,设计一个8位的全减器,并编译仿真。 五、实验报告

1、根据实验过程写出试验报告 2、总结用VHDL语言的设计流程 1、总结复杂组合电路的设计方法。 附录

1、半减器程序 library ieee;

use ieee.std_logic_1164.all;

entity h_suber is port(x,y:in std_logic;

diff,s_out:out std_logic); end entity h_suber;

architecture bhv of h_suber is begin

process(x,y) begin

diff<=x xor y;

s_out<=(not x) and y; end process;

end architecture bhv;

2、一位全减器程序 library ieee;

use ieee.std_logic_1164.all;

entity suber is

port(x,y,sub_in:in std_logic;

diffr,sub_out:out std_logic); end entity suber;

architecture bhv of suber is component h_suber port(x,y:in std_logic;

diff,s_out:out std_logic); end component;

signal t0,t1,t2:std_logic; begin

u1:h_suber port map(x=>x,y=>y,diff=>t0,s_out=>t1);

u2:h_suber port map(x=>t0,y=>sub_in,diff=>diffr,s_out=>t2); sub_out<=t1 or t2; end architecture bhv;

3、8位全减器程序 library ieee;

use ieee.std_logic_1164.all;

entity sub8 is

port(a,b: in std_logic_vector(7 downto 0); sin: in std_logic; sout: out std_logic;

c: out std_logic_vector(7 downto 0)); end entity sub8;

architecture bhv of sub8 is component suber

port(x,y,sub_in:in std_logic;

diffr,sub_out:out std_logic); end component;

signal t:std_logic_vector(6 downto 0); begin

u0:suber port map(x=>a(0),y=>b(0),sub_in=>sin,diffr=>c(0),sub_out=>t(0)); u1:suber port map(x=>a(1),y=>b(1),sub_in=>t(0),diffr=>c(1),sub_out=>t(1)); u2:suber port map(x=>a(2),y=>b(2),sub_in=>t(1),diffr=>c(2),sub_out=>t(2)); u3:suber port map(x=>a(3),y=>b(3),sub_in=>t(2),diffr=>c(3),sub_out=>t(3)); u4:suber port map(x=>a(4),y=>b(4),sub_in=>t(3),diffr=>c(4),sub_out=>t(4)); u5:suber port map(x=>a(5),y=>b(5),sub_in=>t(4),diffr=>c(5),sub_out=>t(5)); u6:suber port map(x=>a(6),y=>b(6),sub_in=>t(5),diffr=>c(6),sub_out=>t(6)); u7:suber port map(x=>a(7),y=>b(7),sub_in=>t(6),diffr=>c(7),sub_out=>sout); end architecture bhv;

搜索“diyifanwen.net”或“第一范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,第一范文网,提供最新幼儿教育实验五 用VHDL语言进行多位减法器的设计 全文阅读和word下载服务。

实验五 用VHDL语言进行多位减法器的设计 .doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/wenku/1096828.html(转载请注明文章来源)
热门推荐
Copyright © 2018-2022 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top