edited by
24,127 views
55 votes
55 votes

Consider the following data path of a $\text{CPU}.$

The $\text{ALU},$ the bus and all the registers in the data path are of identical size. All operations including incrementation of the $\text{PC}$ and the $\text{GPRs}$ are to be carried out in the $\text{ALU}.$ Two clock cycles are needed for memory read operation – the first one for loading address in the $\text{MAR}$ and the next one for loading data from the memory bus into the $\text{MDR}.$

The instruction "call Rn, sub” is a two word instruction. Assuming that $\text{PC}$ is incremented during the fetch cycle of the first word of the instruction, its register transfer interpretation is

$\text{Rn} \leftarrow \text{PC} + 1$;

$\text{PC} \leftarrow \text{M[PC]}$;

The minimum number of CPU clock cycles needed during the execution cycle of this instruction is:

  1. $2$
  2. $3$
  3. $4$
  4. $5$
edited by

12 Answers

5 votes
5 votes

In this question PC and GPR are carried out in the ALU.

So, PC and GPR performing write operation.

"call Rn, sub” - here subroutine call is performing , which is a memory read operation

And each memory read operation takes 2 clock cycle.

Then operation is performed in ALU.

$1)PC_{out},MAR_{in},Read,IncPC$

$2)WMFC$

$3)R_{2out},R_{3out},SelectA,SUB,R_{1in},END$

First two are FETCH cycle and 3rd one executing SUB instruction,i.e. EXECUTE cycle

Total 3 clock cycle

edited by
5 votes
5 votes

$T_0$ : $ MAR \leftarrow$ PC (via system bus)since MAR connected through System bus  

          $ S \leftarrow PC$ ( via internal nus)

$T_1$ : $ MDR \leftarrow M[MAR]$ {  Operation on system bus (address bus)}

$\\ R_N  \leftarrow S+1  \text{  Operation on internal bus }$  {can also be done with 3rd cycle}

$T_2$ : $PC \leftarrow MDR$ ( via system bus)

Note: MAR and MDR are Connected through System bus cannot done in One Cycle.

3 votes
3 votes
1 cycle: Pc out->S in, MAR in,

2 cycle: S out => ALU increment

3 cycle:  MBR out => Pc in

so it must be 3 cycle
Answer:

Related questions

47 votes
47 votes
6 answers
1