16位定点数原码一位乘法器的设计与实现---本科毕业论文.docx

上传人:夺命阿水 文档编号:884668 上传时间:2024-01-07 格式:DOCX 页数:19 大小:78.25KB
返回 下载 相关 举报
16位定点数原码一位乘法器的设计与实现---本科毕业论文.docx_第1页
第1页 / 共19页
16位定点数原码一位乘法器的设计与实现---本科毕业论文.docx_第2页
第2页 / 共19页
16位定点数原码一位乘法器的设计与实现---本科毕业论文.docx_第3页
第3页 / 共19页
16位定点数原码一位乘法器的设计与实现---本科毕业论文.docx_第4页
第4页 / 共19页
16位定点数原码一位乘法器的设计与实现---本科毕业论文.docx_第5页
第5页 / 共19页
点击查看更多>>
资源描述

《16位定点数原码一位乘法器的设计与实现---本科毕业论文.docx》由会员分享,可在线阅读,更多相关《16位定点数原码一位乘法器的设计与实现---本科毕业论文.docx(19页珍藏版)》请在课桌文档上搜索。

1、计算机科学与工程学院课程设计报告题目全称:16位定点数原码一位乘法器的设计与实现课程名称:计算机组成原理指导老师:谭浩职称:序号学生姓名学号班号成绩1刘晓窗201206001000620120600102李育桥201206001002520120600103郭建准4李浩5李志飞678910(注:学生姓名填写按学生对该课程设计的贡献及工作量由高到底排列,分数按排名依次递减。序号排位为“1”的学生成绩最高,排位为“10”的学生成绩最低。)指导老师评语:签字:摘要VerilogHDL语言具有下述描述能力:设计的行为特性、设计的数据流特性、设计的结构组成以及包含响应监控和设计验证方面的时延和波形产生机

2、制。本实验用VerilOgHDL语言设计了全加器实现的组合乘法器,通过功能仿真,验证了结果。关键词:乘法器,Verilog,组合逻辑,全加器AbstractABSTRACTText.Keywords:目录(自动插入目录)第一章绪论11.1 选题背景及意义11.2 国内外研究现状11.3主要内容与章节安排11. 4本章小结1第二章课程设计的需求分析32. 1环境需求32.2功能需求32. 3性能需求32. 3本章小结3第三章*的设计63. 1总体设计63. 2功能模块设计63. 3本章小结6第四章*的实现83.1 开发环境介绍83.2 主要功能模块的实现84. 3本章小结15第五章测试及成果展示

3、185. 1测试环境185.2测试用例和结果185.3成果展示205.4本章小结20第六章总结与展望23参考文献24第一章绪论第一章绪论1.1 选题背景及意义随着计算机科学技术的发展,人们获得信息的途径更加多样,获取信息的速度更加快捷。硬件的发展允许程序员编出很多精彩的使用软件,也使得计算机更加普及。中央处理器CPU的好坏是影响和制约计算机速度和性能的关键因素。而加法器是组成CPU的的重要部件,一般运算速度的快慢就取决与每秒执行加法的次数,加法器是算术逻辑单元中的基本逻辑器件。例如:为了节省资源,减法器和硬件乘法器都可由加法器来构成。1.2 国内外研究现状1.3 主要内容与章节安排1.4 本章

4、小结第二章课程设计的需求分析2.1 环境需求PC、Win7、ise7.1xc3sl00e-4VqlOO芯片、2.2 功能需求x、y为两个16位定点数,Z为32位数,作为输出。实现16位定点数乘法。2.3 性能需求2.4 本章小结第三章16位乘法器的设计3.1 总体设计3.2 功能模块设计3.3 本章小结第四章*的实现4.1 开发环境介绍4.2 主要功能模块的实现modulemulti16(x,y,clock,z);input15:0x,y;定义乘数inputclock;定义时钟clockoutput31:0z;定义和的输出zreg15:0reg_x;定义寄存器xreg15:0reg_y;定义寄

5、存器yreg31:0reg_z;定义寄存器zwire16:0p,pl,p2,p3,p4,p5,p6,p7,p8,p9,pl,plI,pl2,pl3,pl4,pl5;定义分别用来存储a十六位与b的每一位相与的结果wire75:0jl,kl;wire50:0j2,k2;Wire32:0j3,k3;wire22:0j4,k4;wire15:0j5,k5;wire6:0j6,k6;wire2:0j7,k7;wire8:0j8,k8;Wire21:0j9,k9;assignz=reg_z;将寄存器Z的内容赋给输出和Zalways(posedgeCIoCk)时序逻辑语句块beginreg_x=x;/将加数

