并行乘法器-南京理工大学紫金学院vhdl实验报告-eda_第1页
并行乘法器-南京理工大学紫金学院vhdl实验报告-eda_第2页
并行乘法器-南京理工大学紫金学院vhdl实验报告-eda_第3页
并行乘法器-南京理工大学紫金学院vhdl实验报告-eda_第4页
并行乘法器-南京理工大学紫金学院vhdl实验报告-eda_第5页
已阅读5页,还剩5页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论