0% found this document useful (0 votes)
72 views

Testing of MIPS Processor

1) The document describes a lab experiment to test the working of a MIPS processor by writing an assembly code program that adds the numbers from 1 to 200 and stores the result in memory. 2) The program is designed to use an infinite loop to repeatedly load and display the result on a 7-segment display. 3) Important aspects for the student to test are the processor's branch and loop capabilities, recognizing the limited instruction set, and verifying the reset function produces the same results by repeating the program execution.

Uploaded by

Ali Ahmad Butt
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views

Testing of MIPS Processor

1) The document describes a lab experiment to test the working of a MIPS processor by writing an assembly code program that adds the numbers from 1 to 200 and stores the result in memory. 2) The program is designed to use an infinite loop to repeatedly load and display the result on a 7-segment display. 3) Important aspects for the student to test are the processor's branch and loop capabilities, recognizing the limited instruction set, and verifying the reset function produces the same results by repeating the program execution.

Uploaded by

Ali Ahmad Butt
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

COMSATS Institute of Information

Technology, Lahore.

Lab 14
Test the working of MIPS Processor

Introduction :
This last lab is to test the MIPS machine codes as the final step. Write and test a MIPS assembly
code that adds from 1 to 200 (C8hex) and then stores the result at a memory location on your
own processor. This time, connect the clock to the system clock (50MHz) or a divided slower
clock. In order to display the final result, use an infinitive loop of loads. This can be achieved
through displaying the signal read_data to the seven segment display output. The seven segment
display is used because it is a faster display technology. Your assembly code should look like
MIPS code that computes 1+2+3+, ....,+ 200=20100=4e84hex.
L1: ....
beq $1,$2, L2 -- bne can be implemented by beq and j combination
j L1
L2: --- Assume that the addition result is in $5
sw $5, 3($0) --- Save the addition result at mem[3]
L3: lw $5, 3($0) --- Create an infinitive loop to display the result stored in memory
j L3 --- to the seven segment display.
Above method should allow you to test your processors loop (branch) capability. One common
mistake students make is not recognizing the instructions implemented. Remember that you only
implemented rformat, lw, sw, addi, beq, and j instructions. Your program can use only these
instructions.Another important feature you should test is the reset capability. Resetting your
processor should produce the same result, that is, it should be able to repeat the execution of the
addition program. This is because the processor starts from PC=0 when a reset is applied, and
thus your code ends up executing the infinitive loop again.

You might also like