




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
EDA技术与应用实验报告实验名称:并行乘法器姓名:学号:班级:通信时间:2013南京理工大学紫金学院电光系实验目的1、学习包集和元件例化语句的使用。2、学习FLU(全加器单元)电路的设计。3、学习并行乘法电路的设计。实验原理并行乘法器的电路原理图如下图所示,主要由全加器和与门构成。并行乘法器原理图实验内容and_2libraryieee;useieee.std_logic_1164.all;entityand_2is port(a,b:instd_logic; y:outstd_logic);endand_2;architectureand_2ofand_2isbegin y<=aandb; endand_2;componentlower_rowis port(sin,cin:instd_logic_vector(2downto0); p:outstd_logic_vector(3downto0));endcomponent;endmy_components;multiplierlibraryieee;useieee.std_logic_1164.all;usework.my_components.all;entitymultiplieris port(a,b:instd_logic_vector(3downto0); prod:outstd_logic_vector(7downto0));endmultiplier;architecturestructuralofmultiplieris typematrixisarray(0to3)of std_logic_vector(2downto0); signals,c:matrix;begin U1:componenttop_rowportmap(a(0),b,s(0),c(0), prod(0)); U2:componentmid_rowportmap(a(1),b,s(0),c(0),s(1), c(1),prod(1)); U3:componentmid_rowportmap(a(2),b,s(1),c(1),s(2), c(2),prod(2)); U4:componentmid_rowportmap(a(3),b,s(2),c(2),s(3), c(3),prod(3)); U5:componentlower_rowportmap(s(3),c(3), prod(7downto4));endstructural;8、仿真9、把multiplier代码改为百位、十位、个位输出代码如下:libraryieee;useieee.std_logic_1164.all;useieee.std_logic_unsigned.all;usework.my_components.all;entitymultiplieris port(a,b:instd_logic_vector(3downto0); hun,ten,one:outstd_logic_vector(3downto0));endmultiplier;architecturestructuralofmultiplieris typematrixisarray(0to3)of std_logic_vector(2downto0); signals,c:matrix; signalp:std_logic_vector(7downto0);begin U1:componenttop_rowportmap(a(0),b,s(0),c(0), p(0)); U2:componentmid_rowportmap(a(1),b,s(0),c(0),s(1), c(1),p(1)); U3:componentmid_rowportmap(a(2),b,s(1),c(1),s(2), c(2),p(2)); U4:componentmid_rowportmap(a(3),b,s(2),c(2),s(3), c(3),p(3)); U5:componentlower_rowportmap(s(3),c(3), p(7downto4));process(p)variabletemp:std_logic_vector(7downto0);begin ifp>"1100_0111"then hun<="0010"; temp:=p-"1100_1000"; elsifp>"0110_0011"then hun<="0001"; temp:=p-"0110_0100"; else hun<="0000"; temp:=p; endif; iftemp>"0101_1001"then ten<="1001"; temp:=temp-"0101_1010"; elsiftemp>"0100_1111"then ten<="1000"; temp:=temp-"1010_0000"; elsiftemp>"0100_0101"then ten<="0111"; temp:=temp-"0100_0110"; elsiftemp>"0011_1011"then ten<="0110"; temp:=temp-"0011_1100"; elsiftemp>"0011_0001"then ten<="0101"; temp:=temp-"0011_0010"; elsiftemp>"0010_0111"then ten<="0100"; temp:=temp-"0010_1000"; elsiftemp>"0001_1101"then ten<="0011"; temp:=temp-"0001_1110"; elsiftemp>"0001_0011"then ten<="0010"; temp:=temp-"0001_0100"; elsiftemp>"0000_1001"then ten<="0001"; temp:=temp-"00
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 设计公司晋升管理制度
- 设计装修公司管理制度
- 诊所职工健康管理制度
- 试制车间安全管理制度
- 财务销售仓库管理制度
- 财富公司运营管理制度
- 货代公司安全管理制度
- 货物现场包装管理制度
- 货站疫情防控管理制度
- 2025年中国定制首饰行业市场全景分析及前景机遇研判报告
- 森林草原防火 无人机巡查技术规范 编制说明
- 2025-2030中国发泡聚苯乙烯泡沫行业市场现状供需分析及投资评估规划分析研究报告
- 2025年江苏省苏州吴中、吴江、相城区初三英语一模试题及答案
- 智能化汽车中的专利战略布局-洞察阐释
- 不寐的中医护理常规
- 2024年新疆维吾尔自治区、新疆生产建设兵团中考语文试卷(含答案与解析)
- 《能源的科普讲解》课件
- 2025至2030年中国精致石英砂滤料行业投资前景及策略咨询报告
- 2025年安庆桐城经开区建设投资集团有限公司招聘12人笔试参考题库附带答案详解
- 保育师(高级)职业技能鉴定参考试题(附答案)
- 高性能耐磨材料设计-全面剖析
评论
0/150
提交评论