网站大量收购独家精品文档,联系QQ:2885784924

计算机系统结构实验报告(矩阵相乘).doc

计算机系统结构实验报告(矩阵相乘).doc

  1. 1、本文档共8页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
计算机系统结构实验报告(矩阵相乘)

院 系: 计算机科学学院 专 业: 计算机科学与技术 年 级: 课程名称: 计算机系统结构 学 号: 姓 名: 指导教师: 年 月 日 年级 班级 ?学号 专业 ?姓名 题目名称 用DLX汇编语言编写矩阵乘程序Matrix.s(元素数据为浮点数)? 题目内容 对矩阵乘程序Matrix.s做如下分析:1.观察程序中出现的数据相关、控制相关和结构相关现象,并指出程序中出现上述现象的指令;2.指出转移指令在转移成功和不成功时的流水线开销;3.分别在使用定向技术和不使用定向技术的两种情况下,输入同样的数据,利用Statistics 窗口中的统计数字(总的周期数和暂停数),计算定向技术带来的加速比。4.通过DLX模拟器中的configuration窗口,将浮点运算的延迟改为8个时钟周期,重复观察并回答上述的1,2,3的问题。 实 验 结 果 与 分 析 实验结果截图如下: 1.程序最后的运行结果截图如下: 此为两个2阶矩阵的相乘,第一个矩阵的数据依次是1,2,3,4;第二个矩阵的数据依次是5,6,7,8,最后的运行结果依次是19,22,43,50。 Register图如下: 各寄存器的参数值如上。 (写不完时,可另加附页。) 程 序 代 码 3.流水线图某一流程截图如下: 4.时钟周期表最后如下: .data ;*** Prompts for input ;输入提示部分 dat1: .space 64 dat2: .space 64 result: .space 64 Prompt1: .asciiz Input the martrixA line: Prompt2: .asciiz Input the martrixA column and the martrixB line: Prompt3: .asciiz Input the martrixB column: Prompt4: .asciiz Input the martrixAs number: Prompt5: .asciiz Input the martrixBs number: Prompt6: .asciiz This is my program ! ;*** Data for printf-Trap ;输出数据设置部分 PrintfFormat: .asciiz %d .align 2 PrintfPar: .word PrintfFormat PrintfValue: .space 4 PrintfFormat1: .asciiz \n .align 2 PrintfPar1: .word PrintfFormat1 PrintfValue1: .space 4 PrintfFormat2: .asciiz Output the martrixA:\n .align 2 PrintfPar2: .word PrintfFormat2 PrintfValue2: .space 4 PrintfFormat3: .asciiz Output the martrixB:\n .align 2 PrintfPar3: .word PrintfFormat3 PrintfValue3: .space 4 PrintfFormat4: .asciiz Output the martrixC:\n .align 2 PrintfPar4: .word PrintfFormat4 PrintfValue4: .space 4 .text .global main main: addi r1,r0,Prompt1 jal InputUnsigned movi2fp f1,r1 ;矩阵A的行数 a

您可能关注的文档

文档评论(0)

ldj215322 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档