Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial And Temporal Databases 8th International Symposium Sstd 2003 Santorini Island Greece July 2003 Proceedings Lncs 2750

Authors: Thanasis Hadzilacos ,Yannis Manolopoulos ,John F. Roddick ,Yannis Theodoridis

2003rd Edition

3540405356, 978-3540405351

More Books

Students also viewed these Databases questions