UNIVERSITY OF MORATUWA

Similar documents
End Semester Examination CSE, III Yr. (I Sem), 30002: Computer Organization

UNIVERSITY OF MORATUWA

Morgan Kaufmann Publishers 26 February, COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 5

CSC 220: Computer Organization Unit 11 Basic Computer Organization and Design

APPLICATION NOTE PACE1750AE BUILT-IN FUNCTIONS

Chapter 4 The Datapath

Lecture 28: Data Link Layer

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor. Part A Datapath Design

Elementary Educational Computer

Appendix D. Controller Implementation

EE University of Minnesota. Midterm Exam #1. Prof. Matthew O'Keefe TA: Eric Seppanen. Department of Electrical and Computer Engineering

Morgan Kaufmann Publishers 26 February, COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 5.

CMSC Computer Architecture Lecture 12: Virtual Memory. Prof. Yanjing Li University of Chicago

The isoperimetric problem on the hypercube

CS2410 Computer Architecture. Flynn s Taxonomy

Master Informatics Eng. 2017/18. A.J.Proença. Memory Hierarchy. (most slides are borrowed) AJProença, Advanced Architectures, MiEI, UMinho, 2017/18 1

K-NET bus. When several turrets are connected to the K-Bus, the structure of the system is as showns

Weston Anniversary Fund

Threads and Concurrency in Java: Part 1

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor. Single-Cycle Disadvantages & Advantages

Threads and Concurrency in Java: Part 1

Course Site: Copyright 2012, Elsevier Inc. All rights reserved.

Chapter 3. Floating Point Arithmetic

CMSC Computer Architecture Lecture 10: Caches. Prof. Yanjing Li University of Chicago

1&1 Next Level Hosting

EE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 13 Control and Sequencing: Hardwired and Microprogrammed Control

UNIVERSITY OF MORATUWA CS2052 COMPUTER ARCHITECTURE. Time allowed: 2 Hours 10 min December 2018

IMP: Superposer Integrated Morphometrics Package Superposition Tool

The Magma Database file formats

Multiprocessors. HPC Prof. Robert van Engelen

Lesson 1. The datapath

Isn t It Time You Got Faster, Quicker?

Computer Architecture

UNIVERSITY OF MORATUWA

Module Instantiation. Finite State Machines. Two Types of FSMs. Finite State Machines. Given submodule mux32two: Instantiation of mux32two

Data diverse software fault tolerance techniques

9.1. Sequences and Series. Sequences. What you should learn. Why you should learn it. Definition of Sequence

Lecturers: Sanjam Garg and Prasad Raghavendra Feb 21, Midterm 1 Solutions

Running Time. Analysis of Algorithms. Experimental Studies. Limitations of Experiments

ELEG 5173L Digital Signal Processing Introduction to TMS320C6713 DSK

Pseudocode ( 1.1) Analysis of Algorithms. Primitive Operations. Pseudocode Details. Running Time ( 1.1) Estimating performance

Alpha Individual Solutions MAΘ National Convention 2013

Running Time ( 3.1) Analysis of Algorithms. Experimental Studies. Limitations of Experiments

Analysis of Algorithms

CIS 121 Data Structures and Algorithms with Java Spring Stacks and Queues Monday, February 12 / Tuesday, February 13

EE260: Digital Design, Spring /16/18. n Example: m 0 (=x 1 x 2 ) is adjacent to m 1 (=x 1 x 2 ) and m 2 (=x 1 x 2 ) but NOT m 3 (=x 1 x 2 )

Chapter 3 Classification of FFT Processor Algorithms

Python Programming: An Introduction to Computer Science

ENGR Spring Exam 1

Descriptive Statistics Summary Lists

One advantage that SONAR has over any other music-sequencing product I ve worked

Customer Portal Quick Reference User Guide

Guide to Applying Online

Chapter 10. Defining Classes. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Solution printed. Do not start the test until instructed to do so! CS 2604 Data Structures Midterm Spring, Instructions:

Switch Construction CS

Computer Systems - HS

Chapter 4 Threads. Operating Systems: Internals and Design Principles. Ninth Edition By William Stallings

