实验五 用VHDL语言进行多位减法器的设计
更新时间:2023-09-17 12:33:01 阅读量: 幼儿教育 文档下载
- 实验五推荐度:
- 相关推荐
实验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;
正在阅读:
略谈杠杆原理的应用11-24
安全生产例会制度12-25
老师给的国贸实务答案(案例更新到第七章)12-07
信息系统分析与设计第二次作业02-01
幼儿园任课教师安全责任书05-13
市妇联主席三八节致辞12-30
实验一 常见网络命令的使用03-14
十九大微党课演讲稿08-01
- 元旦晚会节目单
- 学案
- 光电显示技术期末复习资料 - 图文
- p2p与供应链结合案例
- 2016--2017学年度第二学期五年级班主任工作计划
- 尔雅2017年西藏的历史和文化期末考试满分答案解析
- 智慧树创新工程实践期末考试答案
- 六年级下美术教案-有趣的纸浮雕广西版
- 设备操作规程汇编
- 通信综合实训系统实验报告
- 南京财经大学金融学期末考试简答题
- 现代服务业发展规划研究 - 图文
- 锚杆支护工知识竞赛题
- 实验五
- 债权法习题集及详细解答
- 上海寺庙大全 - 图文
- 机会成本在企业决策中的应用研究
- 高考总复习语文选择题百题精炼第一季专题01 识记现代汉语字音(教师版)
- A9785-B中文资料
- 56m连续梁主墩冷却管布置技术交底
- 法器
- 语言
- 实验
- 进行
- 设计
- VHDL
- 第十九讲 高考议论文结构训练
- 八年级上册语文第一单元电子教案(1)
- 经济应用数学(习题参考答案)
- 谈谈道德与幸福的关系
- Microsoft Visual Studio C++2010 教程 - 图文
- 2010届高三政治我国的政党和政治制度测试题
- 2014-2019年中国电网市场调研与投资决策咨询报告 - 图文
- 个人调研报告
- 关于举办全省第二届中学物理教师实验创新大赛的通知
- 弱电系统基础知识
- 2015生产运作管理作业参考答案j - 图文
- 北京市顺义区2017届初三一模英语试卷及答案 听力录音
- 数据类型、运算符与表达式练习题
- 2014年护士执业资格考试考前押题卷 实践能力
- 成品烟道安装施工专项方案
- 一个比较精细的正项级数判别法
- 商业银行市场风险资本要求标准法计量规则
- 2017高考二轮(通用版)英语复习对点练:专题四 动词的时态和语态 Word版含答案
- 仁布县旅游资源评价与开发
- 亲子活动总结范例十篇