ImageVerifierCode 换一换
格式:DOCX , 页数:9 ,大小:19.64KB ,
资源ID:6102739      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/6102739.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(最新lab3复杂流水线实验报告.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

最新lab3复杂流水线实验报告.docx

1、最新lab3复杂流水线实验报告lab3复杂流水线实验报告Lab3复杂流水化实验Experiment1: To study the basics of forwarding. For all the programs please select Stall Detection and Forwarding should be ON.(a)Write a sample program that forwards between EXE stage and MEM stage on upper input of the ALU.Write the program below and show for

2、warding with arrow. Test it on the simulator and mention what value is being forwarded. DO NOT USE LW INSTRUCTION.Instruction123456789ADD R1,R2,R3IFIDEXEMEMWBSUB R5,R1,R4IFIDEXEMEMWB 其中ADD指令中在MEM阶段的ALUout-555(R2+R3)前递到SUB指令的EXE阶段的upper input。(b)Write a sample program that forwards between EXE stage

3、and WB stage on upper input of the ALU.Write the program below and show forwarding with arrow. Test it on the simulator and mention what value is being forwarded. DO NOT USE LW INSTRUCTION.Instruction123456789ADD R1,R2,R3IFIDEXEMEMWBNOPIFIDEXEMEMWBSUB R5,R1,R4IFIDEXEMEMWB其中ADD指令中在WB阶段的输出555(R2+R3)前递

4、到SUB指令的EXE阶段的upper input。(c)Write a sample program that forwards between EXE stage and MEM stage on lower input of the ALU.Write the program below and show forwarding with arrow. Test it on the simulator and mention what value is being forwarded. DO NOT USE LW INSTRUCTION.Instruction123456789ADD R1,

5、R2,R3IFIDEXEMEMWBSUB R5,R4,R1IFIDEXEMEMWB 其中ADD指令中在MEM阶段的ALUout-555(R2+R3)前递到SUB指令的EXE阶段的upper input。(d) Write a sample program that forwards between EXE stage and WB stage on lower input of the ALU.Write the program below and show forwarding with arrow. Test it on the simulator and mention what val

6、ue is being forwarded. DO NOT USE LW INSTRUCTION.Instruction123456789ADD R1,R2,R3IFIDEXEMEMWBNOPIFIDEXEMEMWBSUB R5,R4,R1IFIDEXEMEMWB其中ADD指令中在WB阶段的输出555(R2+R3)前递到SUB指令的EXE阶段的upper input。(e) Write a sample program that forwards between MEM stage and WB stage. Write the program below and show forwardin

7、g with arrow. Test it on the simulator and mention what value is being forwarded.Instruction123456789LW R1,0(R2)IFIDEXEMEMWBSW R3,0(R1)IFIDEXEMEMWB 其中ADD指令在WB阶段的输出555(R2+R3)前递到SW指令的MEM阶段。(f) Write a program that causes Load Use Delay Stall. See what data is to be moved and notice exactly when the re

8、quired Data is passed on to the waiting instruction. Show it as an arrow on the following diagram.Instruction123456789LW R1,0(R3)IFIDEXEMEMWBADD R2,R1 ,R3IFIDEXEEXEMEMWBBRANCH HAZARDS. (Lab Experiment 2)(a) Let us now study some branch hazard. First of all make sure that the Aggressive branching opt

9、ion is OFF, Stall Detection is ON and Forwarding is ON. Select Always Flush option from the branch Policy and write the following program. Does this program work properly. If not modify the program so that it works properly. It fills 10 memory locations memory with a value 222. Check what should be

10、the values of all the registers if this program work is to properly (no useful instruction turning into NOP or getting flushed). Carefully note the use of SLTI instruction in the following loop.ADDI R3, R0, 0ADDI R1, R0, 0ADDI R2, R0, 222Loop: Addi R1, R1, 4SW R2, 100(R1)ADDI R3, R3, 1SLTI R5, R3, 1

11、0BNEQ R5, R0, loopADDI R7, R1, 10ADDI R8, R2, 5ADDI R2, R2, 100(i)Calculate the CPI for this program. 61/65 (ii)What changes can we make to this program so that it works properly (useful instructionsafter the program do not flush) 可以在BNEQ跳转后面加3条ADD R0,R0,R0(iii)Run the same program with Predict NT o

12、ption in Branch Policy. What difference do you seewhen loop completes. Predict NT:循环执行完了顺序执行了剩下3条语句。Always Flush:循环执行完了依然将剩下3条语句flush掉了。(b) This problem is similar to problem A-1 at the end of the book. (Exercise A-1.)Note that you need to calculate the offset in the actual program in terms of numbe

13、r of instructions.Offset = -6 (A) Processor Configuration. Stall Detection ON., Forwarding: OFF, Aggressive Branching: YES, Branch Policy: Always Flush. Run the above program and fill the following table for the instructions in the loop body for first 2 or 3 iterations. Total Clock cycles to run the

14、 program _12345678910111213LW R1, 0(R2)IFIDEXEMEMWBADDI R1,R1, #1IFIDIDIDEXEMEMWBSW R1, 0(R2)IFIFIFIDIDIDEXEMEMWBADDI R2,R2, #4IFIFIFIDEXEMEMWBSUB R4,R3,R2IFIDIDIDEXEBNEZ R4, Loop1IFIFIFIDADDI R2, R0, 0IFADDI R3, R0, 014151617181920212223242526LW R1, 0(R2)IFIDEXEMEMWBADDI R1,R1, #1IFIDIDIDEXEMEMWBSW

15、 R1, 0(R2)IFIFIFIDIDIDEXEMEMWBADDI R2,R2, #4IFIFIFIDEXEMEMSUB R4,R3,R2MEMWBIFIDIDBNEZ R4, Loop1IDIDEXEMEMWBIFIFADDI R2, R0, 0FLUSHEDIFIDEXEMEMWBADDI R3, R0, 0(b) Redo the part (a) with forwarding ON and other processor configuration is same. Total clock cycles _12345678910111213LW R1, 0(R2)IFIDEXEME

16、MWBIFIDEXEMEMADDI R1,R1, #1IFIDEXEEXEMEMWBIFIDEXESW R1, 0(R2)IFIDIDEXEMEMWBIFIDADDI R2,R2, #4IFIFIDEXEMEMWBIFSUB R4,R3,R2IFIDEXEMEMWBBNEZ R4, Loop1IFIDIDEXEMEMWBADDI R2, R0, 0IFIFIDEXEMEMWBADDI R3, R0, 014151617181920212223242526LW R1, 0(R2)WBIFIDEXEMEMWBADDI R1,R1, #1EXEMEMWBIFIDEXEEXEMEMWBSW R1, 0

17、(R2)IDEXEMEMWBIFIDIDEXEMEMWBADDI R2,R2, #4IFIDEXEMEMWBIFIFIDEXEMEMSUB R4,R3,R2IFIDEXEEXEWBIFIDEXEBNEZ R4, Loop1IFIDIDEXEMEMWBIFIDADDI R2, R0, 0IFIFIDEXEMEMWBIFADDI R3, R0, 0实验心得:通过本次实验,我更加深刻的理解了流水线中的前递技术的实现,以及不同类型的指令在不同的阶段前递,方式也不同。同时,我对branch指令数据冒险的解决也有了一个更加清晰的认识,branch类型主要通过循环内改写和循环展开这两种方式,通过不同的实例,清楚地知道不同情况下考虑策略的不同。通过实验,更加清晰的理解了课上的理论内容,也对复杂流水化有了一个更加全面系统的认知,收获很大。

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1