Pipelining process for a simple set of mips instructions

Assignment Help Other Engineering
Reference no: EM131265644

Project: Pipeline Simulator 

I.  Purpose 

The primary purpose of this project is to help you understand the pipelining process for a simple set of MIPS instructions. You will gain experience with basic pipelining principles, as well as the hazard control techniques of forwarding, stalling, and branch prediction. The secondary purpose of this project is to give you experience with writing C code.

II. Basic Description  

Your job is to create a program, contained in a single C file called proj2.c, which takes as input a small simplified MIPS assembly program and prints to standard output the state of the pipelined data path at the beginning of each clock cycle. At the end of execution, you should print out some information about the instruction sequence just executed. Your submitted C program will be compiled and run on linprog with the following commands, where test.asm is an assembly file as described below.

 $ gcc proj2.c -lm

$ ./a.out < test.asm 

The -lm flag links the math library, which is included by default in proj2_start.c. You do not have to use any functions from this library, but you may if you choose to do so. You should not rely on any other special compilation flags or other input methods. If your program does not compile and execute as expected with the above commands, points will be deducted from your project grade.

Take a look at the provided proj2_start.c file. At the heart of the proj2_start.c file is the run() function. The run() function creates a state, represented by the stateType struct. This state represents the state of the pipeline as a whole at the beginning of a specific clock cycle. Notice that it contains pipeline register structs to record the values of the pipeline registers in that specific clock cycle. Note that, in a real pipeline, all stages are executed at once. We cannot do this because our code will be executed sequentially. To mimic this "parallel" execution, we have state, which represents current state of the pipeline (in other words, the state of the pipeline at the end of the previous cycle), and newState, which should be used to represent the state of the pipeline after the current cycle has executed. The state is initialized and then we enter a while loop with the following steps:  

1. Print the state.  

2. Check to see if a halt instruction is entering its WB stage. If so, then we must be done. Print information about the execution and end the program.  

3. Create newState, a copy of the current state. Any changes to the pipelined datapath are reflected in newState. In general, while simulating the execution, state should only be read from and newState should only be written to. However, there a few important exceptions. 

4. Comments following indicate the general order in which steps should be implemented. Note that this order is not strict - for example, we assume that register writes (performed by instructions in their WB stage) must happen before register reads (performed by instructions in their ID stage). 

You do not need to modify the instToInt, get_opcode, get_funct, get_immed, get_rs, get_rt, get_rd, get_shamt, or printState functions. These are provided for convenience. You will need to modify the run() instruction and possibly add support functions, depending on how you approach the problem. You may also modify the structs to include more information (control lines, for example) as well as the init_state function if you'd like.

Attachment:- Assignment.rar

Reference no: EM131265644

Questions Cloud

Discuss effective techniques for reducing stage fright : Discuss effective techniques for reducing stage fright. - What lessons about ethical responsibilities when using PowerPoint can be learned from this catastrophe in communication?
Financial statement and file her tax return : Like most business owners in their first year, Dr. Rooney does not know how to create her financial statements. She hires you as her accountant to put together her financial statement and file her tax return. Here is the information Dr Rooney recount..
Explain different types of communication : Develop a 10- to12- slide PowerPoint Presentation designed for training the staff at a local high school. The PowerPoint Presentation should focus on strategies that promote communication skills among adolescents.
What is the major research questions or goal of the study : What is the major research questions or goal of the study? What is the hypothesis of the study? What methods were used? The major findings were. The authors concluded that.
Pipelining process for a simple set of mips instructions : CDA3101 Project: Pipeline Simulator.  The primary purpose of this project is to help you understand the pipelining process for a simple set of MIPS instructions. You will gain experience with basic pipelining principles, as well as the hazard cont..
Write a memo report critiquing the speech : Write a memo report to your instructor critiquing the speech in terms of the following: - Effectiveness of the introduction, body, and conclusion. - Evidence of effective overall organization.
Discuss the essential quality-of-care issues : Discuss the essential quality-of-care issues involved in this case. What is the role of Telemedicine in your community and how do you access it? How does it affect the quality of care?
Evaluate the organization current compensation philosophy : Evaluate the organization's current compensation philosophy and propose ways to enhance or revamp the current compensation philosophy to meet the changing needs of the organization and its employees.
What maximum power can the generator supply : What maximum power can the generator supply at the rated terminal voltage, if the field becomes opencircuited?

Reviews

Write a Review

Other Engineering Questions & Answers

  Confidence level for the regression model as a whole

What is the 95% confidence level interval estimate for the salary for an employee with an average performance rating of 3.9?

  How prevention through design could be used to reduce risks

Discuss how Prevention through Design could be used to reduce the risks associated with these operations if you were hired to design a new facility performing these same activities from scratch.

  Determine the design of the cut

Determine the design of the cut, including burden and spacing for each element of the cut - burden and spacing of the easer, perimeter and lifer holes

  Describe the common tissues and structures

Describe the common tissues and structures found in accessory organs.

  Write a vhdl testbench to verify your design

Draw a block diagram of the complete design that implements your algorithm. Write a VHDL code to model this division by constant circuit. Write a VHDL testbench to verify your design.

  Working fluid during the heat addition process

A Carnot cycle operates between the temperature limits of 300 and 2000 K, and produces 600 kW of net power. The rate of entropy change of the working fluid during the heat addition process is

  Simulate using multisim and attach a simulation printout

Design an up/down counter with four states (0, I, 2, 3) using clocked J-K flip-flops. A control signal x is used as follows: When x = 0 the machine counts forward (up), when x = I, backward (down). Simulate using MultiSim and attach a simulation ..

  Sketch and label the waveform at the integrator output

The circuit of Fig. consists of an inverting bistable multivibrator with an output limiter and a noninverting integrator. Using equal values for all resistors except R7 and a 0.5-nF capacitor, design the circuit to obtain a square wave at the outp..

  Explain different types of operators used in oracle

Explain different types of operators used in ORACLE.Explain the following commands with an example.

  The wheel on your bicycle has a 14 inch radius

The wheel on your bicycle has a 14 inch radius, what is the linear distance it would travel in 3 revolutions?

  Rules governed the type of attributes of offerings

The tomb of high priest Thoth Petosiris contains scenes were Egyptian and Hellenistic scenes were merged

  Design a suitable blast for the sub-level caving arrangement

Design a surface blast and design a coal overburden throw/cast blast - Design a suitable blast for the sub-level caving arrangement shown below which is from Kiruna Mine.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd