Question: Objective: Write C code to calculate the performance of a program with dependent arithmetic instructions on a 5 - stage pipeline architecture. The five stages
Objective:
Write C code to calculate the performance of a program with dependent arithmetic instructions
on a stage pipeline architecture. The five stages are: Instruction Fetch IF Instruction Decode
ID Execution Ex Memory access ME and WriteBack WB
Inputs:
Number of instructions in the program
Set of instructions
Outputs:
A chart of the pipelined stages of the instructions
The total cycle count for the program
Specification:
The program calculates the output based on choosing from a menu of choices, where each
choice calls the appropriate procedure, where the choices are:
Enter instructions
Print a chart of the pipelined stages of the instructions
Print the total cycle count for the program
Quit
You can use any editor andor compiler, but make sure your code compiles and executes under the gcc compiler in the Unix environment.
Example:
$ aout
Performance assessment:
Enter instructions
Print a chart of the pipelined stages of the instructions
Print the total cycle count for the program
Quit
Enter selection:
Enter the number of instructions:
RRR
RR R
RRR
RRR
Performance assessment:
Enter instructions
Print a chart of the pipelined stages of the instructions
Print the total cycle count for the program
Quit
Enter selection:
IF ID EX ME WB
IF ID EX ME WB
IF ID EX ME WB
IF ID EX ME WB
Performance assessment:
Enter instructions
Print a chart of the pipelined stages of the instructions
Print the total cycle count for the program
Quit
Enter selection:
The total cycle count for the program is
Performance assessment:
Enter instructions
Print a chart of the pipelined stages of the instructions
Print the total cycle count for the program
Quit
Enter selection:
Objective:
Write C code to calculate the performance of a program with dependent arithmetic instructions
on a stage pipeline architecture. The five stages are: Instruction Fetch IF Instruction Decode
ID Execution Ex Memory access ME and WriteBack WB
Inputs:
Number of instructions in the program
Set of instructions
Outputs:
A chart of the pipelined stages of the instructions
The total cycle count for the program
Specification:
The program calculates the output based on choosing from a menu of choices, where each
choice calls the appropriate procedure, where the choices are:
Enter instructions
Print a chart of the pipelined stages of the instructions
Print the total cycle count for the program
Quit
Example:
$ aout
Performance assessment:
Enter instructions
Print a chart of the pipelined stages of the instructions
Print the total cycle count for the program
Quit
Enter selection:
Enter the number of instructions:
RRR
RRR
RRR
RORR
Performance assessment:
Enter instructions
Print a chart of the pipelined stages of the instructions
Print the total cycle count for the program
Quit
Enter selection:
IF ID EX ME WB
IF ID EX ME WB
IF ID EX ME WB
IF ID EX ME WB
Performance assessment:
Enter instructions
Print a chart of the pipelined stages of the instructions
Print the total cycle count for the program
Quit
Enter selection:
The total cycle count for the program is
Performance assessment:
Enter instructions
Print a chart of the pipelined stages of the instructions
Print the total cycle count for the program
Quit
Enter selection:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