6、X的值存到寄存器reg_x中reg_y=y;将被加数y的值存到寄存器reg_y中reg-z=j921,k921ik920,k9l9,k9l8917,k9l6,k9l5,k914,k9l3,k9l2,k9ll91099,k98,k97,k96,k95,k94,k93,k92,k9l,k90,k8070,k60,k50,k40,k30,k20,kl0,p00J/分别求得的和的每一位赋给reg_zend对a的16位与b的每一位相与PPppO(reg_x,reg_yO,pO);PPppl(reg_x,reg_yl,pl);PPpp2(reg_x,reg_y2,p2);PPpp3(reg_x,reg_y

7、3,p3);PPpp4(reg_x,reg_y41,p4);PPpp5(reg_x,reg_y5,p5);PPpp6(reg_x,reg_y6,6);PPpp7(reg_x,reg_y7,7);PPpp8(reg_x,reg_y8,8);PPpp9(reg_x,reg_y9,p9);PPPPIO(reg_x,reg_y10,p10);pppp11(reg_x,reg_y11,11);PPPP2(reg_x,reg_yl2,p12);PPPP13(reg_x,reg_y131,p13);PPPP14(reg_x,reg_y14,p14);PPpp15(reg_x,reg_y15Lpl5);调用全

8、加器与半加器,通过实例化求得利的每一位与每位的进位信号halfadderhal(pl,pl0,kl0,jl0);fulladderfal(p2,pll,p20,kll,jll);fulladderfa2(p3,pl2,p2l,k112,j12);fulladderfa3(p4,p13,p22,kl3,j13);fulladderfa4(p5,pl4,p23,kl4,j14);fulladderfa5(pO6J,pl5,p24J,kl5,jl5);fulladderfa6(p7,p116J,p25,k16J,jI6);fulladderfa7(p8,p17,p26,k17,jI7);fullad

9、derfa8(p9,pl8,p27,kl8,j18);fulladderfa9(p010,pl9,p28,kl9,j19);fulladderfa10(p0ll,pl10,p29,kll0,j1110);fulladderfa11(pf12,p111l,p210,k1111Lj111);fulladderfa12(p0l3,p112,p2ll,kl12,jll2);fulladderfal3(pOl4,pll3Lp2l2,kl13jll3);fulladderfal4(p15,pl14,p213,kl14J114);fulladderfa15(pl15Lp2141,p3131,kl15,jl1

10、5);fulladderfa16(p215Lp314Lp413,kl16jll6);fulladderfal7(p315,p414,p513,kl17Ljl17);fulladderfal8(p4151,p5l46l3,kl18,j118);fulladderfa19(p5151,p614,p7131,kl191,j1191);fulladderfa20(p615,p7l4,p813,kl20J12O);fulladderfa21(p715,p814,p9l3,kl2HJ12H);fulladderfa22(p8151,p9l4,p1013,kl22,j122);fulladderfa23(p

11、915,p10l4,p1113,k123,j1231);fulladderfa24(p1015,pll14,pl213l24,j124);fulladderfa25(pIl15,pl214tpl313,kl25,j1251);fulladderfa26(pl215,pl314,pl413,kl26jl26);fulladderfa27(pl315,pl414,pl513,kl27jl27);fulladderfa28(p32,p4l,p5,kl28jl28);fulladderfa29(p33,p4,p5l,kl29JI29);fulladderfa30(p34,p4f3,p52,kl30.j

12、I30);fulladderfa31(p35,p44,p53,kl31jl31);fulladderfa32(p36,p45,p54,kl32JI32);fulladderfa33(p37,p46,p55,kl33JI331);fulladderfa34(p38,p4f7,p561,kI34J134);fulladderfa35(p39,p48,p57,kl351,jl351);fulladderfa36(p3ll,p49,p58,kl36,j136);fulladderfa37(p3ll,p410,p59,kl37,j137);fulladderfa38(p3l2,p41l,p510,kl3

13、8,j138);fulladderfa39(p412,p511,p610,kI39,j139);fulladderfa40(p512,p611,p710,kl40,jl40);fulladderfa4l(p6l2Lp7ll,p810,kl41,jl41);fulladderfa42(p7l21,p811,p910,kl42,j1421);fulladderfa43(p812,p911,pl101,kl43Lj143);fulladderfa44(p9l2l0lILpl110,kl44,jI44);fulladderfa45(p1012,pl111H,pl2lO,kl45j145);fullad

