PowerPoint 프레젠테이션

Download Report

Transcript PowerPoint 프레젠테이션

2011 Computer Architecture Project #1
MIPS Programming: Merge Sort
Ki Sup Hong
[email protected]
Room 236, Engineering Building
MIPS Programming: Merge Sort
Due Date : 2011. 4. 13 (Wed)
Main Purpose of this Project
Understand MIPS ISA and Recursive Function Algorithm
Develop a MIPS machine program
SPIM
A self-contained simulator that runs MIPS32 programs
Reads and executes assembly language programs
You can use PCSpim or QtSpim
Download an Installation Guide from the following website:
http://pages.cs.wisc.edu/~larus/spim.html
http://sourceforge.net/projects/spimsimulator/files/
2
MIPS Programming: Merge Sort
What to submit?
A code file [student number.s] : 60%
Ex) 2009000001.s
Include detailed comments inside your code
A Word/HWP document that describes your algorithm : 40%
File name is same as code file, ex) 2009000001.doc
You can use any word processor
You must explain your code and algorithm in detail
Your document will be used to determine partial credit if the code fails to run
Compress your code and document into ZIP file, ex) 2009000001.zip
Submit your ZIP file through E-mail ( [email protected] )
3
MIPS Programming: Merge Sort
Grade Management Program
Implement grade management system
Each entry has name field, student number field, and grade field
Your program has to support following functions:
Insert : add a record
Delete : remove a record
Sort : sort records by any field (name, student number, and grade)
The program should be able to sort in any field you want
Show : show current records
You can use only merge sort algorithm
You have to use recursive function
Do not use iteration method even if it can improve both speed and space
requirements
4
MIPS Programming: Merge Sort
Merge Sort Algorithm
Divide and conquer algorithm
Average and worst case performance : Θ(nlogn)
T(n) = 2T(n/2) + Θ(n)
5
MIPS Programming: Merge Sort
If you don’t understand about this project,
You can use E-mail ( [email protected] ) or
Use the board in our laboratory homepage ( http://it.korea.ac.kr )
Don’t use register number 15($t7), and 16($s0)
How to use PCSpim (or QtSpim)?
Simple instructions on how to use PCSpim
Write your code in notepad
Save as assembly file (file extension: .s, .asm, etc)
Open your file in PCSpim, and execute
Study yourself using Google, Joinc Wiki, naver, and so on
http://www.joinc.co.kr/modules/moniwiki/wiki.php/Site/Assembly/Document
s/Spim/spim-chapter9
http://blog.naver.com/PostView.nhn?blogId=cakel&logNo=80030778445
6