University of Toronto Faculty of Applied Science and Engineering

Size: px
Start display at page:

Download "University of Toronto Faculty of Applied Science and Engineering"

Transcription

1 Print: First Name: Last Name: Student Number: University of Toronto Faculty of Applied Science and Engineering Final Examination April 29, 2014 ECE243 Computer Organization Examiners Phil Anderson, Natalie Enright Jerger, Glenn Gulak, Hamid Timorabadi 1. There are 7 questions and 23 pages. Do all questions. The total number of marks is 144. The duration of the test is 150 minutes. 2. ALL WORK IS TO BE DONE ON THESE SHEETS! Use the back of the pages if you need more space. You may also use the two blank sheets included at the end of the exam. Be sure to indicate clearly if your work continues elsewhere. 3. Please put your final solution in the box if one is provided. 4. Clear and concise answers will be considered more favourably than ones that ramble. Do not fill space just because it exists! 5. The exam is open book/open notes. 6. Calculators are not permitted. 7. Always give some explanations or reasoning for how you arrived at your solutions to help the marker understand your thinking. 8. To get full marks you must comment your code. 9. State your assumptions. Show your work. Use your time wisely as not all questions will require the same amount of time. If you think that assumptions must be made to answer a question, state them clearly. If there are multiple possibilities, comment that there are, explain why and then provide at least one possible answer and state the corresponding assumptions. 1 [20] 2 [32] 3 [30] 4 [16] 5 [16] 6 [15] 7 [15] Total [144] Page 1 of 23

2 1. Memory Design You are to design a 256 kilobyte, byte-addressable memory module that is attached to an 8-bit data bus. Recall that 1 KB = 1024B = 2 10 B. [8 marks] (a) The table below lists the memory chips that you can use to implement the memory module. For each memory chip type, 1. Memory)Design)[20)minutes]) give the number of rows and columns of memory chips required to implement the memory module when ) using only chips of that type. You)are)to)design)a)256)kilobyte,)byte>addressable)memory)module)that)is)attached)to)an)8>bit) bus.) Memory Chip Type Number of Rows (depth) Number of Columns (data width) ) a) [8) marks]) The) table) below) lists) the) memory) chips) that) you) can) use) to) implement) the) memory) 4K module.) 4 bits ) For) 64 each) chip) type,) give) the) number) 2 of) rows) and) columns) of) memory) chips)required)to)implement)the)memory)module)when)using)only)chips)of)that)type.) ) 16K 4 bit Memory'Chip' 16 Number'of' Number'of' 2 64K 2 bits 64K 4 bits Rows' 4K)x)4) ) ) Columns' K)x)4) ) ) K)x)2) ) ) 64K)x)4) ) ) [10 marks] (b) The ) memory module can hold a maximum of 4x4 memory chips as shown on the next page. From the table above, b) [8)marks])The)board)for)the)memory)module)can)hold)at)most)a)4x4)array)of)memory)chips) choose chip type so that will provide 256 kilobytes of memory using fewest chips possible. as)shown)on)the)next)page.))from)the)table)above,)choose)the)chip)type)so)that)the)board) Complete diagram on next by will) provide) 256) kilobytes) of) memory) using) the) fewest) chips) possible.) ) Complete) the) i. writing diagram)on)the)next)page)by)) inside each chip outline the chip type to be used; and ii. connecting i. writing)inside)each)chip)outline)the)chip)type)to)be)used;)and) the inputs and outputs address, data, and CS (chip select, also called enable) of each chip correctly ii. connecting) to address, the)inputs)and)outputs) ) data CS signalsaddress,)data,)and)cs)(chip)select)) ) of the module. is active low. Be sure of) each) to label chip) the address, datacorrectly)to)the)address)and)data)signals)of)the)module.))be)sure)to)label)the)address)and) and CS signals with the specific bits. data)signals.) The onlythe)only)other)parts)that)you)may)use)to)complete)the)diagram)are)any)of)the)following) other that you use to are any of following decoders: decoders:) ) ))S0) ) ))))))))))))))))))S0) 2) In))))))))))))))S0))) ) ))))))))))))))))))))4) In))))))))))))))S1) ))))))))))))))))3) In))))))))))))))S1) ))))))))))))))))) 2)x)4)))))))))S1) ) ) ))))))))))))))))))S2)) ) 3)x)8)))))))))S2)) ) Decoder))S2) ) ) ))))))))))))))))))S3) ) Decoder))S3) ) ))))))))))))))))))S3) ) ) ))))))))))))))))))S4) ) ))))))))))))))))))S4) ) ) ) ) ))))))))))))))))))S5) ) ))))))))))))))))))S5) ) ) ) ) 4)x)16))))))S6) ) ))))))))))))))))))S6) ) ) ) ) Decoder))S7) ) ))))))))))))))))))S7) ) ) ) ) ))))))))))))))))))S8) ) ) ) ) ) ) ))))))))))))))))))S9) ) ))))))))))))))))))) ) ) ) ) ))))))))))))))))S10) ) ) ) ) ) ) ))))))))))))))))S11) ) ))))))))))))))))) ) ) ) ) ))))))))))))))))S12) ) ) ) ) ) ) ))))))))))))))))S13) ) ))))))))))))))))) ) ) ) ) ))))))))))))))))S14) ) ))))))))))))))))) ) ) ) ) ))))))))))))))))S15) ) ))))))))))))))))) ) ) ) If)you)use)a)decoder,)make)sure)that)you)indicate)(on)the)next)page))what)kind)of)decoder)is) used)and)label)its)inputs)and)outputs)and)make)all)the)appropriate)interconnections.) If you use ) a decoder, make sure that you indicate (on the next page) what kind of decoder is used and label its inputs and outputs and make all the appropriate interconnections. Two copies of the diagram are given to you. You must cross out the diagram that you do not wish to have marked. Page 2 of 23

3 Address bus (A17- A0) (18 bits) A17- A16 C1 C2 C3 C4 A15- A0 A15- A0 64K x 4 64K x 4 A D CS R1 2x4 Dec S0 S1 S2 S3 64K x 4 64K x 4 R2 64K x 4 64K x 4 R3 64K x 4 64K x 4 R4 Data bus (D7- D0) (8 bits) D7- D4 D3- D0 Page 3 of 23

4 Address bus (A17- A0) (18 bits) C1 C2 C3 C4 A CS D R1 R2 R3 R4 Data bus (D7- D0) (8 bits) Page 4 of 23

5 [2 marks] (c) The byte 0b is stored at address 0x Using the coordinate system given in the diagram on the previous page (were C1 = column 1 and R1 = row 1), indicate using row and column coordinates, in which chip each bit is stored (i.e., give the coordinates of the appropriate chip rectangle (s) and the binary digits stored there). C1,R4: 1011 C2,R4: 0000 Page 5 of 23

6 2. Caches [2 marks] (a) In the context of cache memory, define Hit Rate. HitRate = Hits Hits+Misses = Hits T otalmemoryaccesses [2 marks] (b) In the context of cache memory, define Miss Penalty. Tag Search Time (time to determine if you have a cache miss) + Time to bring desired block from memory into the cache [12 marks] (c) Complete the following table: For a 32-bit address, width of Set number that Cache Configuration Tag Set Index Byte Offset address 0xC maps to Direct mapped, Block size = 32 bytes Cache size = 1024 bytes 2-way set associative Block size = 128 bytes Cache size = 128 blocks Fully associative Block size = 64 bytes of 1 or N/A Cache size = 128 kbytes Page 6 of 23

7 (d) Given the following cache and cache configuration: 2-way set associative 4 byte cache line 32 byte cache Tag Set Offset 10-bit address Write back and least recently used (LRU) replacement. The cache will always use the LRU bits to determine which line to fill (even if both lines are invalid). A line with an LRU bit of 0 means the line is more recently accessed than a line with LRU bit of 1. Block # Tag (binary) Data(3..0) Valid Dirty LRU Set Index = A B A B Set Index = A 59 BC A3 95 CB Set Index = EE EE EE EE FD Set Index = A4 4A F F You will be given a list of memory operations. The accesses do not occur one after another. You should assume that before each question, the state of the cache is as given above. In the space given, fill in the effects of the operation and give the state of the affected line after the cache operation. You should fill in the information using the same format as given in the example below. MM is used to indicate a byte from memory. Operation: CPU Reads 1 byte from 0x360 (Example) Address: 0b Fetch from memory? No Yes, from 0x360 to 0x363 Hit (H) or Miss (M): M Writeback: No Value returned: MM Cache State Block # Tag (binary) Data Valid Dirty Set Index = MM MM MM MM 1 0 [4 marks] i. Operation: CPU writes 0xAA to 0x24A Address: 0b Fetch from memory? No Yes, from 0x248 to 0x24B Hit (H) or Miss (M): M Writeback: No Value returned: None Cache State Block # Tag (binary) Data Valid Dirty Set Index = MM AA MM MM 1 1 Page 7 of 23

8 [4 marks] ii. Operation: CPU reads 1 byte from 0x24C Address: 0b Fetch from memory? No Yes, from to Hit (H) or Miss (M): H Writeback: No Value returned: 65 Cache State Block # Tag (binary) Data Valid Dirty Set Index = A4 4A [4 marks] iii. Operation: CPU reads 1 byte from 0x266 Address: 0b Fetch from memory? No Yes, from 0x264 to 0x267 Hit (H) or Miss (M): M Writeback: No Value returned: MM Cache State Block # Tag (binary) Data Valid Dirty Set Index = MM MM MM MM 1 0 [4 marks] iv. Operation: CPU writes 0xBE to 0x276 Address: 0b Fetch from memory? No Yes, from to Hit (H) or Miss (M): H Writeback: No Value returned: None Cache State Block # Tag (binary) Data Valid Dirty Set Index = A3 BE CB Page 8 of 23

9 3. Multi-Cycle CPU [7 marks] (a) Considering the multi-cycle CPU implementation from lecture, clearly write the values of the control signals for implementing the following in 1 cycle: PC = PC + 1 AluOut = PC + 1 MDR = MEM[R2] Note: Use as many don t cares as possible. All unaffected registers should remain unchanged. PCWrite = 1 AddrSel = 0 IRLoad = 0 MDRLoad = 1 RFWrite = 0 R1Sel = X R1R2Load = 0 ALU1 = 0 ALU2 = 001 AluOutWrite = 1 RegIn = ALUop = X 000 (for ADD) MemRead = 1 MemWrite = 0 The multicycle diagram is included for your reference. R1R2Load AluOutWrite 1 0 Page 9 of 23

10 [6 marks] (b) As discussed in lectures, all instructions in the multi-cycle CPU implementation perform the same operations in the first two cycles, i.e. Cycle 1: IR = Mem[PC], PC = PC + 1 Cycle 2: R1 = RF[IR7..6], R2 = RF[IR5..4] If Cycle 2 is changed to: Cycle 2: R1 = RF[1], R2 = RF[IR5..4] Then how many cycles are needed to execute the following instructions with this change to the multi-cycle implementation. These instructions have the following cycle counts in the original (lecture) implementation: BZ (3 cycles), ORI (5 cycles), ADD (4 cycles). Your answer should be the minimum number of cycle required to execute the instructions. Write your answer in the space provided below: BZ: 3 cycles ORI: 4 cycles ADD: 5 cycles Page 10 of 23

11 [12 marks] (c) As discussed in lectures, the following instruction: Load R1, (R2) requires four cycles to implement as shown in the table below. List in this table, the actions per cycle for a new copy instruction given by: copy (R1), (R2) where copy performs: mem[r1] = mem[r2] that copies the memory value from one address provided by R2 to to another address given by R1. Your answer should implement this instruction in the minimum number of cycles. Cycle 1 Load instruction IR = Mem[PC] PC = PC + 1 Same as Load Copy instruction Cycle 2 R1 = RF[IR7..6] R2 = RF[IR5..4] Same as Load Cycle 3 MDR = mem[r2] Same as Load Cycle 4 RF[IR7..6] = MDR MEM[R1] = MDR Cycle 5 Cycle 6 Cycle 7 Page 11 of 23

12 [5 marks] (d) On the multi-cycle diagram, draw what changes are needed in the datapath to implement the copy instruction from Part c. Clearly indicate what part of the question (what cycle number) the modifications are for. An extra multicycle diagram has been provided for you; you must cross out the diagram that you do not wish to have marked. R1R2Load( 1(((((((((((0( AluOutWrite( Extra diagram for question 3d if needed. Cross out the diagram that you do not wish to have marked. Page 12 of 23

13 R1R2Load 1 0 AluOutWrite Page 13 of 23

14 4. Devices [12 marks] (a) I want to automate part of my home, so I am going to connect 16 power feeds for some appliances and lights in my home to a wireless-connected small processor which will listen to instructions over the internet and switch power circuits on and off appropriately. The processor has an asynchronous device connection with an 8-bit bidirectional data interface and a 16-bit address and I want to connect 16 relays through a 16-bit register (made up of 4 4-bit registers) that store the value when the Enable (E) input goes high to low. The unconnected parts are in the diagram below. Show the device connections to make this interface work. Acknowledgement (Ack), Master Enable (ME) have the same functionality as defined for the NIOS-II bus presented in lecture. You will only write to this device not read from it. Only this device is connected. Addresses from 0xF000 to 0xFFFF are free on the processor for this device. State any assumptions you feel are necessary. You are given two copies of the diagram. You must cross out the copy you do not want marked. wireless'link' Processor' D7 D0' 8' 16' A156A0' '' ME' '' Ack' '' R/~W' D3' D2' D1' D0' E' D3' D2' D1' D0' E' D3' D2' D1' D0' E' D3' D2' D1' D0' E' 46bit'Register' 46bit'Register' 46bit'Register' 46bit'Register' Drivers,'relays,'other'interface'hardware' Power'to'lights,'etc'connects'here' Note:'E'='Enable' Page 14 of 23

15 Extra diagram for Question 4a. Cross out the copy of the diagram that you do not want marked. wireless link Processor D7 D A15- A0 ME Ack R/~W D3 D2 D1 D0 E D3 D2 D1 D0 E D3 D2 D1 D0 E D3 D2 D1 D0 E 4- bit Register 4- bit Register 4- bit Register 4- bit Register Drivers, relays, other interface hardware Power to lights, etc connects here Note: E = Enable Page 15 of 23

16 [4 marks] (b) As a way for us to check your logic: For your specific interface, describe briefly how the programmer of the small processor would use the interface you prepared using specific processor addresses. DO NOT use the whole page; a few lines should be sufficient. stbio to address 0xF000 to write to device LSB stbio to address 0xF001 to write to device MSB Page 16 of 23

17 5. Interrupts You are going to write the interrupt handler for a NIOS-II in a system different from the DE2 Basic Computer used in the lab. There are only two devices connected to your NIOS-II that can raise interrupts, a UART and a VIDEO device. NEITHER DEVICE IS LIKE THE ONES ON THE DE2 THAT YOU PROGRAMMED IN THE LABS. Here is the information you need: UART device Has only a single byte buffer for receiving (not a FIFO queue like in the DE2). Operates at 1000 bytes per second. Interrupts on IRQ10 when the buffer is ready to be read. Buffer must be read before the next full byte of data (with control bits) is received, because this next byte will overwrite the buffer. You do not use the output of the UART. The data buffer is accessible at address 0x Interrupt is cleared when the data is read. The interrupt handler for the UART should read a single byte and do additional processing before returning to the interrupt routine. The additional processing is done by a call to subroutine void ManageByteIn(char CharInput) which you do not have to write but you do have to call; the subroutine handles saving and restoring all registers it uses. VIDEO device Must be handled on a high-priority basis. Interrupts on IRQ14 You must write zero to 0x to clear the interrupt. You do not need to write the body of the handler otherwise, but note where it would be. [16 marks] (a) Write the assembly-language interrupt handler for the NIOS-II to manage these devices. You do not have to write the setup routine. The VIDEO device must be able to interrupt the UART interrupt service routine. You can continue your code on the next page as needed. isr: rdctl et, ipending # first check if interrupt caused by video andi et, et, 0x4000 beq et, r0, check_uart # if not, check UART movia et, 0x # if yes, acknowledge the interrupt stwio r0, 0(et) # VIDEO BODY check_uart: rdctl et, ipending andi et, et, 0x400 bne et, r0, do_uart # if not uart, we are done isr_done: subi ea, ea, 4 eret # cont on next page Page 17 of 23

18 (extra space to continue 5a) do_uart: subi sp, sp, 16 stw r4, 0(sp) stw ra, 4(sp) stw ea, 8(sp) rdctl et, estatus stw et, 12(sp) movia r4, 0x ldwio r4, 0(r4) # ack interrupt ori et, et, 1 # enable interrupts wrctl ctl0, et call ManageByteIn wrtcl ctl0, r0 # disable interrupts ldw r4, 12(sp) wrctl estatus, r4 ldw r4, 0(sp) ldw ra, 4(sp) ldw ea, 8(sp) addi sp, sp, 16 br isr_done Page 18 of 23

19 [15 marks] 6. The data area of a NIOSII assembly program contains the following code: Camille:.string "Yonge" Cheng:.string "Bathurst" David:.string "Spadina" Prayosha:.string "College" Usman:.string "University".align 2 TeamStreets:.word Camille, Cheng, David, Prayosha, Usman (a).string,.align and.word are types of directives (b) If Camille is 0x1000, where does the string Bathurst start? 0x1006 (c) What does the.align 2 statement do? Ensures that following data is placed at the next address that is divisible by 4 (d) Assuming that all you know as a programmer is that TeamStreets has a word list of street names as shown above, and that you do not know what the streets are (because they might change if someone moves) i. Give the line(s) of assembly code that would put the fifth letter of the third street of TeamStreets (starting at 1) into r15. For example, for the data as it exists above, the fifth letter of the third street of TeamStreets would be i in Spadina. NOTE: The code should be very specific to get exactly that letter; it does not have to be and should not be code to get any letter from any street and can assume that street and letter are present in the data. movia r8, TeamStreets # r8 = TeamStreets ldw r8, 8(r8) # r8 = TeamStreets[2] ldb r15, 4(r8) # rr8 = TeamStreets[2][4] ii. If you were showing this code from part i in the C programming language, what might it look like? char **TeamStreets; result = TeamStreets[2][4]; Page 19 of 23

20 [15 marks] 7. Write a subroutine called hextoascii that converts a 4-bit hexadecimal value to the corresponding 7-bit ASCII code. For example, binary 0010 (hexadecimal digit 2) is converted to (ASCII code for 2). Another example, binary 1011 (hexadecimal digit B) is converted to (ASCII code for B) (see the attached ASCII table on next page for your reference). This subroutine has one input parameter in register r4. The least significant bits in register r4 specify a number, from 0 to 15. The values of the other bits in the input register must be ignored. One value is returned in register r2. The 7 least significant bits in register r2 must be an ASCII code corresponding to one of hex digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. All other bits in the register must be zero. The values in registers r2 through r15 may be changed. All other registers must have unchanged values when the subroutine returns. hextoascii: andi r4, r4, 0xF #ignore higher bits of r4 movi r2, 48 add r2, r2, r4 movi r8, 10 # for r4 < 10, r2 has correct value (48 + r4) blt r4, r8, done addi r2, r2, 7 #for r4 >= 10, adjust r2 done: ret Page 20 of 23

21 4/7/2014 ASCII - Wikipedia, the free encyclopedia Binary Oct Dec Hex Glyph ! " # $ % & ' ( ) A * B C, D E F / A : B ; C < D = E > F? Binary Oct Dec Hex Glyph A B C D E F G H I A J B K C L D M E N F O P Q R S T U V W X Y A Z B [ C \ D ] E ^ F _ Binary Oct Dec Hex Glyph ` a b c d e f g h i A j B k C l D m E n F o p q r s t u v w x y A z B { C D } E ~ 1/1 Page 21 of 23

22 This page is intentionally blank. Page 22 of 23

23 This page is intentionally blank. Page 23 of 23

Student # (use if pages get separated)

Student # (use if pages get separated) UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AND ENGINEERING FINAL EXAMINATION, APRIL 2016 DURATION 2 and ½ hrs Second Year - ECE ECE243H1 S COMPUTER ORGANIZATION Exam Type: D Examiners P. Anderson,

More information

Last Name (in case pages get detached): UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AND ENGINEERING FINAL EXAMINATION, APRIL 2011

Last Name (in case pages get detached): UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AND ENGINEERING FINAL EXAMINATION, APRIL 2011 Page 1 of 17 UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AND ENGINEERING FINAL EXAMINATION, APRIL 2011 ECE243H1 S COMPUTER ORGANIZATION Exam Type: D Duration: 2.5 Hours Prof.s Anderson, Enright Jerger,

More information

Last Name (in case pages get detached): UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AND ENGINEERING MIDTERM EXAMINATION, MARCH 2011

Last Name (in case pages get detached): UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AND ENGINEERING MIDTERM EXAMINATION, MARCH 2011 Page 1 of 13 UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AND ENGINEERING MIDTERM EXAMINATION, MARCH 2011 ECE243H1 S COMPUTER ORGANIZATION Exam Type: D Duration: 2 Hours Prof.s Anderson, Enright Jerger,

More information

University of Toronto Faculty of Applied Science and Engineering Department of Electrical and Computer Engineering Final Examination

University of Toronto Faculty of Applied Science and Engineering Department of Electrical and Computer Engineering Final Examination University of Toronto Faculty of Applied Science and Engineering Department of Electrical and Computer Engineering Final Examination ECE 253F - Digital and Computer Systems Friday December 10, 2010 Duration:

More information

I expect you to understand everything discussed prior to this page. In particular:

I expect you to understand everything discussed prior to this page. In particular: A NOTE TO 259 STUDENTS: Interrupts involve a lot of details. The details presented after this page provide further background on exactly what happens at the CPU logic and assembly code levels. This may

More information

1. Number Conversions [8 marks]

1. Number Conversions [8 marks] 1. Number Conversions [8 marks] a. convert the decimal number 42 to a 16-bit signed integer in binary 0b0000 0000 0010 1010 b. convert the 8-bit number 0x42 to a 16-bit signed integer in binary 0b0000

More information

Detailed Nios II Exception Process

Detailed Nios II Exception Process Detailed Nios II Exception Process When an exception is triggered, the CPU does the following steps automatically: 1. Copy the contents of status to estatus to save pre-exception state 2. Clear (0) PIE

More information

Faculty of Science FINAL EXAMINATION

Faculty of Science FINAL EXAMINATION Faculty of Science FINAL EXAMINATION COMPUTER SCIENCE COMP 273 INTRODUCTION TO COMPUTER SYSTEMS Examiner: Prof. Michael Langer April 18, 2012 Associate Examiner: Mr. Joseph Vybihal 2 P.M. 5 P.M. STUDENT

More information

ECE331 Homework 4. Due Monday, August 13, 2018 (via Moodle)

ECE331 Homework 4. Due Monday, August 13, 2018 (via Moodle) ECE331 Homework 4 Due Monday, August 13, 2018 (via Moodle) 1. Below is a list of 32-bit memory address references, given as hexadecimal byte addresses. The memory accesses are all reads and they occur

More information

Debugging of Application Programs on Altera s DE-Series Boards. 1 Introduction

Debugging of Application Programs on Altera s DE-Series Boards. 1 Introduction Debugging of Application Programs on Altera s DE-Series Boards 1 Introduction This tutorial presents some basic concepts that can be helpful in debugging of application programs written in the Nios II

More information

University of Toronto Faculty of Applied Science and Engineering

University of Toronto Faculty of Applied Science and Engineering Print: First Name:Solution...................... Last Name:............................. Student Number:............................................... University of Toronto Faculty of Applied Science

More information

ECE 30, Lab #8 Spring 2014

ECE 30, Lab #8 Spring 2014 ECE 30, Lab #8 Spring 20 Shown above is a multi-cycle CPU. There are six special registers in this datapath: PC, IR, MDR, A, B, and ALUOut. Of these, PC and IR are enabled to change when PCWr and IRWr

More information

Problem 1 (logic design)

Problem 1 (logic design) Problem 1 (logic design) For this problem, you are to design and implement a sequential multiplexor that works as follows. On each clock cycle, interpret the current input as a selector from the most recent

More information

University of Toronto Faculty of Applied Science and Engineering

University of Toronto Faculty of Applied Science and Engineering Print: First Name:............ Solutions............ Last Name:............................. Student Number:............................................... University of Toronto Faculty of Applied Science

More information

University of Toronto Faculty of Applied Science and Engineering

University of Toronto Faculty of Applied Science and Engineering Print: First Name:............ Solutions............ Last Name:............................. Student Number:............................................... University of Toronto Faculty of Applied Science

More information

NATIONAL UNIVERSITY OF SINGAPORE

NATIONAL UNIVERSITY OF SINGAPORE NATIONAL UNIVERSITY OF SINGAPORE SCHOOL OF COMPUTING EXAMINATION FOR Semester 1 AY2013/14 CS2100 COMPUTER ORGANISATION ANSWER SCRIPT Nov 2013 Time allowed: 2 hours Caveat on the grading scheme: I have

More information

University of Toronto Faculty of Applied Science and Engineering

University of Toronto Faculty of Applied Science and Engineering Print: First Name:............ Solutions............ Last Name:............................. Student Number:............................................... University of Toronto Faculty of Applied Science

More information

8. Instruction Set Reference

8. Instruction Set Reference 8. Instruction Set Reference NII51017-7.1.0 Introduction This section introduces the Nios II instruction-word format and provides a detailed reference of the Nios II instruction set. This chapter contains

More information

CS 351 Exam 2 Mon. 11/2/2015

CS 351 Exam 2 Mon. 11/2/2015 CS 351 Exam 2 Mon. 11/2/2015 Name: Rules and Hints The MIPS cheat sheet and datapath diagram are attached at the end of this exam for your reference. You may use one handwritten 8.5 11 cheat sheet (front

More information

THE HONG KONG UNIVERSITY OF SCIENCE & TECHNOLOGY Computer Organization (COMP 2611) Spring Semester, 2014 Final Examination

THE HONG KONG UNIVERSITY OF SCIENCE & TECHNOLOGY Computer Organization (COMP 2611) Spring Semester, 2014 Final Examination THE HONG KONG UNIVERSITY OF SCIENCE & TECHNOLOGY Computer Organization (COMP 2611) Spring Semester, 2014 Final Examination May 23, 2014 Name: Email: Student ID: Lab Section Number: Instructions: 1. This

More information

Winter 2006 FINAL EXAMINATION Auxiliary Gymnasium Tuesday, April 18 7:00pm to 10:00pm

Winter 2006 FINAL EXAMINATION Auxiliary Gymnasium Tuesday, April 18 7:00pm to 10:00pm University of Calgary Department of Electrical and Computer Engineering ENCM 369: Computer Organization Lecture Instructor for L01 and L02: Dr. S. A. Norman Winter 2006 FINAL EXAMINATION Auxiliary Gymnasium

More information

CS232 Final Exam May 5, 2001

CS232 Final Exam May 5, 2001 CS232 Final Exam May 5, 2 Name: This exam has 4 pages, including this cover. There are six questions, worth a total of 5 points. You have 3 hours. Budget your time! Write clearly and show your work. State

More information

8. Instruction Set Reference

8. Instruction Set Reference 8. NII51017-10.0.0 Introduction This section introduces the Nios II instruction word format and provides a detailed reference of the Nios II instruction set. This chapter contains the following sections:

More information

Midterm #2 Solutions April 23, 1997

Midterm #2 Solutions April 23, 1997 CS152 Computer Architecture and Engineering Computer Science Division Department of Electrical Engineering and Computer Sciences University of California, Berkeley Sp97 D.K. Jeong Midterm #2 Solutions

More information

Embedded Computing Platform. Architecture and Instruction Set

Embedded Computing Platform. Architecture and Instruction Set Embedded Computing Platform Microprocessor: Architecture and Instruction Set Ingo Sander ingo@kth.se Microprocessor A central part of the embedded platform A platform is the basic hardware and software

More information

Basic Computer System for the Altera DE0-Nano Board. 1 Introduction. 2 DE0-Nano Basic Computer Contents. 2.1 Nios II Processor. For Quartus II 13.

Basic Computer System for the Altera DE0-Nano Board. 1 Introduction. 2 DE0-Nano Basic Computer Contents. 2.1 Nios II Processor. For Quartus II 13. Basic Computer System for the Altera DE0-Nano Board For Quartus II 13.0 1 Introduction This document describes a simple computer system that can be implemented on the Altera DE0-Nano development and education

More information

Basic Computer System for the Altera DE1 Board. 1 Introduction. 2 DE1 Basic Computer Contents. 2.1 Nios II Processor.

Basic Computer System for the Altera DE1 Board. 1 Introduction. 2 DE1 Basic Computer Contents. 2.1 Nios II Processor. Basic Computer System for the Altera DE1 Board For Quartus II 8 1 Introduction This document describes a simple computer system that can be implemented on the Altera DE1 development and education board.

More information

8. Instruction Set Reference

8. Instruction Set Reference 8. May 2011 NII51017-11.0.0 NII51017-11.0.0 This section introduces the Nios II instruction word format and provides a detailed reference of the Nios II instruction set. This chapter contains the following

More information

Computer System Architecture Midterm Examination Spring 2002

Computer System Architecture Midterm Examination Spring 2002 Computer System Architecture 6.823 Midterm Examination Spring 2002 Name: This is an open book, open notes exam. 110 Minutes 1 Pages Notes: Not all questions are of equal difficulty, so look over the entire

More information

DE2-115 Computer System. 1 Introduction. 2 DE2-115 Computer Contents. 2.1 Nios II Processor. For Quartus Prime 16.1

DE2-115 Computer System. 1 Introduction. 2 DE2-115 Computer Contents. 2.1 Nios II Processor. For Quartus Prime 16.1 DE2-115 Computer System For Quartus Prime 16.1 1 Introduction This document describes a computer system that can be implemented on the Intel DE2-115 development and education board. This system, called

More information

CS 433 Homework 5. Assigned on 11/7/2017 Due in class on 11/30/2017

CS 433 Homework 5. Assigned on 11/7/2017 Due in class on 11/30/2017 CS 433 Homework 5 Assigned on 11/7/2017 Due in class on 11/30/2017 Instructions: 1. Please write your name and NetID clearly on the first page. 2. Refer to the course fact sheet for policies on collaboration.

More information

Write only as much as necessary. Be brief!

Write only as much as necessary. Be brief! 1 CIS371 Computer Organization and Design Midterm Exam Prof. Martin Thursday, March 15th, 2012 This exam is an individual-work exam. Write your answers on these pages. Additional pages may be attached

More information

Machine Organization & Assembly Language

Machine Organization & Assembly Language Name: 1 CSE 378 Fall 2010 Machine Organization & Assembly Language Final Exam Solution Write your answers on these pages. Additional pages may be attached (with staple) if necessary. Please ensure that

More information

ISA Instruction Operation

ISA Instruction Operation This exam has 6 problems. Make sure you have a complete exam before you begin. Write your name on every page in case pages become separated during grading. You will have three hours to complete this exam.

More information

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

We r e going to play Final (exam) Jeopardy! Answers: Questions: - 1 - . (0 pts) We re going to play Final (exam) Jeopardy! Associate the following answers with the appropriate question. (You are given the "answers": Pick the "question" that goes best with each "answer".)

More information

The University of Alabama in Huntsville Electrical & Computer Engineering Department CPE Test II November 14, 2000

The University of Alabama in Huntsville Electrical & Computer Engineering Department CPE Test II November 14, 2000 The University of Alabama in Huntsville Electrical & Computer Engineering Department CPE 513 01 Test II November 14, 2000 Name: 1. (5 points) For an eight-stage pipeline, how many cycles does it take to

More information

Final Project: MIPS-like Microprocessor

Final Project: MIPS-like Microprocessor Final Project: MIPS-like Microprocessor Objective: The objective of this project is to design, simulate, and implement a simple 32-bit microprocessor with an instruction set that is similar to a MIPS.

More information

Cache Organizations for Multi-cores

Cache Organizations for Multi-cores Lecture 26: Recap Announcements: Assgn 9 (and earlier assignments) will be ready for pick-up from the CS front office later this week Office hours: all day next Tuesday Final exam: Wednesday 13 th, 7:50-10am,

More information

University of Toronto Faculty of Applied Science and Engineering

University of Toronto Faculty of Applied Science and Engineering Print: First Name:......... SOLUTION............... Last Name:............................. Student Number:............................................... University of Toronto Faculty of Applied Science

More information

Digital Design & Computer Architecture (E85) D. Money Harris Fall 2007

Digital Design & Computer Architecture (E85) D. Money Harris Fall 2007 Digital Design & Computer Architecture (E85) D. Money Harris Fall 2007 Final Exam This is a closed-book take-home exam. You are permitted a calculator and two 8.5x sheets of paper with notes. The exam

More information

Computer Architecture CS372 Exam 3

Computer Architecture CS372 Exam 3 Name: Computer Architecture CS372 Exam 3 This exam has 7 pages. Please make sure you have all of them. Write your name on this page and initials on every other page now. You may only use the green card

More information

Mark II Aiken Relay Calculator

Mark II Aiken Relay Calculator Introduction to Embedded Microcomputer Systems Lecture 6.1 Mark II Aiken Relay Calculator 2.12. Tutorial 2. Arithmetic and logical operations format descriptions examples h 8-bit unsigned hexadecimal $00

More information

EE457 Lab 4 Part 4 Seven Questions From Previous Midterm Exams and Final Exams ee457_lab4_part4.fm 10/6/04

EE457 Lab 4 Part 4 Seven Questions From Previous Midterm Exams and Final Exams ee457_lab4_part4.fm 10/6/04 EE457 Lab 4 Part 4 Seven Questions From Previous Midterm Exams and Final Exams ee457_lab4_part4.fm 10/6/04 1 [Based on Question #7 of Summer 1993 Midterm] Remove TARGET register, add ZERO FF: Please refer

More information

Slide Set 9. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng

Slide Set 9. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng Slide Set 9 for ENCM 369 Winter 2018 Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary March 2018 ENCM 369 Winter 2018 Section 01

More information

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Comp 411 Computer Organization Fall 2006 Solutions Problem Set #10 Problem 1. Cache accounting The diagram below illustrates a blocked, direct-mapped cache

More information

ECE Exam I - Solutions February 19 th, :00 pm 4:25pm

ECE Exam I - Solutions February 19 th, :00 pm 4:25pm ECE 3056 Exam I - Solutions February 19 th, 2015 3:00 pm 4:25pm 1. (35 pts) Consider the following block of SPIM code. The text segment starts at 0x00400000 and the data segment starts at 0x10010000..data

More information

ECE Lab 8. Logic Design for a Direct-Mapped Cache. To understand the function and design of a direct-mapped memory cache.

ECE Lab 8. Logic Design for a Direct-Mapped Cache. To understand the function and design of a direct-mapped memory cache. ECE 201 - Lab 8 Logic Design for a Direct-Mapped Cache PURPOSE To understand the function and design of a direct-mapped memory cache. EQUIPMENT Simulation Software REQUIREMENTS Electronic copy of your

More information

CS 351 Exam 2, Section 1 Wed. 11/2/2016

CS 351 Exam 2, Section 1 Wed. 11/2/2016 CS 351 Exam 2, Section 1 Wed. 11/2/2016 Name: Rules and Hints You may use one handwritten 8.5 11 cheat sheet (front and back). This is the only additional resource you may consult during this exam. No

More information

Chapter 5 Solutions: For More Practice

Chapter 5 Solutions: For More Practice Chapter 5 Solutions: For More Practice 1 Chapter 5 Solutions: For More Practice 5.4 Fetching, reading registers, and writing the destination register takes a total of 300ps for both floating point add/subtract

More information

Digital Logic & Computer Design CS Professor Dan Moldovan Spring Copyright 2007 Elsevier 8-<1>

Digital Logic & Computer Design CS Professor Dan Moldovan Spring Copyright 2007 Elsevier 8-<1> Digital Logic & Computer Design CS 4341 Professor Dan Moldovan Spring 21 Copyright 27 Elsevier 8- Chapter 8 :: Memory Systems Digital Design and Computer Architecture David Money Harris and Sarah L.

More information

CS232 Final Exam May 5, 2001

CS232 Final Exam May 5, 2001 CS232 Final Exam May 5, 2 Name: Spiderman This exam has 4 pages, including this cover. There are six questions, worth a total of 5 points. You have 3 hours. Budget your time! Write clearly and show your

More information

Winter 2009 FINAL EXAMINATION Location: Engineering A Block, Room 201 Saturday, April 25 noon to 3:00pm

Winter 2009 FINAL EXAMINATION Location: Engineering A Block, Room 201 Saturday, April 25 noon to 3:00pm University of Calgary Department of Electrical and Computer Engineering ENCM 369: Computer Organization Lecture Instructors: S. A. Norman (L01), N. R. Bartley (L02) Winter 2009 FINAL EXAMINATION Location:

More information

CS 537: Introduction to Operating Systems Fall 2015: Midterm Exam #1

CS 537: Introduction to Operating Systems Fall 2015: Midterm Exam #1 CS 537: Introduction to Operating Systems Fall 2015: Midterm Exam #1 This exam is closed book, closed notes. All cell phones must be turned off. No calculators may be used. You have two hours to complete

More information

ECE 3056: Architecture, Concurrency and Energy of Computation. Single and Multi-Cycle Datapaths: Practice Problems

ECE 3056: Architecture, Concurrency and Energy of Computation. Single and Multi-Cycle Datapaths: Practice Problems ECE 3056: Architecture, Concurrency and Energy of Computation Single and Multi-Cycle Datapaths: Practice Problems 1. Consider the single cycle SPIM datapath. a. Specify the values of the control signals

More information

Final Exam Fall 2007

Final Exam Fall 2007 ICS 233 - Computer Architecture & Assembly Language Final Exam Fall 2007 Wednesday, January 23, 2007 7:30 am 10:00 am Computer Engineering Department College of Computer Sciences & Engineering King Fahd

More information

ECE3055B Fall 2004 Computer Architecture and Operating Systems Final Exam Solution Dec 10, 2004

ECE3055B Fall 2004 Computer Architecture and Operating Systems Final Exam Solution Dec 10, 2004 Georgia Tech Page of 4 ECE3055B Fall 24 Computer Architecture and Operatg Systems Fal Exam Solution Dec 0, 24. (5%) General Q&A. Give concise and brief answer to each of the followg questions... (2%) What

More information

/ : Computer Architecture and Design Fall Midterm Exam October 16, Name: ID #:

/ : Computer Architecture and Design Fall Midterm Exam October 16, Name: ID #: 16.482 / 16.561: Computer Architecture and Design Fall 2014 Midterm Exam October 16, 2014 Name: ID #: For this exam, you may use a calculator and two 8.5 x 11 double-sided page of notes. All other electronic

More information

Virtual Memory Review. Page faults. Paging system summary (so far)

Virtual Memory Review. Page faults. Paging system summary (so far) Lecture 22 (Wed 11/19/2008) Virtual Memory Review Lab #4 Software Simulation Due Fri Nov 21 at 5pm HW #3 Cache Simulator & code optimization Due Mon Nov 24 at 5pm More Virtual Memory 1 2 Paging system

More information

Laboratory Exercise 7

Laboratory Exercise 7 Laboratory Exercise 7 Using Interrupts with C code The purpose of this exercise is to investigate the use of interrupts for the Nios II processor, using C code. To do this exercise you need to have a good

More information

Second Midterm Exam March 21, 2017 CS162 Operating Systems

Second Midterm Exam March 21, 2017 CS162 Operating Systems University of California, Berkeley College of Engineering Computer Science Division EECS Spring 2017 Ion Stoica Second Midterm Exam March 21, 2017 CS162 Operating Systems Your Name: SID AND 162 Login:

More information

CPS 104 Final Exam. 2pm to 5pm Open book exam. Answer all questions, state all your assumptions, clearly mark your final answer. 1.

CPS 104 Final Exam. 2pm to 5pm Open book exam. Answer all questions, state all your assumptions, clearly mark your final answer. 1. CPS 104 Final Exam 2pm to 5pm Open book exam Answer all questions, state all your assumptions, clearly mark your final answer. Be sure you have all eight (8) pages of the exam. Write your name on each

More information

Processor design - MIPS

Processor design - MIPS EASY Processor design - MIPS Q.1 What happens when a register is loaded? 1. The bits of the register are set to all ones. 2. The bit pattern in the register is copied to a location in memory. 3. A bit

More information

There are 19 total numbered pages, 8 Questions. You have 2.5 hours. Budget your time carefully!

There are 19 total numbered pages, 8 Questions. You have 2.5 hours. Budget your time carefully! UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AND ENGINEERING FINAL EXAMINATION, April, 2015 Third Year Materials ECE344H1 Operating Systems Calculator Type: 2 Exam Type: A Examiner D. Yuan Please Read

More information

CS 537: Introduction to Operating Systems Fall 2015: Midterm Exam #1

CS 537: Introduction to Operating Systems Fall 2015: Midterm Exam #1 CS 537: Introduction to Operating Systems Fall 2015: Midterm Exam #1 This exam is closed book, closed notes. All cell phones must be turned off. No calculators may be used. You have two hours to complete

More information

Chapter 5: The Processor: Datapath and Control

Chapter 5: The Processor: Datapath and Control Chapter 5: The Processor: Datapath and Control Overview Logic Design Conventions Building a Datapath and Control Unit Different Implementations of MIPS instruction set A simple implementation of a processor

More information

ECE 411 Exam 1. This exam has 5 problems. Make sure you have a complete exam before you begin.

ECE 411 Exam 1. This exam has 5 problems. Make sure you have a complete exam before you begin. This exam has 5 problems. Make sure you have a complete exam before you begin. Write your name on every page in case pages become separated during grading. You will have three hours to complete this exam.

More information

Chapter 8 :: Topics. Chapter 8 :: Memory Systems. Introduction Memory System Performance Analysis Caches Virtual Memory Memory-Mapped I/O Summary

Chapter 8 :: Topics. Chapter 8 :: Memory Systems. Introduction Memory System Performance Analysis Caches Virtual Memory Memory-Mapped I/O Summary Chapter 8 :: Systems Chapter 8 :: Topics Digital Design and Computer Architecture David Money Harris and Sarah L. Harris Introduction System Performance Analysis Caches Virtual -Mapped I/O Summary Copyright

More information

There are 13 total numbered pages, 7 Questions.

There are 13 total numbered pages, 7 Questions. UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AND ENGINEERING FINAL EXAMINATION, April, 2017 Third Year Materials ECE344H1 - Operating Systems Calculator Type: 4 Exam Type: A Examiner D. Yuan Please

More information

6.823 Computer System Architecture Datapath for DLX Problem Set #2

6.823 Computer System Architecture Datapath for DLX Problem Set #2 6.823 Computer System Architecture Datapath for DLX Problem Set #2 Spring 2002 Students are allowed to collaborate in groups of up to 3 people. A group hands in only one copy of the solution to a problem

More information

CS152 Computer Architecture and Engineering CS252 Graduate Computer Architecture Spring Caches and the Memory Hierarchy

CS152 Computer Architecture and Engineering CS252 Graduate Computer Architecture Spring Caches and the Memory Hierarchy CS152 Computer Architecture and Engineering CS252 Graduate Computer Architecture Spring 2019 Caches and the Memory Hierarchy Assigned February 13 Problem Set #2 Due Wed, February 27 http://inst.eecs.berkeley.edu/~cs152/sp19

More information

1 /18 2 /16 3 /18 4 /26 5 /22

1 /18 2 /16 3 /18 4 /26 5 /22 M A S S A C H U S E T T S I N S T I T U T E O F T E C H N O L O G Y DEPARTMENT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE 6.004 Computation Structures Fall 2018 Quiz #2 1 /18 2 /16 3 /18 4 /26 5 /22

More information

ECE550 PRACTICE Final

ECE550 PRACTICE Final ECE550 PRACTICE Final This is a full length practice midterm exam. If you want to take it at exam pace, give yourself 175 minutes to take the entire test. Just like the real exam, each question has a point

More information

ECE331: Hardware Organization and Design

ECE331: Hardware Organization and Design ECE331: Hardware Organization and Design Lecture 23: Associative Caches Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Last time: Write-Back Alternative: On data-write hit, just

More information

MIPS) ( MUX

MIPS) ( MUX Memory What do we use for accessing small amounts of data quickly? Registers (32 in MIPS) Why not store all data and instructions in registers? Too much overhead for addressing; lose speed advantage Register

More information

registers data 1 registers MEMORY ADDRESS on-chip cache off-chip cache main memory: real address space part of virtual addr. sp.

registers data 1 registers MEMORY ADDRESS on-chip cache off-chip cache main memory: real address space part of virtual addr. sp. Cache associativity Cache and performance 12 1 CMPE110 Spring 2005 A. Di Blas 110 Spring 2005 CMPE Cache Direct-mapped cache Reads and writes Textbook Edition: 7.1 to 7.3 Second Third Edition: 7.1 to 7.3

More information

The University of Michigan - Department of EECS EECS 370 Introduction to Computer Architecture Midterm Exam 2 solutions April 5, 2011

The University of Michigan - Department of EECS EECS 370 Introduction to Computer Architecture Midterm Exam 2 solutions April 5, 2011 1. Performance Principles [5 pts] The University of Michigan - Department of EECS EECS 370 Introduction to Computer Architecture Midterm Exam 2 solutions April 5, 2011 For each of the following comparisons,

More information

ELE 758 * DIGITAL SYSTEMS ENGINEERING * MIDTERM TEST * Circle the memory type based on electrically re-chargeable elements

ELE 758 * DIGITAL SYSTEMS ENGINEERING * MIDTERM TEST * Circle the memory type based on electrically re-chargeable elements ELE 758 * DIGITAL SYSTEMS ENGINEERING * MIDTERM TEST * Student name: Date: Example 1 Section: Memory hierarchy (SRAM, DRAM) Question # 1.1 Circle the memory type based on electrically re-chargeable elements

More information

Comprehensive Exams COMPUTER ARCHITECTURE. Spring April 3, 2006

Comprehensive Exams COMPUTER ARCHITECTURE. Spring April 3, 2006 Comprehensive Exams COMPUTER ARCHITECTURE Spring 2006 April 3, 2006 ID Number 1 /15 2 /20 3 /20 4 /20 Total /75 Problem 1. ( 15 points) Logic Design: A three-input switching function is expressed as f(a,

More information

Computer Organization MIPS ISA

Computer Organization MIPS ISA CPE 335 Computer Organization MIPS ISA Dr. Iyad Jafar Adapted from Dr. Gheith Abandah Slides http://www.abandah.com/gheith/courses/cpe335_s08/index.html CPE 232 MIPS ISA 1 (vonneumann) Processor Organization

More information

CS 351 Exam 2 Wed. 4/5/2017

CS 351 Exam 2 Wed. 4/5/2017 CS 351 Exam 2 Wed. 4/5/2017 Name: Rules and Hints You may use one handwritten 8.5 11 cheat sheet (front and back). This is the only additional resource you may consult during this exam. No calculators.

More information

ECE Exam I February 19 th, :00 pm 4:25pm

ECE Exam I February 19 th, :00 pm 4:25pm ECE 3056 Exam I February 19 th, 2015 3:00 pm 4:25pm 1. The exam is closed, notes, closed text, and no calculators. 2. The Georgia Tech Honor Code governs this examination. 3. There are 4 questions and

More information

ECE Sample Final Examination

ECE Sample Final Examination ECE 3056 Sample Final Examination 1 Overview The following applies to all problems unless otherwise explicitly stated. Consider a 2 GHz MIPS processor with a canonical 5-stage pipeline and 32 general-purpose

More information

Alexandria University

Alexandria University Alexandria University Faculty of Engineering Division of Communications & Electronics CC322 Computer Architecture Sheet 3 1. A cache has the following parameters: b, block size given in numbers of words;

More information

Virtual Memory Worksheet

Virtual Memory Worksheet Virtual Memory Worksheet (v + p) bits in virtual address (m + p) bits in physical address 2 v number of virtual pages 2 m number of physical pages 2 p bytes per physical page 2 v+p bytes in virtual memory

More information

ECE 411 Exam 1 Practice Problems

ECE 411 Exam 1 Practice Problems ECE 411 Exam 1 Practice Problems Topics Single-Cycle vs Multi-Cycle ISA Tradeoffs Performance Memory Hierarchy Caches (including interactions with VM) 1.) Suppose a single cycle design uses a clock period

More information

Chapter 4. MARIE: An Introduction to a Simple Computer. Chapter 4 Objectives. 4.1 Introduction. 4.2 CPU Basics

Chapter 4. MARIE: An Introduction to a Simple Computer. Chapter 4 Objectives. 4.1 Introduction. 4.2 CPU Basics Chapter 4 Objectives Learn the components common to every modern computer system. Chapter 4 MARIE: An Introduction to a Simple Computer Be able to explain how each component contributes to program execution.

More information

registers data 1 registers MEMORY ADDRESS on-chip cache off-chip cache main memory: real address space part of virtual addr. sp.

registers data 1 registers MEMORY ADDRESS on-chip cache off-chip cache main memory: real address space part of virtual addr. sp. 13 1 CMPE110 Computer Architecture, Winter 2009 Andrea Di Blas 110 Winter 2009 CMPE Cache Direct-mapped cache Reads and writes Cache associativity Cache and performance Textbook Edition: 7.1 to 7.3 Third

More information

Figure 1: Organisation for 128KB Direct Mapped Cache with 16-word Block Size and Word Addressable

Figure 1: Organisation for 128KB Direct Mapped Cache with 16-word Block Size and Word Addressable Tutorial 12: Cache Problem 1: Direct Mapped Cache Consider a 128KB of data in a direct-mapped cache with 16 word blocks. Determine the size of the tag, index and offset fields if a 32-bit architecture

More information

Number Representations

Number Representations Simple Arithmetic [Arithm Notes] Number representations Signed numbers Sign-magnitude, ones and twos complement Arithmetic Addition, subtraction, negation, overflow MIPS instructions Logic operations MIPS

More information

Midterm II December 3 rd, 2007 CS162: Operating Systems and Systems Programming

Midterm II December 3 rd, 2007 CS162: Operating Systems and Systems Programming Fall 2007 University of California, Berkeley College of Engineering Computer Science Division EECS John Kubiatowicz Midterm II December 3 rd, 2007 CS162: Operating Systems and Systems Programming Your

More information

1. (11 pts) For each question, state which answer is the most apropriate. First one is done for you.

1. (11 pts) For each question, state which answer is the most apropriate. First one is done for you. . ( pts) For each question, state which answer is the most apropriate. First one is done for you. Questions: z. What is this section of the test? u a. What is a flip-flop? b. Which devices have to worry

More information

EN1640: Design of Computing Systems Topic 06: Memory System

EN1640: Design of Computing Systems Topic 06: Memory System EN164: Design of Computing Systems Topic 6: Memory System Professor Sherief Reda http://scale.engin.brown.edu Electrical Sciences and Computer Engineering School of Engineering Brown University Spring

More information

1 /18 2 /16 3 /18 4 /26 5 /22

1 /18 2 /16 3 /18 4 /26 5 /22 M A S S A C H U S E T T S I N S T I T U T E O F T E C H N O L O G Y DEPARTMENT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE 6.004 Computation Structures Fall 2018 Quiz #2 1 /18 2 /16 3 /18 4 /26 5 /22

More information

CIS 371 Spring 2015 Computer Organization and Design 7 May 2015 Final Exam

CIS 371 Spring 2015 Computer Organization and Design 7 May 2015 Final Exam CIS 371 Spring 2015 Computer Organization and Design 7 May 2015 Final Exam Name: Recitation # (e.g., 201): Pennkey (e.g., eeaton): My signature below certifies that I have complied with the University

More information

1 Address space with memory mapped devices

1 Address space with memory mapped devices 1 Address space with memory mapped devices In systems with memory mapped devices, the devices appear as regions of memory. The addresses that these devices occupy are determined by the system designer.

More information

Lab5 2-Nov-18, due 16-Nov-18 (2 weeks duration) Lab6 16-Nov-19, due 30-Nov-18 (2 weeks duration)

Lab5 2-Nov-18, due 16-Nov-18 (2 weeks duration) Lab6 16-Nov-19, due 30-Nov-18 (2 weeks duration) CS1021 AFTER READING WEEK Mid-Semester Test NOW Thurs 8th Nov @ 9am in Goldsmith Hall (ALL students to attend at 9am) Final 2 Labs Lab5 2-Nov-18, due 16-Nov-18 (2 weeks duration) Lab6 16-Nov-19, due 30-Nov-18

More information

The MARIE Architecture

The MARIE Architecture The MARIE Machine Architecture that is Really Intuitive and Easy. We now define the ISA (Instruction Set Architecture) of the MARIE. This forms the functional specifications for the CPU. Basic specifications

More information

Computer Architecture and Engineering CS152 Quiz #1 Wed, February 17th, 2016 Professor George Michelogiannakis Name: <ANSWER KEY>

Computer Architecture and Engineering CS152 Quiz #1 Wed, February 17th, 2016 Professor George Michelogiannakis Name: <ANSWER KEY> Computer Architecture and Engineering CS152 Quiz #1 Wed, February 17th, 2016 Professor George Michelogiannakis Name: This is a closed book, closed notes exam. 80 Minutes. 18 pages Notes: Not

More information

Topic Notes: MIPS Instruction Set Architecture

Topic Notes: MIPS Instruction Set Architecture Computer Science 220 Assembly Language & Comp. Architecture Siena College Fall 2011 Topic Notes: MIPS Instruction Set Architecture vonneumann Architecture Modern computers use the vonneumann architecture.

More information

CIS 371 Spring 2015 Computer Organization and Design 7 May 2015 Final Exam Answer Key

CIS 371 Spring 2015 Computer Organization and Design 7 May 2015 Final Exam Answer Key CIS 371 Spring 2015 Final 1 CIS 371 Spring 2015 Computer Organization and Design 7 May 2015 Final Exam Answer Key 0.) The Easy One (1 point total) Check cover sheet for name, PennKey, and signature. 1.)

More information