14、derfa46(pIl12,pl2ll,pl3lO,kl461,j1461);fulladderfa47(p1212,pl311,pl410Jcl47J147);fulladderfa48(p1312,pl411,pl5fl0,kl48,j148);fulladderfa49(p62,p71,p8O,k149,j149);fulladderfa50(p63J,p72,p8l,kl5OJ,jl50);fulladderfa51(p64,p73,p82,kl51,jl51);fulladderfa52(p651,p74,p83,kl52JI52);fulladderfa53(p66,p751,p8

15、4,kl53jI531);fulladderfa54(p67,p76,p851,kI54J154);fulladderfa55(p68,p77,p86Lkl551,jl551);fulladderfa56(p69,p78,p87,kl56J1(56);fulladderfa57(p79,p881,p971,kl57jI57);fulladderfa58(p89,p98,p107,k158,j158);fulladderfa59(p99,pI08,pll7,kl59j1591);fulladderfa60(pl09,pll8,pl27,kl60,jl60);fulladderfa61(pll9,

16、pl28,pl37,kl61,jl61);fulladderfa62(p129,p138,p1471.kl62,j1621);fulladderfa63(p1391,p148,p157,kl63jI631);fulladderfa64(p92,p10l,pllO,kl64,j164);fulladderfa65(p93,p102,pl11,kl65,j165);fulladderfa66(p94,pl3,pll2,kl66,jl66);fulladderfa67(p95,pl4,pll3,kl67,jl671);fulladderfa68(p96,pl5,pll4,kl68jl68);full

17、adderfa69(pl61,pll5,pl24,kl69,jl69);fulladderfa70(pll6,p125,pl34,kl70,jl70);fulladderfa71(p1261,p135,p144,kl71J1711);fulladderfa72(p136,pl451,p154,kl72j172);fulladderfa73(pl22,p13l,pl40,kl73j1731);fulladderfa74(p1231,p13,p14ll,kl74J174);fulladderfa75(p133,p142,p15ll75jI75);halfadderha2(kl11,jl01,k20

18、1J20);fulladderfa76(kl2,p30,jH1,k211l,j2l);fulladderfa77(kl3,p3ILp40,k221,j22);fulladderfa78(k14,kl28,jl3,k23J23);fulladderfa79(kl5,kl29,p60,k24,j241);fulladderfa8O(kI6,kl30,p6l,k25J251);fulladderfa8l(kl7,k1311149,k26,j26);fulladderfa82(kl8,kl32,kl50,k271,j27);fulladderfa83(k191,k133,k151,k28,j28);f

19、ulladderfa84(k110,kl34,k152,k29,j29);fulladderfa85(kl11l,k35,kl53,k210J210);fulladderfa86(k112,k136,k154,k2ll,j211U);fulladderfa87(k113,k137,kl55,k2l2J212);fulladderfa88(kll4,kl38,kI56,k213,j213);fulladderfa89(kl15,kl39,kl57,k2l4J214);fulladderfa90(k1161,kl40,kl58,k215j215);fulladderfa91(kl(17,kI4l,

20、kl591,k2l6j2l6);fulladderfa92(k118,kI42,kl60,k217j217);fulladderfa93(kl19,kl43,kI61,k2l8j2l8J);fulladderfa94(k120,kl44,kl62,k2l9j2l9);fulladderfa95(k12l,kl45,kl63,k220j220);fulladderfa96(k122,kl46,p149,k22H,j221);fulladderfa97(kl23,kl47,p159,k222J222);fulladderfa98(kl24,kl48j123,k223J223);fulladderf

21、a99(kl251,pl412,pl5llkk224,j2241);fulladderfal00(kl26,pl512Jl25,k225,j225);fulladderfal01(pl415,pl514,jl27,k226,j226);fulladderfa102(p701,j15,jI29,k227,j227);fulladderfaI03(p901,jl7,jl31,k2r28,j228);fulladderfa!04(p9l,plOOJ18,k229,j229);fulladderfal05(kl64,jl9.j133,k230,j230);fulladderfa106(kl65,p12

22、0,j110,k231J23I);fulladderfal07(kl66,pl2l,pl30,k232J232);fulladderfal08(kl67,k173,j112,k233j233);fulladderfal09(kl68,k174,p150,k234,j234);fulladderfal10(kl69,kl75,j114,k235,j235);fulladderfalll(kl70,p143,p152,k236,j236);fulladderfall2(kl71,pl53jll6,k237,j237);fulladderfal13(kl72,jI17,jl41,k238,j238)

23、;fulladderfa114(p146,p1551,j118,k239,j239);fulladderfal15(pl56,j119,ji43,k24O,j24O);fulladderfal16(jl20,jl44,jl62,k24l,j241);fulladderfaH7(pl58,j12l,jI45,k242,j242);fulladderfall8(jl34,jl52,jI64,k243,j243);fulladderfa119(j111J135j153244J244);fulladderfa1200136jl541,j166,k245J245);fulladderfa121(j113

24、,j137,jI55,k246,j2461);fulladderfal22。138,jl56LjI68,k247,j247);fulladderfal23(jl115jl391,jI57,k248,j248);fulladderfa124。140,jl581,jl70,k249J249);fulladderfal25(jl42,jI601,j172,k250J250);halfadderha3(j20,k2l,k301J30);fulladderfal26(k22j21,j12,k31l,j3l);fulladderfal27(k24j23,j14,k32j32);fulladderfal28

25、(k25J24,k227,k33J33);fulladderfal29(k26J25,j227,k34,j34);fulladderfal30(k27,j26,k228,k35,j35);fulladderfal31(k28J27,k229,k36J36);fulladderfal32(k29j28,k230,k37j37);fulladderfal33(k210j29,k231,k38,j38);fulladderfal34(k2111J210,k232,k39,j39);fulladderfa135(k2l2J211J,k233,k3l0j3l0);fulladderfa136(k2l3J

26、J212,k234,k3llj3ll);fulladderfa137(k2l4J2l3,k235,k3l2,j3l2);fulladderfa138(k215J214,k236tk313,j313);fulladderfa139(k216,j215,k237,k314J314);fulladderfa140(k2l7j2l6,k238,k315j315);fulladderfa141(k2l8,j2l7,k239,k3l6,j3l6);fulladderfaI42(k2l9,j2l8,k240tk3l7J317);fulladderfal43(k220,j219,k24l,k3l8,j318)

27、;fulladderfaI44(k221j22,k242,k3l9,j3l9);fulladderfal45(k222,j2211J2421,k3201,j320);fulladderfaI46(k2231,j222,jI471,k321,j321);fulladderfa147(k224J223,jl241,k3221J322);fulladderfa!48(j225,kl27J126,k323,j323);fulladderfa149(j228jl32jl50,k324J324);fulladderfaI50(j2312r44J2431,k3251,j325);fulladderfa15l

28、(j232245J2441,k3261,j326);fulladderfal52(j233Lk246,j2451,k3271,j327);fulladderfal53(j234Lk247J2461,k3281,j328);fulladderfa154(j235,k248j2471,k3291,j329);fulladderfaI55(j236Lk249J2481,k3301,j330);fulladderfal56(j237J2491,jl59,k331,j331);fulladderfal57(j239J250jl61,k332J332);halfadderha4(k31J30,k40,j4

29、0);fulladderfa158(k231,j22,j31l,k411J41);fulladderfal59(k34J33,j16,k42j42);fulladderfal60(k35Lj34,jl49,k431J431);fulladderfal61(k36,k324J35,k44j44);fulladderfal62(k37,j36,j324,k45,j45);fulladderfal63(k38J37,j230,k46,j46);fulladderfal64(k391,j38,k325,k47,j471);fulladderfal65(k310J39,k326,k48,j48);ful

