NTU-Exam 板


LINE

课程名称︰计算机结构 课程性质︰必修 课程教师︰洪士灏 开课学院:电资学院 开课系所︰资工系 考试日期(年月日)︰2016/11/17 考试时限(分钟):180分钟左右 试题 : 1. (30pts) A lot of people are taling about Internet of Things(IoT). According to Wikipedia: IoT is the internetworking of physical devices, vehicles(also referred to as "connected devices" and "smart devices"), buildings and other items -- embedded with electronics, software, sensors, actuators, and network connectivety that enable these objects to collect and exchange data. The IoT allows objects to be sensed and/or controlled remotely across existing network infrastructure, creating opportunities for more direct integration of the physical world into computer-based systems, and resulting in improved efficiency, accracy and economic benefit. Experts estimate that the IoT will consist of almost 50 billion objects by 2020. Typically, IoT is expected to offer advanced connectivity of devices, systems, and services that goes beyond machine-to-machine (M2M) communications and covers a variety of protocols, domains, and applications.The interconnection of these embedded devices (including smart objects), is expected to usher in automation in nearly all fields, while also enabling advanced applications like a smart grid, and expanding to the areas such as smart cities. "Things," in the IoT sense, can refer to a wide variety of devices such as heart monitoring implants, biochip transponders on farm animals, electric clams in coastal waters, automobiles with built-in sensors, DNA analysis devices for environmental/food/pathogen monitoring or field operation devices that assist firefighters in search and rescue operations. Legal scholars suggest to look at "Things" as an "inextricable mixture of hardware, software, data and service".These devices collect useful data with the help of various existing technologies and then autonomously flow the data between other devices. Current market examples include home automation (also known as smart home devices) such as the control and automation of lighting, heating (like smart thermostat), ventilation, air conditioning (HVAC) systems, and appliances such as washer/dryers, robotic vacuums, air purifiers , ovens or refrigerators/freezers that use Wi-Fi for remote monitoring. As well as the expansion of Internet-connected automation into a plethora of new application areas, IoT is also expected to generate large amounts of data from diverse locations, with the consequent necessity for quick aggregation of the data, and an increase in the need to index, store, and process such data more effectively. IoT is one of the platforms of today's Smart City, and Smart Energy Management Systems. The concept of the Internet of Things was invented by and term coined by Peter T. Lewis in September 1985 in a speech he delivered at a U.S. Federal Communications Commission (FCC) supported session at the Congressional Black Caucus 15th Legislative Weekend Conference. Please answer the following questions as complete as possible. (a)(10pts)Since the concept of IoT was "invented" in 1985, why do people start to talk about it until recently?(There are several reasons). (b)(10pts)What kind(s) of computers are needed for this IoT Era? For each kind , please list example applications, describe its typical system configuration and the design issues. (c)(10pts)Similar things can be said about the rise of Artificial Intellifence (AI) in recent years. Actually, AI was very popular in '80s, but it suddenly stopped to talk about it(at least from the industry's point of view) Why? How does this relate to computer architecture? 2. (20pts)Please answer the following questions after reading the MIPS assembly code in the next page. Note that you do NOT need to understand the entire program to analyze the performance, as compilers and processors do not understand the entire program either. The instruction bltz is "branch on less than zero", which branches to the label if the register is less than zero. You can write your ansewers directly on Page 3. (a)(10pts)A basic block is a sequence of instructions without branches, except possibly at the end, and without branch targets or branch labels, except possibly at the beginning. One of the first early phases of compilation is breaking the program into basic blocks. Please identify all the basic block(s) in this assembly code. (b)(10pts)A data dependency in computer science is a situation in which a program statement(instruction) refers to the data of a preceding statement. Please identify all the data dependencies in this assembly code. ASSEMBLY CODE 1 start: 2 lw $t0, 0($gp) #fetch i 3 bltz $t0, def #i<0 ->default 4 slti $t1, $t0, 3 #i<3? 5 beq $t1, $zero, def #no, -> default 6 sll $t0, $t0, 2 #turn i into a byte offset 7 add $t2, $t0, $gp 8 lw $t2, 1064($t2) #fetch the branch table entry 9 jr $t2 #go... 10 is0: sw $zero, 28($gp) #A[0] = 0 11 j case_done 12 is1: 13 is2: addi $t0, $zero, 1 # = 1 14 sw $t0, 32($gp) #A[1] = 1 15 j case_done 16 def: addi $t0, $zero, -1 # = -1 17 sw $t0, 28(gp) #A[0] = -1 18 j case_done 19 case_done: 20 lw $t0, 0($gp) #fetch i 21 lw $t1, 4($gp) #fetch N 22 alt $t1, $t0, $t1 #set $t1 to 1 if $t0 < $t1, to 0 otherwise 23 beq $t1, $zero, skip #branch if result of slt is 0(i.e., !(i<N)) 24 sll $t0, $t0, 2 #i as a byte offset 25 add $t0, $t0, $gp #&A[i] - 28 26 sw $zero, 28($t0) #A[i] = 0 27 skip: 28 add $t0, $gp, $zero #&A[0] - 28 29 lw $t1, 4($gp) #fetch N 30 sll $t1, $t1, 2 #N as byte offset 31 add $t1, $t1, $gp #&A[N] - 28 32 ori $t2, $zero, 256 #MAX_SIZE 33 top: 34 sltu $t3, $t0, $t1 #have we reached the final address? 35 beq $t3, $zero, loop_end #yes, we're done 36 sw $t2, 28($t0) #A[i] = 0 37 addi $t0, $t0, 4 #update $t0 to point to next element 38 j top #go to top of loop 39 loop_end: -ASSEMBLY END- 3. (40pts)Let us analyze the performance of the assembly code on Page 3 for the 5-stage pipelined MIPS datapath shown below. Note that the branch instruction are handle in the EX stage, and there is no data forwarding unit. (a)(10pts)Data hazards can stall the pipeline and cause pieline bubbles. Data hazards mainly come from data dependencies, but not all data dependencies can cause data hazards. Please identify all the pipeline bubbles cause by data hazards in the assembly code. (b)(10pts)Control hazards can stall the pipeline and cause pipeline bubbles. Please identify all the pipeline bubbles cause by control hazards in the assembly code. (c)(10pts)Branch prediction can reduce the penalty caused by contrl hazards only if the prediction is correct. Please discuss the likelihood of correct prediction for the branches in the assembly code. Which branches can be predicted with high probability? Why? (d)(10pts)Loop unrolling is a common technique to eliminate data hazards and speed up the execution. If you have not noticed, Lines 33~39 constitute a loop. Please unroll the loop 4 times(write down the unrolled code on the answer sheet) and estimate the resulted performance. 4. (10pts)Assume we have convented the processor in Problem 3 into a static dual-issue processor, which can execute 2 instructions per cycle, as shown in the following figure. Instruction type Pipe stages ALU or branch instruction IF ID EX MEM WB Load or store instruction IF ID EX MEM WB ALU or branch instruction IF ID EX MEM WB Load or store instruction IF ID EX MEM WB ALU or branch instruction IF ID EX MEM WB Load or store instruction IF ID EX MEM WB ALU or branch instruction IF ID EX MEM WB Load or store instruction IF ID EX MEM WB (a)(5pts)Calculate the number of cycles needed to execute the assembly codes for the loop constituted by Lines 33~39 on Page 3. (b)(5pts)Calculate the number of cycles needed to execute the assembly codes for the loop after you unroll it 4 times as in your answer to Question 3(d). --



※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 114.43.94.48
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/NTU-Exam/M.1486026616.A.49B.html
1F:推 rod24574575 : 已收资讯系! 02/02 21:27







like.gif 您可能会有兴趣的文章
icon.png[问题/行为] 猫晚上进房间会不会有憋尿问题
icon.pngRe: [闲聊] 选了错误的女孩成为魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一张
icon.png[心得] EMS高领长版毛衣.墨小楼MC1002
icon.png[分享] 丹龙隔热纸GE55+33+22
icon.png[问题] 清洗洗衣机
icon.png[寻物] 窗台下的空间
icon.png[闲聊] 双极の女神1 木魔爵
icon.png[售车] 新竹 1997 march 1297cc 白色 四门
icon.png[讨论] 能从照片感受到摄影者心情吗
icon.png[狂贺] 贺贺贺贺 贺!岛村卯月!总选举NO.1
icon.png[难过] 羡慕白皮肤的女生
icon.png阅读文章
icon.png[黑特]
icon.png[问题] SBK S1安装於安全帽位置
icon.png[分享] 旧woo100绝版开箱!!
icon.pngRe: [无言] 关於小包卫生纸
icon.png[开箱] E5-2683V3 RX480Strix 快睿C1 简单测试
icon.png[心得] 苍の海贼龙 地狱 执行者16PT
icon.png[售车] 1999年Virage iO 1.8EXi
icon.png[心得] 挑战33 LV10 狮子座pt solo
icon.png[闲聊] 手把手教你不被桶之新手主购教学
icon.png[分享] Civic Type R 量产版官方照无预警流出
icon.png[售车] Golf 4 2.0 银色 自排
icon.png[出售] Graco提篮汽座(有底座)2000元诚可议
icon.png[问题] 请问补牙材质掉了还能再补吗?(台中半年内
icon.png[问题] 44th 单曲 生写竟然都给重复的啊啊!
icon.png[心得] 华南红卡/icash 核卡
icon.png[问题] 拔牙矫正这样正常吗
icon.png[赠送] 老莫高业 初业 102年版
icon.png[情报] 三大行动支付 本季掀战火
icon.png[宝宝] 博客来Amos水蜡笔5/1特价五折
icon.pngRe: [心得] 新鲜人一些面试分享
icon.png[心得] 苍の海贼龙 地狱 麒麟25PT
icon.pngRe: [闲聊] (君の名は。雷慎入) 君名二创漫画翻译
icon.pngRe: [闲聊] OGN中场影片:失踪人口局 (英文字幕)
icon.png[问题] 台湾大哥大4G讯号差
icon.png[出售] [全国]全新千寻侘草LED灯, 水草

请输入看板名称,例如:Boy-Girl站内搜寻

TOP