1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Lyrx [107]
3 years ago
10

Computers spend most of their time in loops, so multiple loop itera- tions are great places to speculatively find more work to k

eep CPU resources busy. Nothing is ever easy, though: the compiler emitted only one copy of that loop's code, so even though multiple iterations are handling distinct data, they will appear to use the same registers. To keep multiple iterations' register usages from colliding, we rename their registers. Figure 3.49 shows example code that we would like our hardware to rename. A compiler could have simply unrolled the loop and used different registers to avoid conflicts, but if we expect our hard- ware to unroll the loop, it must also do the register renaming. How? Assume your hardware has a pool of temporary registers (call them T registers, and assume that there are 64 of them, TO through T63) that it can substitute for those registers des- ignated by the compiler. This rename hardware is indexed by the src (source) register designation, and the value in the table is the T register of the last destina- tion that targeted that register. (Think of these table values as producers, and the src registers are the consumers; it doesn't much matter where the producer puts its result as long as its consumers can find it.) Consider the code sequence in Fig ure 3.49. Every time you see a destination register in the code, substitute the next available T, beginning with T9. Then update all the src registers accordingly, so that true data dependences are maintained. Show the resulting code. (Hint: See Figure 3.50.)
Computers and Technology
1 answer:
fredd [130]3 years ago
7 0

Answer / Explanation:

From the provided Hint in Figure 3.50 and also The baseline performance ( in cycles, per loop iteration) of the code sequence in Figure 2.35 shows that  if no new instruction’s execution could be initiated until the previous instruction’s execution had completed, is 40.

Now, you might ask that how did I come up with that number?

Each instruction requires one clock cycle of execution (a clock cycle in which that instruction, and only that instruction, is occupying the execution units; since every instruction must execute, the loop will take at least that many clock cycles). To that base number, we add the extra latency cycles. Don’t forget the branch shadow cycle.

Therefore, the resulting code would be:

Loop:      LD F2,0(Rx) 1 + 4

               DIVD F8,F2,F01 + 12

               MULTD F2,F6,F2 1 + 5

               LDF4,0(Ry) 1 + 4

               ADDD F4,F0,F4 1 + 1

              ADDD F10,F8,F2 1 + 1

              ADDI Rx,Rx,#8 1

              ADDIRy,Ry,#81

              SDF4,0(Ry) 1 + 1

              SUB R20,R4,Rx 1

              BNZ R20,Loop 1 + 1

Cycle per loop iter 40

You might be interested in
PLEASE HELP ASAP!!!!
MArishka [77]
It won't let me send the answer. It says incorrect answer even though it's not but refer to these notes at the top.

3 0
3 years ago
What can be entered in a search box to find data? data size a name relevance purpose
horrorfan [7]
Yes it can bc revleance
4 0
3 years ago
Read 2 more answers
The architecture that the large paper company Mohawk adopted enables the company to scale technology services up and down instan
arlik [135]

Answer: (C) Service-oriented

Explanation:

 The service-oriented architecture is the one of the type of software design which provide various types of service and application over the network by using different type of communication protocols.

  • The service oriented architecture is basically based on the distributed computing on the different types of platform.

 This architecture design is mainly based upon the reply and request service from client to the server and vice versa. The service oriented architecture works on the basic principle is that the technology and the products should be independent.

Therefore, Option (C) is correct.

6 0
3 years ago
Electricity fact topic
gregori [183]
''for kids'' i think thats what that mean
5 0
3 years ago
Read 2 more answers
Answer all of the questions,
Phantasy [73]

Answer:

sry but I don't know the answer

5 0
2 years ago
Other questions:
  • Fullsoft, Inc. is a software development company based in New York City. Fullsoft’s software product development code is kept co
    10·1 answer
  • Which of the following is the correct order of the SDLC?
    14·1 answer
  • Write a program that does the following:
    11·1 answer
  • Around what time did the Internet come around and how did it all start? Would like to know more of the history of how the intern
    12·1 answer
  • What form of communication are they using​
    6·1 answer
  • Which of the following are NOT possible using the RANDOM(a, b) and DISPLAY(expression) abstractions?
    10·1 answer
  • What is the base of a number system?
    8·1 answer
  • Using a text editor, create a file that contains a list of at least 15 six-digit account numbers. Read in each account number an
    7·1 answer
  • Suppose that a particular algorithm has time complexity T(n) = 3 \times 2^nT(n)=3×2 ​n ​​ and that executing an implementation o
    14·1 answer
  • File names should be limited to 144 characters.<br><br> true or false
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!