30、ladderfaI66(k3111,j310,k327,k49,j491);fulladderfal67(k312,j3ll,k328,k410,j4ri0);fulladderfa168(k313j3l2329,k4ll,j4ll);fulladderfal69(k314J313,k330,k412J412);fulladderfal70(k315,j314,k33l,k4l31J413);fulladderfal71(k3l6,j315J33H,k4l4J414);fulladderfa172(k3l7J316,k332,k415J415);fulladderfa173(k3l8JJ317

31、J332,k4l6J416);fulladderfal74(k3119,j3l8241,k417j4l7);fulladderfal75(k320,j319jl22,k4l8J418);fulladderfal76(k322J321jl48,k419J419);fulladderfa177(j322Lk225J2241.k4201,j420);fulladderfa178(j326,jl67Jl73,k421J,j421);fulladderfa179(j328,jl69J,jl75,k422,j422);halfadderha5(k41Lj40,k50J5O);fulladderfa180(

32、k32jl281,j4l,k5lj5l);fulladderfal81(k45j44,j229,k52j52);fulladderfa182(k461,j45,k243,k53,j5r31);fulladderfa183(k47J46,jI65,k54,j54);fulladderfal84(k48j47,j325,k55j55);fulladderfal85(k49J48,k421,k56j56);fulladderfal86(k410j49J42l,k5757);fulladderfa187(k4111J410,k422,k58,j58);fulladderfal88(k412,j4llJ

33、422,k59j59);fulladderfal89(k413,j412j330,k510,j510);fulladderfal90(k414J413j238,k5ll,j5ll);fulladderfal91(k416j415j240,k512j512);fulladderfa192(k4117,j416Jl63,k5l3j513);fulladderfal93(k4I8,j417J146,k514J514);fulladderfal94(k321,j320J418,k515,j515);halfadderha6(j50,k5l,k601J60);fulladderfal95(j51,k33

34、J32,k6iJ61);fulladderfal96(k57J56,j327,k62,j62);fulladderfal97(k59J58,j329,k63,j63);fulladderfa198(k5110,j59jI71,k64,j64);fulladderfa199(k511,j510,k250,k651,j6f51);fulladderfa200(k415J414j511,k6666);halfadderha7(k6l,j6070J70);fulladderfa201(j6l,k42,jl30,k711J71);fulladderfa202(k581,j57,j621,k721,j72

35、);halfadderha8(k71Lj708080);halfadderha9(k43,j42,k8Hj8l);halfadderhal0(k44J43,k82j82);halfadderhall(k52,jl51,k83j83);halfadderhal2(k53J52,k84j84);halfadderhal3(k54J53,k85J85);halfadderhal4(k55j54,k86J86);halfadderhal5(k56J55,k87j87);halfadderhal6(k62j174,k88j88);fulladderfa203(k8lJ80,j7l,k90,j90);fu

36、lladderfa204(k82j8l,j90,k9llj9l);fulladderfa205(k83j82J9l,k92J92);fulladderfa206(k841,j83,j921,k93Lj93);fulladderfa207(k85J84,j93,k94,j94);fulladderfa208(k86j85J94,k95,j95);fulladderfa209(k87J86j95,k96J96);fulladderfa210(k88,j87,j96,k97,j97);fulladderfa211(k72,j88j97,k98,j98);fulladderfa212(k63J72,j

37、98,k99J99);fulladderfa213(k64J63,j99910j910);fulladderfa214(k65j64,j9l0,k911H,j9ll);fulladderfa215(k66j65,j9ll,k9l2J912);fulladderfa216(j66,k5l2J912,k9l3,j913);fulladderfa217(k5l3J512J9131,k9l41,j914);fulladderfa218(k514J513J914,k915j915);fulladderfa219(k515,j514j915Lk916J916);fulladderfa220(k419J51

38、5J916,k917J917);fulladderfa22l(k420J4l9J917,k9l8J918);fulladderfa222(j420Jc323J918,k919J919);fulladderfa223(k226J323J919,k920,j920);fulladderfa224(pI5l5J226j920,k921J921);endmodule定义全加器模块modulefulladder(a,b,cin,sum,co);inpula,b,cin;/加数a,b,低位进位信号cinoutputSUm,co;和sum,进位信号coassignSUm=abcin;对sum求值assign

39、co=(a&b)|(a&cin)|(b&cin);对co求值endmodule定义半加器模块modulehalfadder(a,b,sum,co);inputa,b;加数a,boutputSUm,co;/和sum,进位信号coassignsum=ab;对sum求值assignco=a&b;对co求值endmodule/用来对被加数b的每一位是1,0进行判别及与加数a相与modulepp(a,b,c);input16:0a;inputb;output16:0c;assigncO=aOfcb;assigncl=al&b;assignc2=a2fcb;assignc3=a3&b;assignc4=a4fcb;assignc5=a5&b;assignc6=a6fcb;assignc7=a7&b;assignc8=a8feb;assignc9=a9feb;

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 在线阅读 > 生活休闲


备案号:宁ICP备20000045号-1

经营许可证:宁B2-20210002

宁公网安备 64010402000986号