2013 Computer Architecture Project MIPS Programming : Merge Sort ChangHyun Yun Room 236, Engineering Building
MIPS Programming : Merge Sort ▣ Main Purpose of this Project Understand MIPS ISA and Recursive Function Algorithm Develop a MIPS machine program SPIM –A self-contained simulator that runs MIPS programs –Reads and executes assembly language programs –You can use PCSpim –Download an Installation file from the following website: –How to use PCSpim? 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
MIPS Programming : Merge Sort ▣ Grade Management Program Implement grade management system Each entry has student name field, student number field, and student grade field Your program has to support following functions: –Insert : add a record –Delete : remove a record –Merge 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 –Exit : end of program
MIPS Programming : Merge Sort ▣ Before ▣ After (name field) ▣ After (number field) ▣ After (grade field) Name: ccc Number: Grade: 60 Name: ddd Number: Grade: 70 Name: aaa Number: Grade: 20 Name: eee Number: Grade: 90 Name: bbb Number: Grade: 45 Name: aaa Number: Grade: 20 Name: bbb Number: Grade: 45 Name: ccc Number: Grade: 60 Name: ddd Number: Grade: 70 Name: eee Number: Grade: 90 Name: ccc Number: Grade: 60 Name: eee Number: Grade: 90 Name: bbb Number: Grade: 45 Name: ddd Number: Grade: 70 Name: aaa Number: Grade: 20 Name: eee Number: Grade: 90 Name: ddd Number: Grade: 70 Name: ccc Number: Grade: 60 Name: bbb Number: Grade: 45 Name: aaa Number: Grade: 20
MIPS Programming : Merge Sort ▣ Merge Sort Algorithm Divide and conquer algorithm Average and worst case performance : Θ(nlogn)
MIPS Programming : Merge Sort ▣ What to submit? A code file [student number.s] : 60% –Ex) s or asm –Must include detailed comments inside your code! A Word/HWP document that describes your algorithm : 40% –File name is same as code file, ex) doc or hwp –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 –Submit your ZIP file( zip) through (
MIPS Programming : Merge Sort ▣ Caution You can use only Merge Sort algorithm about sorting You have to use recursive function –Do not use iteration method even if it can improve both speed and space requirements. Do not copy the code of your friends!!! ▣ Due date : (sun) ▣ If you have any question about this project, Please send me