CS计算机代考程序代写 assembly Java assembler mips Assignment Outline

Assignment Outline
This Assignment is split into 2 parts, Part A and Part B.
The objective of Part A is to get you familiar with the synthesised MIPS single cycle processor and to write some simple programs to control the processor.
Part B requires you to extend the processor so that it will implement additional instructions.

MIPS_System
The Verilog Code for the MIPS single cycle implementation are available. Download the ZIP file called MIPS_System and extract it into a suitable location. The synthesised MIPS processor starts executing a program from location 0x0000000. The program is loaded into the FPGA via a Memory Initialisation File, when you program the FPGA. In this design it is called “insts_data.mif”. If you examine this file using the Quartus software you’ll find that the data it contains is:
0x3C020000, 0x24420055, 0x3C03FFFF, 0x24632008, 0xAC620000, 0x08000005
If you disassemble this you’ll find that the first instruction corresponds to: lui $2, 0x0000
Using the MIPS Instruction Coding available from Vital, disassemble the other instructions to understand what the program does.
Memory Map
If you study the “Addr_Decoder.v” file you’ll find that the GPIO module is mapped from location 0xFFFF_2000. If you examine the “GPIO.v” file you’ll find the individual locations for the LEDs and switches on the DE2 board.
Program Execution
If we had access to the DE2 Boards you would synthesise and download the design, and should see that it switches on some of the red LEDs, However as this year we don’t have direct access to the Boards you will simulate the design in ModelSim.You should use ModelSim so that you can see the appropriate signals changing in the synthesised MIPS core when the MIPS CPU is running.
Assignment 3 Part A – 40%
1. Modify the MIPS assembly language program so that the program displays this number:“01448708”on the DE2 board 7 segment display.
2. In your report you should include your assembly language code and a screen dump of the ModelSim waveforms.

Assembling
You may find that hand-assembly is quite error prone and laborious. On Vital you’ll find a MIPS assembler (MARS 4.1) written in JAVA that will help you assemble your code. To get this to assemble code starting at location 0x0000000, select “Settings->Memory Configuration->Compact, Text at Address 0” that will ensure that any jumps have the correct memory location encoded.
Assignment 3 Part B – 60%
The MIPS design presented in MIPS_System only implements a limited number of the MIPS instructions. For the R-Type instructions ADD, ADDU, SUB, SUBU, AND, OR and SLT are implemented. Your task is to modify the MIPS design so that it implements the additional instructions:
Instruction1: xor
Instruction2: xori
Instruction3: lb
whilst still ensuring the existing instructions work correctly. Once you have modified your design you need to write a program to demonstrate that your hardware correctly implements the instructions. Your results should include print outs of ModelSim showing your program operating. Annotate the print out to explain what is happening. You should submit an electronic copy of your design and assembly language programs onto Vital. Your written report should explain what modifications you have made to the Verilog code and include the Verilog code you have developed. There is no need to include the Verilog code for the modules you haven’t modified. You should also include ASM/ASMD charts for your modified code. For your report on instruction 3(lb) you should include a block diagram showing the extra data pathways you have added.