资源描述:
《并行乘法器-南京理工大学紫金学院vhdl实验报告.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、EDA技术与应用实验报告实验名称:并行乘法器姓名:学号:班级:通信时间:2013南京理工大学紫金学院电光系一、实验目的1、学习包集和元件例化语句的使用。2、学习FLU(全加器单元)电路的设计。3、学习并行乘法电路的设计。二、实验原理并行乘法器的电路原理图如下图所示,主要由全加器和与门构成。并行乘法器原理图三、实验内容1、and_2libraryieee;useieee.std_logic_1164.all;entityand_2isport(a,b:instd_logic;y:outstd_logic);endand_2;architectureand_
2、2ofand_2isbeginy<=aandb;endand_2;1、faulibraryieee;useieee.std_logic_1164.all;entityfauisport(a,b,cin:instd_logic;s,cout:outstd_logic);endfau;architecturefauoffauisbegins<=axorbxorcin;cout<=(aandb)or(aandcin)or(bandcin);endfau;2、top_rowlibraryieee;useieee.std_logic_1164.all;usewor
3、k.my_components.all;entitytop_rowisport(a:instd_logic;b:instd_logic_vector(3downto0);sout,cout:outstd_logic_vector(2downto0);p:outstd_logic);endtop_row;architecturestructuraloftop_rowisbeginU1:componentand_2portmap(a,b(3),sout(2));U2:componentand_2portmap(a,b(2),sout(1));U3:compo
4、nentand_2portmap(a,b(1),sout(0));U4:componentand_2portmap(a,b(0),p);cout(2)<='0';cout(1)<='0';cout(0)<='0';endstructural;3、mid_rowlibraryieee;useieee.std_logic_1164.all;usework.my_components.all;entitymid_rowisport(a:instd_logic;b:instd_logic_vector(3downto0);sin,cin:instd_logic_
5、vector(2downto0);sout,cout:outstd_logic_vector(2downto0);p:outstd_logic);endmid_row;architecturestructuralofmid_rowissignaland_out:std_logic_vector(2downto0);beginU1:componentand_2portmap(a,b(3),sout(2));U2:componentand_2portmap(a,b(2),and_out(2));U3:componentand_2portmap(a,b(1),
6、and_out(1));U4:componentand_2portmap(a,b(0),and_out(0));U5:componentfauportmap(sin(2),cin(2),and_out(2),sout(1),cout(2));U6:componentfauportmap(sin(1),cin(1),and_out(1),sout(0),cout(1));U7:componentfauportmap(sin(0),cin(0),and_out(0),p,cout(0));endstructural;1、lower_rowlibraryiee
7、e;useieee.std_logic_1164.all;usework.my_components.all;entitylower_rowisport(sin,cin:instd_logic_vector(2downto0);p:outstd_logic_vector(3downto0));endlower_row;architecturestructuraloflower_rowissignallocal:std_logic_vector(2downto0);beginlocal(0)<='0';U1:componentfauportmap(sin(
8、0),cin(0),local(0),p(0),local(1));U2:com