a benchmark program

logistic_guy

Full Member
Joined
Apr 17, 2024
Messages
790
A benchmark program is run on a \(\displaystyle 40 \ \text{MHz}\) processor. The executed program consists of \(\displaystyle 100,000\) instruction executions, with the following instruction mix and clock cycle count:

Instruction Type​
Instruction Count​
Cycles per Instruction​
Integer Arithmetic​
45,000​
1​
Data transfer​
32,000​
2​
Floating point​
15,000​
2​
Control transfer​
8000​
2​

Determine the effective \(\displaystyle CPI, \text{MIPS}\) rate, and execution time for this program.
 
A benchmark program is run on a \(\displaystyle 40 \ \text{MHz}\) processor. The executed program consists of \(\displaystyle 100,000\) instruction executions, with the following instruction mix and clock cycle count:

Instruction Type​
Instruction Count​
Cycles per Instruction​
Integer Arithmetic​
45,000​
1​
Data transfer​
32,000​
2​
Floating point​
15,000​
2​
Control transfer​
8000​
2​

Determine the effective \(\displaystyle CPI, \text{MIPS}\) rate, and execution time for this program.
show us your effort/s to solve this problem.
 
\(\displaystyle CPI \rightarrow \) Cycles per Instruction is given by:

\(\displaystyle CPI = \frac{\sum_{i = 1}^{n} I_{i} \times CPI_{i}}{I_{c}}\)

where \(\displaystyle I_c\) is the total instruction count.

Then,

\(\displaystyle CPI = \frac{45,000 \times 1 + 32,000 \times 2 + 15,000 \times 2 + 8,000 \times 2}{100,000} = 1.55\)

\(\displaystyle \text{MIPS} \rightarrow\) Million Instructions per Second is given by:

\(\displaystyle \text{MIPS} = \frac{I_c}{T \times 10^6} = \frac{f}{CPI \times 10^6} = \frac{40 \times 10^6}{1.55 \times 10^6} = 25.8065\)

The execution time is then:

\(\displaystyle T = \frac{I_c}{\text{MIPS} \times 10^6} = \frac{100,000}{25.8065 \times 10^6} = 0.003875 \ \text{s} = 3.875 \ \text{ms}\)
 
\(\displaystyle CPI \rightarrow \) Cycles per Instruction is given by:

\(\displaystyle CPI = \frac{\sum_{i = 1}^{n} I_{i} \times CPI_{i}}{I_{c}}\)

where \(\displaystyle I_c\) is the total instruction count.

Then,

\(\displaystyle CPI = \frac{45,000 \times 1 + 32,000 \times 2 + 15,000 \times 2 + 8,000 \times 2}{100,000} = 1.55\)

\(\displaystyle \text{MIPS} \rightarrow\) Million Instructions per Second is given by:

\(\displaystyle \text{MIPS} = \frac{I_c}{T \times 10^6} = \frac{f}{CPI \times 10^6} = \frac{40 \times 10^6}{1.55 \times 10^6} = 25.8065\)

The execution time is then:

\(\displaystyle T = \frac{I_c}{\text{MIPS} \times 10^6} = \frac{100,000}{25.8065 \times 10^6} = 0.003875 \ \text{s} = 3.875 \ \text{ms}\)
Now - what is your question???
 
Top