retagged by
1,555 views
1 votes
1 votes
A RISC processor that uses the five-step sequence in Figure 5.4 is driven by a 1-GHz clock. Instruction statistics in a large program are as follows:

Branch 20%

Load 20%

Store 10%

Computational instructions 50%

Estimate the rate of instruction execution in each of the following cases:

(a) Access to the memory is always completed in 1 clock cycle.

(b) 90% of instruction fetch operations are completed in one clock cycle and 10% are completed in 4 clock cycles. On average, access to the data operands of a Load or Store instruction is completed in 3 clock cycles.
retagged by

2 Answers

1 votes
1 votes
The hardware of the RISC-style processor is divided into 5 execution stages: IF, ID, EXE, MA, WB.

(a) In the first part, the question is telling that the memory access (for IF and MA stage) is completed in one single clock cycle. Hence, each of the above four classes of instructions would be executed in exactly five steps each taking 1 CC.

Taking total 100 instructions in the program,

20 branch instruction would take time = 20 * 5 * 1CC time. (CC = clock cycle)

Given, 1CC time = 1/1GHz = 1ns.

So, this 20 branch instructions would take 100ns to execute.

Similarly, 20 Load instructions would take 100ns, 10 Store instructions would take 50ns, 50 ALU based instructions would take 250ns to complete its execution.

In total, all this 100 instructions would take (100 + 100 + 50 + 250)ns = 500ns.

So, rate of instruction execution = 100 instructions/500ns = 0.2 Giga instructions/sec.

(b) In this part, question is saying that 90% of instruction takes 1CC for the IF stage whereas, 10% of instructions take 4CC for the IF stage. Additionally, all the Load and Store instructions take 3CC for MA stage.

Beacuse of this, the average time/instruction would increase and the instructions/sec would decrease.

From part – (a), the execution time for IF-stage of 10% instructions would ‘increase’ by 3CC because previously it took 1CC, so now it would take 3 + 1 = 4CC.

Similarly, execution time for MA-stage of all Load and Store instructions would ‘increase’ by 2CC because previoulsy it took 1CC, so now it would take 2 + 1  = 3CC.

So, total time to execute 100 instructions would be = 500ns (from part – (a)) + 10 * 3CC + (20 + 10) * 2CC = 500ns + 30ns + 60ns = 590ns.

So, rate of instruction execution = 100 instructions/590ns = 0.17 Giga instructions/sec.
0 votes
0 votes
As 20 percent take one clock cycle 100 percent will take 5 clock cycle

rate of executon is clock speed / clock per instruction   

=1 Ghz/ 5 = 200 million instrucion per second.

Formula:-

Execution time = (total number of instruction * clock per instrucion )/clock speed

Execution speed = total number of instruction / execution time.

 

combining botht the formula we will get  Exec speed =  clock speed / clock per instrucion .

Related questions

2 votes
2 votes
3 answers
2
set2018 asked Jul 21, 2017
2,898 views