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

  Characterization technology for nanomaterials

Calculate the reciprocal lattice of the body-centred cubic and Show that the reciprocal of the face-centred cubic (fcc) structure is itself a bcc structure.

  Calculate the gasoline savings

How much gasoline do vehicles with the following fuel efficiencies consume in one year? Calculate the gasoline savings, in gallons per year, created by the following two options. Show all your work, and draw boxes around your answers.

  Design and modelling of adsorption chromatography

Design and modelling of adsorption chromatography based on isotherm data

  Application of mechatronics engineering

Write an essay on Application of Mechatronics Engineering

  Growth chracteristics of the organism

To examine the relationship between fermenter design and operating conditions, oxygen transfer capability and microbial growth.

  Block diagram, system performance and responses

Questions based on Block Diagram, System Performance and Responses.

  Explain the difference in a technical performance measure

good understanding of Mil-Std-499 and Mil-Std-499A

  Electrode impedances

How did this procedure affect the signal observed from the electrode and the electrode impedances?

  Write a report on environmental companies

Write a report on environmental companies

  Scanning electron microscopy

Prepare a schematic diagram below of the major parts of the SEM

  Design a pumping and piping system

creating the pumping and piping system to supply cool water to the condenser

  A repulsive potential energy should be a positive one

Using the data provided on the webvista site in the file marked vdw.txt, try to develop a mathematical equation for the vdW potential we discussed in class, U(x), that best fits the data

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