ECE 485/585 Midterm Exam Time allowed: 100 minutes Total Points: 65 Points Scored: Name: Problem No. 1 (12 points) For each of the following statements, indicate whether the statement is TRUE or FALSE: (a) The following is an example of an instruction used in memory-mapped I/O: IN AX, 4 (b) In an architecture that restricts memory operand alignment, a double-word write starting at the following hexadecimal address will result in an un-aligned access: 0x4273fb6a (c) A breakpoint inserted in the code by a debugger will result in a synchronous interrupt (d) If the memory access pattern exhibits high spatial locality, it is better to use high order address interleaving (e) In a burst EDO DRAM, two different column addresses must be specified for accesses to two consecutive columns (f) Increasing the associativity of a cache has no impact on compulsory misses Problem No. 2 (9 points) For each of the following questions, encircle ALL the correct answers: (a) When assigning interrupt priorities among multiple interrupt requests, the following factors need to be considered: i. Relative importance of the I/O device that generated the request ii. Length of the Interrupt Service Routine iii. Ability of I/O device to buffer data iv. All of the above (b) A DDR3-1333 DRAM has the following timing parameters: t RCD = 6 cycles, t RP = 6 cycles, t RAS = 14 cycles, t RRD = 3 cycles. What is the minimum time between activating two rows in two different banks? i. 9 ns ii. 30 ns iii. 4.5 ns iv. None of the above (c) When comparing SRAM with DRAM, which of the following statements are correct? i. SRAM has lower density compared to DRAM ii. SRAM is easier to integrate with logic circuits as compared to DRAM iii. SRAM requires multiplexed address lines whereas DRAM does not iv. All of the above
Problem No. 3 (10 points) (a) (6 points) In this problem, your objective is to design a finite state machine that recognizes the particular pattern 10110. The input to the finite state machine is a sequence of binary bits in series. When the FSM sees the pattern 10110 in its most recent input bits, it should output 1, otherwise it should output 0. Draw the state transition diagram for this FSM? (b) (2 points) State ONE advantage of using DMA as compared to using programmed I/O. (c) (2 points) What is the usage of Minimum/Maximum mode in an 8086 CPU?
Problem No. 4 (14 points) (a) (8 points) The following table shows the cache configuration for three different caches (C1, C2 and C3) in terms of cache size, line size and associativity. For each of the caches, fill in the missing entries in the table: (i) Number of sets, (ii) Number of address bits needed for the Index field, (iii) Number of address bits needed for the Tag field. Assume that the processor is using 32-bit addresses: CACHE CACHE SIZE LINE SIZE ASSOCIATIVITY NUMBER OF SETS C1 64 KB 64 B Direct mapped (1-way) C2 256 KB 64 B 8-way Set Associative C3 16 KB 32 B Fully Associative INDEX BITS TAG BITS (b) (3 points) What is the minimum burst length supported in DDR2? Why do DDRx memories not support a burst length of 1? (c) (3 points) Describe a scenario in which a cache write request sent by the processor results in a memory write followed by a memory read.
Problem No. 5 (20 points) A processor uses a dual-rank DDR4-2400 memory system. The following table shows the relevant memory system parameters. Assume that the memory controller is using an open page policy, such that once a row in a bank has been activated, it is kept open as long as there is no conflicting request to a different row in the same bank. DRAM Parameter Value Number of ranks 2 DRAM channel width 64 bits DRAM chip output width 4 bits DRAM chip capacity 16 Gbits Number of banks 16 Row size 4KBytes Burst length 16 Memory controller policy Open page t RCD t CL t RP Answer the following questions: (a) (3 points) Calculate the total DRAM capacity available in the system. (b) (6 points) Calculate the number of bits needed to specify each of the following fields in the physical address: (i) Rank, (ii) Bank, (iii) Column, and (iv) Row.
(c) (6 points) Consider a memory access sequence which requires the processor to read the ENTIRE contents of a single DRAM row R1 in the bank B1. Before this access sequence could proceed, the currently open row in bank B1 (a row different from R1 ) needs to be closed. In the absence of any other memory requests, how long (in nanoseconds) will it take for the memory controller to complete the access sequence to row R1? (d) (5 points) Assume that each DRAM row must be refreshed once in every 64 milliseconds. For that purpose, refresh commands are being periodically sent to each DRAM rank. Each refresh command triggers a parallel refresh operation in every bank within a rank, resulting in 16 rows to be refreshed in each bank. Assume that each refresh command takes 400ns (t RFC). Calculate the fraction of time for which the memory system is unable to service memory requests due to refresh activity.