您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 其它文档 > 计算机系统结构实验报告-西安交通大学
《计算机系统结构课内实验》实验报告班级:计算机15班姓名:高君宇学号:2110505112日期:2014.5.7动态分支预测实验一、实验目的及要求1.了解掌握动态分支与推断执行技术对流水线性能的改进效果2.了解动态分支预测的基本技术;3.了解推断执行的基本过程;4.比较各种分支预测技术的性能。二、实验环境Linux、SimpleScalarToolSet、SPEC测试程序三、实验内容利用SimpleScalar仿真器中的分支预测仿真程序sim-pred运行所提供的三个benchmark程序,分别采用五种不同的分支预测方法,即bimod方式,two-leveladaptive方式,alwaystaken方式,alwaysnottaken方式,comb方式,并对前两种分别使用下表中两种参数配置;分析仿真器输出的关于分支预测的统计参数集,填写表格,并对各仿真器的能力给出相应说明。命令格式为:./sim-bpred{-option}executable_benchmark–argument对于三种动态方法,分别说明如下:bimod是最普通的,即采用一个2bit宽的分支方向预测表,按分支地址查找,2bit分支预测器的判断和更新与课本上的一致。这种方式只有一个参数,就是分支预测表的长度。2-level要复杂一些,它采用两级表格式,第一级是分支历史表,存放各组分支历史寄存器的值,第二级是全局/局部分支模式表,(全局或局部应是由表长相对于分支历史寄存器的长决定),它存放各分支历史模式的2bit预测器。在判断时用当前分支指令对应的历史寄存器值去索引二级表得到相应预测器值。更新时,把当前分支的方向左移入历史寄存器,并对使用过的2bit预测器作更新。它有四个参数,前三个是一级表长度,二级表长度,历史寄存器宽度,最后一个是异或标志。如果为1,则将历史寄存器的值与当前分支指令地址异或,用其结果再去索引二级模式表。comb方式则组合了以上两种方法,它再加入了一个meta表,这个表类似bimod的预测表,只是它预测的是采取bimod还是2-level,也采用2-bit预测器,被采取的预测方法被定为第一方向,未被采取的定为第二方向。更新时,如果第一方向与第二方向不同则更新meta表,否则只更新两种方法各自的表即可。它共有三组参数,前两组即bimod和two-level的参数,第三组是关于meta表长度的说明。至于BTB的更新与cache的更新方式相同。四、实验步骤1.在linux的环境下,进入到simpleScalar文件的根目录;2.调整好命令的格式并运行(下面给出运行命令的的一部分内容):./sim-bpred-bpredtakentests/bin.little/test-math./sim-bpred-bprednottakentests/bin.little/test-math./sim-bpred-bpredbimod-bpred:bimod512tests/bin.little/test-math./sim-bpred-bpredbimod-bpred:bimod1024tests/bin.little/test-math./sim-bpred-bpred2lev-bpred:2lev11024801tests/bin.little/test-math./sim-bpred-bpred2lev-bpred:2lev16461tests/bin.little/test-math./sim-bpred-bpredcomb-bpred:comb1024-bpred:2lev1102480-bpred:bimod1024tests/bin.little/test-math五、实验结果将结果总结如下表:1.测试程序为test.mathalwaysnottakenalwaystakenbimod(516)bimod(1024)2-level(1,1024,8,0)2-level(1,64,6,1)comb(1024)(1,1024,8,0)(1024)sim_total_insn213688213688213688213688213668213723213723sim_total_refs56897568975689756897568975690056900sim_num_branches38591385913859138591385913859938599sim_elapsed_time1111111sim_inst_rate21362136213688.0213688.0213688213723213723预测方法统计结果8888000000sim_IPB5.53725.53725.53725.53725.53725.5375.537bpred_bimod.lookups38591385913859138591385913859938599bpred_bimod.updates38591385913859138591385913859938599bpred_bimod.addr_hits21938255613423734237342422796135578bpred_bimod.dir_hirts21938255613473234732342422851436018bpred_bimod.misses1665312930385938593797100852581bpred_bimod.jr_hits3543354335283528352835293529bpred_bimod.jr_seen3543354335433543354335443544bpred_bimod.jr_non_ras_hits.PP354335432828282828bpred_bimod.jr_non_ras_seen.PP354335434141414141bpred_bimod.bpred_addr_rate0.56850.66490.88720.88720.88730.72440.9217bpred_bimod.bpred_dir_rate0.56850.66490.90000.90000.90160.73870.9331bpred_bimod.bpred_jr_rate110.99580.99580.99580.99580.9958bpred_bimod.bpred_jr_non_ras_rate.PP110.68290.68290.68290.68290.6829bpred_bimod.retstack_pushes1135043504350435053505bpred_bimod.retstack_pops0035023502350235033503bpred_bimod.used_ras.PP0035023502350235033503bpred_bimod.ras_hits.PP0035023500350035013501bpred_bimod.ras_rate.PP000.99940.99940.99940.99940.99942.测试程序为test.fmathalwaysnottakenalwaystakenbimod(516)bimod(1024)2-level(1,1024,8,0)2-level(1,64,6,1)comb(1024)(1,1024,8,0)(1024)sim_total_insn53448534485344853448534485348253482sim_total_refs16342163421634216342163421634516345sim_num_branches10340103401034010340103401034710347sim_elapsed_time1111111sim_inst_rate53448534485344853448534485348253482sim_IPB5.16915.16915.16915.16915.16915.16885.1688bpred_bimod.lookups10340103401034010340103401034710347bpred_bimod.updates10340103401034010340103401034710347bpred_bimod.addr_hits5768683988259021886075749225bpred_bimod.dir_hirts5768683991289315917178889474bpred_bimod.misses457235011212102511692459873bpred_bimod.jr_hits832832815815815816816bpred_bimod.jr_seen832832832832832833833bpred_bimod.jr_non_ras_hits.PP83283244444bpred_bimod.jr_non_ras_seen.PP8328321919191919bpred_bimod.bpred_addr_rate0.55780.66140.85350.87240.85690.73200.8916bpred_bimod.bpred_dir_rate0.55780.66140.88280.90090.88690.76230.9156bpred_bimod.bpred_jr_r110.97960.97960.21050.97960.9796预测方法统计结果atebpred_bimod.bpred_jr_non_ras_rate.PP110.21050.21050.21050.21050.2105bpred_bimod.retstack_pushes00815815815816816bpred_bimod.retstack_pops00813813813814814bpred_bimod.used_ras.PP00813813813814814bpred_bimod.ras_hits.PP00811811811812812bpred_bimod.ras_rate.PP000.99750.99750.99750.99750.99753.测试程序为test.printfalwaysnottakenalwaystakenbimod(516)bimod(1024)2-level(1,1024,8,0)2-level(1,64,6,1)comb(1024)(1,1024,8,0)(1024)sim_total_insn1813877181387718138771813877181387718139141813914sim_total_refs516941516941516941516941516941516947516947sim_num_branches401609401609401609401609401609401623401623sim_elapsed_time1111111sim_inst_rate1813877181387718138771813877181387718139141813914sim_IPB4.51654.51654.51654.51654.51654.51654.5165bpred_bimod.lookups401609401609401609401609401609401623401623bpred_bimod.updates401609401609401609401609401609401623401623bpred_bimod.addr_hits233361261363372591377458373619317099384169bpred_bimod.dir_hirts233361261363374901379761375930319444386404bpred_bimod.misses1682481402462670821848256798217915219
本文标题:计算机系统结构实验报告-西安交通大学
链接地址:https://www.777doc.com/doc-4251638 .html