中南大学计算机体系结构模拟试题试卷(2)
– Use the revised MIPS pipeline where there is forwarding and where branches are handled in the ID stage
? Assume 50% of all loads cause RAW hazards because the loaded datum is used by the following ALU
instruction
? Assume 60% of all branches have RAW hazards with the immediately preceding ALU operation (e.g., a
compare) ? Assume branches are handled by flushing the instruction in the IF stage as soon as the branch is decoded
in the ID stage ?
八.A CISC machine has a CPI of 4 for load/store, 3 for ALU/branch, 10 for call/return, and a CPU clock rate of 1.75 GHz. A RISC machine has a CPI of 1.2 (as it is pipelined) and a CPU clock rate of 1 GHz. Because the CISC machine can use complex instructions, the typical program is shorter. In this case, assume we have a benchmark that has 38% loads, 10% stores, 35% ALU operations, 3% calls, 3% returns, and 11% branches. If the CISC program is 40% shorter, which machine will run the benchmark in less time?
For each of the following compiler optimizations below, briefly explain whether the optimization will provide a CPU performance increase because it will reduce CPI, reduce IC, reduce both, or reduce neither (in which case, how does the optimization provide a benefit for the execution time of the program?) See figure 2.25 on page 124 and the descriptions of these in the text on pages 121-123.
a. Code motion
b. Register optimization with graph coloring c. Procedure integration d. Pipeline scheduling
e. Global common subexpression elimination f. Copy propagation
九、 Given the following MIPS floating point code, and the floating point pipeline where forwarding is available and branches are handled in the ID stage by flushing the current instruction, but where two or more instructions that reach the MEM stage at the same clock cycle will require that latter instruction(s) be stalled,
Loop: L.S F1, 40(R3) MUL.S F3, F1, F2 // assume F2 is already loaded L.S F5, 0(R6)
SUB.S F4, F3, F5 S.S F4, 0(R6)
DADDI R3, R3, #4 DADDI R6, R6, #4
DSUBI R10, R10, #1 BNEZ R10, Loop
a. provide a timing diagram of 1 iteration of the loop plus the first instruction of the second iteration.
b. schedule the code to remove as many stalls as possible assuming a branch delay slot is available, and show the timing
diagram for 1 iteration plus the first instruction of the next for your scheduled code.
c. assuming that the loop iterates 1000 times, how much faster is the code in part b over part a?
十.假设在一个采用组相联映象的Cache存储器中,Cache的容量为1KB,要求Cache的每一块在一个主存周期内能从主存取得。主存采用模32交叉,每个分体的宽度为64位,主存的总容量为4MB。采用按地址访问存储器构成的相联目录表,实现主存地址到Cache地址的变换,并约定采用2个外相等比较电路。
(1)请设计主存地址格式和Cache地址格式,并标出各段的位数;
(2)若替换算法采用LRU算法,对于如下主存块地址流:1、4、1、4、7、1、9、4、27、7,如主存中内容一开始未装入Cache中,请列出随时间变化Cache中各块的使用状况,求出此期间Cache的块命中率。
十一.假设在一台40MHz处理机上运行200000条指令的目标代码,程序主要由四种类型的指令所组成。根据程序跟踪实验结果,已知指令混合比和每类指令的CPI值如下表所示。
指令类型 算术和逻辑 高速缓存命中的加载/存储 转移 高速缓存缺失的存储器访问 指令混合比 60% 18% 12% 10% CPI 1 2 4 8 (1)试计算用上述跟踪数据在单处理机上执行该程序时的平均CPI; (2)根据(1)所得到的CPI,计算相应的MIPS速率及程序的执行时间。
十二. 有8台外设,各设备要求传送信息的工作速率如图所示。现设计的通道,在数据传送期,每选择一次设备需2us,每传送一个字节数据也需要2us。
1、若用作字节多路通道,通道的最高流量是多少?
2、作字节多路通道时,希望同时不少于4台设备挂在此通道上,最好多挂一些,且高速设备尽量多挂一些,请问应选哪些设备挂在此通道上?为什么?
3、若用作数组多路通道,通道工作和最高流量是多少?(设定长块大小取成512B) 4、作数组多路通道用时,应选哪些设备挂在通道上,为什么?
设备标识 工作速率(KB/S) A B C D E F G H 500 240 100 75 50 40 14 10 十三、报文由A~K字符组成,其出现频度依次为0.17, 0.05, 0.20, 0.06, 0.08, 0.03, 0.01, 0.08, 0.13, 0.08, 0.11。
(1) 各字符用等长二进制编码,传送200个字符时,需传送多少个二进制码位? (2) 构造哈夫曼树,写出各字符的二进制码位数。 (3) 按哈夫曼编码,计算字符的平均码长。
(4) 用哈夫曼码传送1000个字符,比定长码传送可减少传送的码位数是多少? 设计一种平均码长最短的仅有两种码长的扩展操作码编码,并求出其平均码长。
…… 此处隐藏:1677字,全部文档内容请下载后查看。喜欢就下载吧 ……相关推荐:
- [互联网资料]2022年厦门大学机电工程系824机械设计
- [互联网资料]东南大学2022年硕士研究生拟录取名单公
- [互联网资料]能源调研报告(精选多篇)
- [互联网资料]初三英语下学期 中考英语 语法填空训练
- [互联网资料]2022内蒙古选调生行测常识备考:新事物
- [互联网资料]自驾必备!在新西兰租什么样的车自驾游
- [互联网资料]佛教素食菜谱44页未完
- [互联网资料]盈利能力分析外文翻译
- [互联网资料]2022年南昌航空大学音乐学院736马克思
- [互联网资料]优选外贸跟单实习报告总结(精品版)
- [互联网资料]银行新员工培训总结
- [互联网资料]2_year_visa_new_guidance_190316
- [互联网资料]天津市五校宝坻一中静海一中杨村一中芦
- [互联网资料]2007--2008学年第一学期高三数学宁波市
- [互联网资料]Chromatic framework for vision in ba
- [互联网资料]幼儿园大班上学期美术教案《心愿树》含
- [互联网资料]2022年华中农业大学信息学院820微型计
- [互联网资料]硬盘坏道的表现 __硬盘使用久了
- [互联网资料]江苏省2016年会计从业资格考试《会计基
- [互联网资料]公共场所卫生监督试卷全解
- 高级英语第一册所有修辞方法及例子总结
- 综合交通枢纽规划与城市发展
- 沃尔玛的企业文化案例分析
- 美国Thanksgiving Day 感恩节 介绍
- PEP六年级英语上册Unit6How do you fee
- 最齐全的中国大型商场购物中心名单
- 数据结构实验报告八—哈夫曼编译码
- 杭州市余杭区人民政府(通知)
- 七年级语文成语运用专项训练
- 微观经济学第三章 消费者行为 课后习题
- 对_钱学森之问_的思考
- Excel_三级联动_下拉菜单
- 办公用品需求计划申请表
- 对外汉语教材必须要知道的发展史
- 挑战杯大学生学术科技作品竞赛作品申报
- 举办民办教育培训机构应具备下列条件
- 太阳能路灯项目设计方案
- 2013年八年级上最新人教版新教材Unit3I
- 【历史】 6-4 《近代科学之父牛顿》 课
- 高中生物《第四章 第二节 探讨加酶洗衣




