Question 4. A three-address memory-memory architecture A memory-memory architecture works directly on data in memory, rather than using any kind of working registers. Suppose the three-address memory-memory architecture has a 220 ns clock cycle time, and the following instructions: ADD mem addrl>,
, mem addr3Adds the data read from memory addresses 2 and 3, and writes result to memory address 1 Example: ADD A, B, C : Mem [A Mem [B)+Mem MUL mem addr,mem addr2, mem addr3 Multiplics the data read from memory addresses 2 and 3, and writes result to memory address 1. Example: MUL A, B, C Mem [Al Mem [B] Mem Write assembly language code for the high-level code fragment A-C(A+B)+D on the two-address load-store architecture. Include RTL comments. Do not use more memory locations than you need. What is the IC for your code? How long will it take to run? Question 5. Amdahl's Law You are considering two different changes to an architecture. The original architecture has no hardware support for multiplication; a multiplication operation is done by a software routine (by forming partial produets and adding them, like when you multiply by hand). The original architecture also has only a small cache. The first change adds a hardware multiplier, making multiplication operations 25x faster than before on average. The second change improves the cache, making data reads and writes 3.5x faster than before on average Your code running on the original architecture spends 4% of its time multiplying and 20% of its time doing data reads and writes. (a) What speed-up will you get if you make just the first change? After making the change, what percentage of the total execution time is spent multiplying? (b) What speed-up will you get if you make just the second change? If you can afford to make just one change, which change is a better choice? (c) If you make both changes, what is the speed-up? If your original code took 10 seconds to run, how long does it take to run now