GATE 2005
203 questions
MCQ 2031-mark 203
Questions 76–80 of 203
ALU, the bus and all the registers in the data path are of identical size. All operations including incrementation of the PC and the GPRs are to be carried out in the ALU. Two clock cycles are needed for memory read operation - the first one for loading address in the MAR and the next one for loading data from the memory bus into the MDR.
The instruction "call Rn, sub" is a two word instruction. Assuming that PC is incremented during the fetch cycle of the first word of the instruction, its register transfer interpretation is
Rn < = PC + 1;
PC < = M[PC]; The minimum number of CPU clock cycles needed during the execution cycle of this instruction is:Answer: (B)
- cycle
- (These two actions do not depend on each other, so they can be done in the same cycle.)
- cycle (System BUS)
- is free, and the two actions do not depend on each other.) (Internal BUS)
- rd cycle
So cycles are needed.
A rough sketch:
Correct Answer: B
ALU, the bus and all the registers in the data path are of identical size. All operations including incrementation of the PC and the GPRs are to be carried out in the ALU. Two clock cycles are needed for memory read operation - the first one for loading address in the MAR and the next one for loading data from the memory bus into the MDR.
The instruction "add R0, R1" has the register transfer interpretation R0<=R0+R1. The minimum number of clock cycles needed for execution cycle of this instruction is.
Answer: (B)
Execution of :
1. :
2. :
3. ALU adds , its output goes on the bus, and :
S and T both need the bus, so they cannot be loaded in the same cycle. The add can start only after both are loaded. So the minimum is cycles. The instruction fetch is not counted, since only the execution cycle is asked.
Answer: (B)
ADD A[R0], @B The first operand (destination) "A[R0]" uses indexed addressing mode with R0 as the index register. The second operand (source) "@B" uses indirect addressing mode. A and B are memory addresses residing at the second and the third words, respectively. The first word of the instruction specifies the opcode, the index register designation and the source and destination addressing modes. During execution of ADD instruction, the two operands are added and stored in the destination (first operand). The number of memory cycles needed during the execution cycle of the instruction is:
Answer: (B)
1. Read the destination operand from address (indexed mode). The addition of is done in the ALU and needs no memory cycle. This is 1 read.
2. Read the word at address . Indirect mode means this word holds the address of the source operand. 1 read.
3. Read the source operand from that address. 1 read.
4. Write the sum back to the destination address . 1 write.
Total memory cycles.
Answer: (B)
Answer: (C)
Within there are refreshes.
refreshes.
So in memory cycle there are refreshes, and refresh takes .
Refreshing time per cycle
Check: of refreshing in every , which is .
Answer: (C)
0 5 3 9 7 0 16 55
Assuming that initially the cache did not have any memory block from the current job?
Answer: (C)
The cache maps main memory blocks onto sets. So each set gets blocks. Each set has room for two blocks (-way set).
We have sets, so we need index bits. Also, blocks go to one set, so we need tag bits.
These bits together identify one memory block. The tag bits are placed before the index bits. (Otherwise, adjacent memory references, which show spatial locality, would hurt cache performance.)
Using the two index bits (the lower bits), the blocks go to the sets like this:
Each set has only places. So is thrown out, because it is the least recently used block. The final content of the cache is:
(C) is the answer.