
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Topic Video
Question

Transcribed Image Text:A) Identify dependencies
add R3, R3, R4
sub
R4, R2,
beq RO, R2, end
addi R4, R4, 12
end:
R2, R3
B) insert NOPS
add R3, R3, R4
sub
R4, R2, R3
beq RO, R2, end
nop
addi R4, R4, 12
C) reorder for performance

Transcribed Image Text:The code in Part A has two data dependencies (R3 and R4), and can be resolved using forwarding and double-pumped register file. However,
we still have control dependency for "beq" instruction. To solve the control dependency issue, we add a "nop” after the “beq” instruction, as
showsn in Part B.
Question: We would like to keep the pipeline full as much as possible and improve the performance. Can we reorder the instructions to
avoid NOPs? If so, how?
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- For the whole question, pseudo-instructions are not allowed except “j target_label”and “jr ra”. One suggestion for assembly programming problems is that you can includecomments to one or a block of instructions. Consider a RISC-V assembly function func1. func1 has three passingarguments stored in registers a0, a1 and a2, uses temporary registers t0-t3 andsaved registers s4–s10. func1 needs to call func2 and other functions may call func1also. func2 has two passing arguments stored in registers a0 and a1, respectively. Infunc1, after the program returns to func1 from func2, the code needs the originalvalues stored in registers t1 and a0 before it calls func2. (a) How many words are the stack frames of function func1?(b) Indicate which registers are stored on the stack of func1.arrow_forwardIn some instruction sets, call and return instructions make use of a RR register to hold the return address rather than doing so on the stack. Show how the code in the above problem should be changed if call and return instructions used a RR register for return addresses rather than the stack. Don't change the program's function. 500 MOV R1, X 501 MOV R2, Y 502 MOV R3, Z 503 PUSH R1 504 CALL 550 505 POP R3 506 CALL 560 507 HALT · · 550 PUSH R2 551 CALL 560 552 POP R2 553 RET · · 560 PUSH R3 561 PUSH R1 562 POP R2 563 POP R1 564 RETarrow_forwardHow many trap service routines could theoretically be created for the LC-3, given the format of the TRAP instruction? (hint: how many bits are used for the trap vector?) 8 64 O 256 О 16к 32arrow_forward
- Can you explain what would happen if an unapproved instruction is sent to VA page 30? In the following cases, a TLB controlled by software would be faster than one maintained by hardware:arrow_forwardConsider the code below that runs in the five stage pipeline that does not handle any data hazard (no forwarding and no write/read register in the same cycle). Add NOP operations so that the code runs correctly. You may draw a time diagram to help you answer the question. ADDI X1, X2, #3 ADD X3, X1, X2 ADDI X4, X1, #13 ADD X5, X3, X2arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education