Computer Architecture ELEC3441

Lecture 1: Introduction and Strassen s Algorithm

Chapter 5: Processor Design Advanced Topics. Microprogramming: Basic Idea

Lecture 9: Exam I Review

System and Software Architecture Description (SSAD)

Improvement of the Orthogonal Code Convolution Capabilities Using FPGA Implementation

. Written in factored form it is easy to see that the roots are 2, 2, i,

Multi-Threading. Hyper-, Multi-, and Simultaneous Thread Execution

Task scenarios Outline. Scenarios in Knowledge Extraction. Proposed Framework for Scenario to Design Diagram Transformation

3D Model Retrieval Method Based on Sample Prediction

Data Structures and Algorithms. Analysis of Algorithms

Chapter 1. Introduction to Computers and C++ Programming. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Reliable Transmission. Spring 2018 CS 438 Staff - University of Illinois 1

Computer Graphics Hardware An Overview

CMSC Computer Architecture Lecture 11: More Caches. Prof. Yanjing Li University of Chicago

Instruction and Data Streams

Using the Keyboard. Using the Wireless Keyboard. > Using the Keyboard

Examples and Applications of Binary Search

Mathematical Stat I: solutions of homework 1

The number n of subintervals times the length h of subintervals gives length of interval (b-a).

University of Waterloo Department of Electrical and Computer Engineering ECE 250 Algorithms and Data Structures

CIS 121 Data Structures and Algorithms with Java Spring Stacks, Queues, and Heaps Monday, February 18 / Tuesday, February 19

Computer Science Foundation Exam. August 12, Computer Science. Section 1A. No Calculators! KEY. Solutions and Grading Criteria.

CMSC22200 Computer Architecture Lecture 9: Out-of-Order, SIMD, VLIW. Prof. Yanjing Li University of Chicago

CMSC Computer Architecture Lecture 2: ISA. Prof. Yanjing Li Department of Computer Science University of Chicago

Fundamentals of. Chapter 1. Microprocessor and Microcontroller. Dr. Farid Farahmand. Updated: Tuesday, January 16, 2018

Lecture 1: Introduction and Fundamental Concepts 1

15-859E: Advanced Algorithms CMU, Spring 2015 Lecture #2: Randomized MST and MST Verification January 14, 2015

Ones Assignment Method for Solving Traveling Salesman Problem

The VSS CCD photometry spreadsheet

Web OS Switch Software

L6: FSMs and Synchronization

SD vs. SD + One of the most important uses of sample statistics is to estimate the corresponding population parameters.

TUTORIAL Create Playlist Helen Doron Course

Quality of Service. Spring 2018 CS 438 Staff - University of Illinois 1

EE123 Digital Signal Processing

Chapter 4. Procedural Abstraction and Functions That Return a Value. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Global Support Guide. Verizon WIreless. For the BlackBerry 8830 World Edition Smartphone and the Motorola Z6c

n Learn how resiliency strategies reduce risk n Discover automation strategies to reduce risk

GE FUNDAMENTALS OF COMPUTING AND PROGRAMMING UNIT III

Python Programming: An Introduction to Computer Science

CMPT 125 Assignment 2 Solutions

Transcription:

UNIVERSITY OF MORATUWA FACULTY OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING B.Sc. Egieerig 2014 Itake Semester 2 Examiatio CS2052 COMPUTER ARCHITECTURE Time allowed: 2 Hours Jauary 2016 ADDITIONAL MATERIAL: Noe INSTRUCTIONS TO CANDIDATES: 1. This paper cosists of 4 questios i 5 pages. 2. Aswer ALL questios. 3. Applicable Assembly istructios are give as Aex. 4. Start aswerig each of the mai questios o a ew page. 5. For MCQ ad True/False questios, select the most appropriate aswer, ad write the correspodig sub-questio umber ad the aswer umber i your aswer book. 6. The maximum attaiable mark for each questio is give i brackets. 7. This examiatio accouts for 60% of the module assessmet. 8. This is a closed book examiatio. NB: It is a offece to be i possessio of uauthorised material durig the examiatio. 9. Oly calculators approved by the Faculty of Egieerig are permitted. 10. Assume reasoable values for ay data ot give i or with the examiatio paper. Clearly state such assumptios made o the script. 11. I case of ay doubt as to the iterpretatio of the wordig of a questio, make suitable assumptios ad clearly state them o the script. 12. This paper should be aswered oly i Eglish.

Immediate value Register Eable Istructio Bus Load select Abb/Sub select Register check for jump Overflow Questio 1 Figure 1 shows the block diagram of a simple microprocessor (a.k.a. ao-processor). Aswer followig questios based o Figure 1. Register Bak Register 23 Register 22 16 Data Bus Register 2 Register 1 Clock Register 0 k-to-32 Decoder 32-way 16-bit Mux 32-way 16-bit Mux k Mux 5Register select 5 16-bit Add/Sub Uit Istructio Decoder Jump Flag Address to jump +1 Program ROM ROM 49 ROM 48 m -bit Adder ROM 3 2-way -bit Mux ROM 1 ROM 0 Memory select Reset Program Couter Figure 1 High-level diagram of the microprocessor. This microprocessor desig is based o the Vo Neuma architecture. [1 mark] True False What is the size of the Program Couter (i.e., umber of bits i Figure 1)? [2 marks] a) 4.52 bits b) 5 bits c) 5.61 bits d) 6 bits Page 2 of 5

How may bits are required to select a register from the Register Bak (i.e., umber of bits k i Figure 1)? [2 marks] a) 4.52 bits b) 5 bits c) 5.61 bits d) 6 bits Oe of the istructios supported by the microprocessor ca be defied as follows: Istructio SUB R1, R2 Descriptio Subtract registers R 1 ad R 2 ad store results o R 1, i.e., R 1 R 1 R 2. R 1, R 2 [0, 31] m-bit istructio 1 0 0 k-bits to idicate Register R 1 k-bits to idicate Register R 2 x x x (iv) What is the word legth of a istructio? [2 marks] (v) a) 10 bits b) 14 bits c) 16 bits d) 18 bits If the Program ROM ca store 50 such istructios, what is the total capacity of the Program ROM i bytes? [2 marks] a) 100 bytes b) 113 bytes c) 800 byes d) 900 bytes (vi) Above 16-bit Add/Subtract uit caot be built usig: [2 marks] a) 16 Full Adders b) Four 4-bit RCAs c) 15 Full Adders ad 1 Half Adder d) 32 Half Adders (vii) Write the machie code for the followig istructio. [3 marks] (viii) SUB 0x12, 0x07 Briefly explai how the above istructio ca be implemeted o the microprocessor. Clearly idetify what compoets to activate ad how to activate them. [7 marks] (ix) Briefly discuss to whether we ca exted the proposed microprocessor to have a 2- stage pipelie with istructio fetch ad istructio execute stages. [4 marks] Questio 2 Show the schematic diagram of a 1-to-8 demultiplexer built usig two 1-to-4 demultiplexers ad other basic logic compoets. [3 marks] A 3-bit couter has the followig state trasitios: 001 010 100 000 001 010 100 000 Show the schematic diagram of this couter built usig T Flip Flops. Your aswer should iclude the truth table, Karaugh Maps, ad schematic diagram. [11 marks] Usig the 2 s Complemet calculate 63 71. Note that registers are 8-bit. [3 marks] (iv) Represet 2.718 usig Sigle Precisio, IEEE Floatig Poit stadard. [4 marks] Page 3 of 5

