he pipeline is a way to improve the performance of the processor by increasing the throughput. As you learned in the class, the instruction execution is divided to 5 stages: IF, ID, EX, WB, and MEM. At each stage the processor can pipeline more than one instruction so that they execute at the same cycle. Recall that some stage cannot be overlapped. For instance, you cannot issue to memory reads at the same stage. Write a program using your favorite programming language that reads assembly code like the following: LW $0, $1(20) –load instruction at address $1 + 20 and put the result in register $0. ADD $3, $0, $2 –add the content of register $0 to register $2 and store the outcome in register $3. Your program must simulate the pipeline by creating an execution schedule. The program must determine the dependencies between the instructions, if any, and stall the pipeline as necessary. The program must show the execution table including the stalls if any. Finally, the program must also output the number of cycles needed to execute the input program. To simplify matters, restrict the accepted instruction to only: ADD (add two values), LW (load from memory), SW (store a word in memory), SUB (subtract). IMPORTANT : THE CODE NEED TO ASK THE USER TO INPUT : LW $0, $1(20) AND ADD $3, $0, $2 AND THE OUT PUT NEED TO BE LIKE THIS: F DE   EX MEM WB      F      S     S       DE     MEM      WB WRITE A PROGRAMMING LANGUAGE THAT IMPLEMENTS PIPELINE AND ASKS THE USER TO INPUT LW $0, $1(20) AND ADD $3, $0, $2 IN A WAY THAT THAT OUTPUT LOOKS LIKE THIS F DE   EX MEM WB      F      S     S       DE     MEM      WB

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

he pipeline is a way to improve the performance of the processor by increasing the
throughput. As you learned in the class, the instruction execution is divided to 5
stages: IF, ID, EX, WB, and MEM. At each stage the processor can pipeline more
than one instruction so that they execute at the same cycle. Recall that some stage
cannot be overlapped. For instance, you cannot issue to memory reads at the same
stage.
Write a program using your favorite programming language that reads assembly code
like the following:
LW $0, $1(20) –load instruction at address $1 + 20 and put the result in register $0.
ADD $3, $0, $2 –add the content of register $0 to register $2 and store the outcome in
register $3.
Your program must simulate the pipeline by creating an execution schedule. The
program must determine the dependencies between the instructions, if any, and stall
the pipeline as necessary. The program must show the execution table including the
stalls if any. Finally, the program must also output the number of cycles needed to
execute the input program.
To simplify matters, restrict the accepted instruction to only: ADD (add two values),
LW (load from memory), SW (store a word in memory), SUB (subtract).

IMPORTANT : THE CODE NEED TO ASK THE USER TO INPUT : LW $0, $1(20) AND ADD $3, $0, $2

AND THE OUT PUT NEED TO BE LIKE THIS:

F DE   EX MEM WB

     F      S     S       DE     MEM      WB

WRITE A PROGRAMMING LANGUAGE THAT IMPLEMENTS PIPELINE AND ASKS THE USER TO INPUT LW $0, $1(20) AND ADD $3, $0, $2 IN A WAY THAT THAT OUTPUT LOOKS LIKE THIS

F DE   EX MEM WB

     F      S     S       DE     MEM      WB

Expert Solution
steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY