163k views
2 votes
Ld' is the instruction with the longest latency on the CPU from Section 4.4 (in RISC-V text). If we modified ld and sd so that there was no offset (i.e., the address to be loaded from/stored to must be calculated and placed in rs1 before calling ld/sd), then no instruction would use both the ALU and Data memory. This would allow us to reduce the clock cycle time. However, it would also increase the number of instructions, because many ld and sd instructions would need to be replaced with ld/add or sd/add combinations.

(a) What is the primary factor that influences whether a program will run faster or slower on the new CPU?
(b) Do you consider the original CPU a better overall design; or do you consider the new CPU a better overall design? Why?

1 Answer

6 votes

Answer:

See explaination

Step-by-step explanation:

a)

The primary factors that influence the program's speed on a new CPU are given as:-

CPU Clock speed where the speed of the process instructions is being measured.

Multi-core which is when the transistors work faster than respective CPU.

Cache which helps to note that the transition of data is smooth and fast.

b)

So, there are two CPUs suppose the old one as 'A' and the modified one as 'B'.

'A' has following features---

It takes more time to execute program as it has more clock cycle time or we can say it has low clocking rate or low speed in terms of MHz or GHz. Clock rate is the inverse of Clock Cycle Time. When you will increase the clocking rate of CPU, it will get faster and then Clock Cycle Time will get reduced.

It has less instructions provided.

'B' has following features----

It takes less time to execute program as it has less clock cycle time or we can say it has high clocking rate or high speed in terms of MHz or GHz.

It has more instructions provided.

The performance of CPU depends upon 2 factors:

The number and types of instructions that are executed by the CPU

How fast the CPU can execute those instructions?

So, overall CPU B is better as it has less execution time than CPU A but the performance will always depend upon the number and type of instructions executed by the CPU so it may vary.

Please refer to attachment for instructions and formulas.

Ld' is the instruction with the longest latency on the CPU from Section 4.4 (in RISC-example-1
User Mirta
by
4.8k points