(v) Hit: Sigle Precisio stadard has a 23-bit matissa, 8-bit expoet, ad 1-bit sig. The expoet is calculated as E = e + 127. For a give applicatio, 40% of the istructios require memory access. Istructio miss rate is 2% ad data miss rate is 4%. A istructio ca be executed i 1 clock cycle. L1 cache access time is approximately 5 clock cycles while the L1 miss pealty is 64 clock cycles. 1. What is the average memory access time for istructios? [2 marks] a) 1.28 clock cycles b) 5 clock cycles c) 6.28 clock cycles d) 64 clock cycles 2. What is the average memory access time for data? [2 marks] a) 1.024 clock cycles b) 2 clock cycles c) 3.024 clock cycles d) 5 clock cycles Questio 3 Give two itegers x ad y, write a Assembly program to idetify the miimum value, i.e., mi(x, y). For example, if x = 3 ad y = 7 a desigated register should cotai 3. Provide commets for your code. [13 marks] Assume microprocessor has 20, 8-bit geeral purpose registers labelled as R1, R2, R20. x, y [1, 127]. It is ok to assume x ad y are already stored i two of the geeral purpose registers. Use oly the istructio set give as Aex. Briefly discuss which I/O techique amog Poolig, Iterrupt Drive, or Direct Memory Access (DMA) is most suitable for the followig applicatios. [4 x 2 marks] 1. Whe you order food at a fast food restaurat you are give a umber. Orders are processed o the First Come First Serve (i.e., FIFO) basis. The oce your order is ready, your order umber is to be displayed usig a couter that uses three 7-segemet displays. Whe your umber is displayed you go ad pick up the food. You are required to desig a simple embedded system to cotrol this couter, which typically eeds a icremet butto ad a reset butto. 2. A Time ad Attedace (T&A) system to be developed to record the arrival ad leavig time of employees. Whe a employee arrives, he/she eters the 4-digit employee ID (via a key pad) ad press the arrive butto. Whe he/she leaves, agai the 4-digit ID is etered followed by the leave butto. Rest of the time the T&A system is expected to update relevat database records such as whether a employee is preset o a give day, how may hours he/she worked, umber of leaves take, ad calculate overtime. How would you improve the followig program to beefit from spatial ad/or temporal locality i cachig? Discuss while presetig a optimized program. A ad b are two matrices. Memory layout is row major. for (i= 0; i < ; i++) for (j = 0; j < ; j++) a[j][i] = b[j][i] + 2 [4 marks] Page 4 of 5

Questio 4 Suppose, just after graduatio you were hired by Itel Ic. Your team is resposible for desigig the 6 th geeratio of Itel Core processors. Itel is hopig that the chips will kill off the tablet tred ad persuade cosumers to ivest i hybrid or all-i-oe Widows-based devices istead. 6 th geeratio of Itel Core processors are expected to be capable of startig up i 0.5 secods ad have 2.5 times the performace of previous geeratios. It is also possible that devices ruig o the chip will offer users up to 3x more battery life tha what they are curretly used to. Part of the write up is extracted from www.wired.com Briefly explai what type of a desig you would recommed for each of the followig items. Provide at least 2 justificatios for each of your selectios. 1. Number of processig elemets (e.g., sigle core or multi core). [3 marks] 2. No of pipelie stages. [3 marks] 3. Memory hierarchy (e.g., umber of levels, cache size, ad cache associativity). [4 marks] 4. What is the expected performace-to-power gai? [2 marks] Based o performace tests it has bee idetified that the memory sub-system o the 5 th geeratio Itel Core processors is a major performace bottleeck. This is due to memory system ot beig able to provide the required badwidth whe each CPU core is ruig at its full speed. Waitig time for memory was 65% of the total time. Therefore, oe of your team members suggested that by further icreasig the memory badwidth, it would be possible to gai the desired overall speedup of 2.5. 1. How much speed up i the memory sub-system will be required to achieve the desired overall speed up? [ 3 marks] You may use the Amdahl s law give below for the calculatio: Speedup Overall = (1 Fractio Ehaced 1 Fractio ) + Speedup Ehaced Ehaced 2. Do you agree with your team member s idea of gaiig such a speedup by improvig oly the badwidth of the memory sub-system? Explai. [3 marks] 6 th geeratio processor will be desiged for Solid State Disk (SSD) based systems. Will this improve the overall performace ad eergy efficiecy? Discuss. [4 marks] (iv) 6 th geeratio processor to have eve more I/O pis supportig more Parallel Coectios amog compoets o a motherboard such as RAM, video card, ad etwork card. This will further speed up the system. Do you agree or disagree with this suggestio? Briefly discuss. [3 marks] -------------------------- END OF THE PAPER -------------------------- Page 5 of 5