229k views
1 vote
In this project, you are asked to write the core part of a mini processor simulator called MySPIMusing C language on a Unix or a PC platform. Your MySPIM will demonstrate some functions ofMIPS processor as well as the principle of the datapath and the control signals of MIPSprocessor. The MySPIM simulator should read in a file containing MIPS machine codes (in theformat specified below) and simulate what the MIPS does cycle-by-cycle. You are required toimplement the MySPIM with a single-cycle datapath. You are asked to fill in the body of severalfunctions in a given file.

What are the inputs and outputs of the program?

A. Most of the functionality of this simulator is provided by spimcore.
B. The only inputthat you need to provide to spimcore is a text file with extension .asc, which shouldcontain the 32-bit instructions as ASCII in hexadecimal format (see the example in theproject description).
C. You can write a sequence of instructions manually in your .asc file,or optionally write a simple assembler to do that for you (i.e. convert a program to its hexsequence).
D. There is no output.

User Baxx
by
4.5k points

1 Answer

5 votes

Answer:

avator QR

当前位置:以往代写 > >代写C++ DEV留学生项目:Principle of Computer Organization

代写C++ DEV留学生项目:PRINCIPLE OF COMPUTER ORGANIZATION

2017-12-19

Principle of Computer Organization

Implementation of a Single Cycle CPU simulator

Project due: 30 November, 23:59pm

1. Introduction

In this project, you are going to implement a single cycle CPU simulator called MiniCPU using C language. Your MiniCPU will demonstrate some functions of MIPS processors as well as the principle of the datapath and the control signals. MiniCPU should read in a file containing MIPS machine codes (in the format specified below) and simulate what the MIPS processor does cycle-by-cycle. A C file called component.c will be provided to you which implementing each component of the single-cycle datapath, you are required to modify and fill in the body of the functions in this file.

2. Specification of the simulator

2.1. Instructions to be simulated

The 14 instructions listed in Figure 1 in the appendix. Note that you are NOT required to treat situations leading to exception.

2.2. Registers to be handled

MiniCPU should handle the 32 general purpose registers. At the start of the program, the registers are initialized to be the values specified in minicpu.c

Step-by-step explanation:

User PerroVerd
by
5.6k points