2011 Computer Architecture Project 1 MIPS Programming Merge

  • Slides: 6
Download presentation
2011 Computer Architecture Project #1 MIPS Programming: Merge Sort Ki Sup Hong mastaks@korea. ac.

2011 Computer Architecture Project #1 MIPS Programming: Merge Sort Ki Sup Hong mastaks@korea. ac. kr Room 236, Engineering Building

MIPS Programming: Merge Sort Due Date : 2011. 4. 13 (Wed) Main Purpose of

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 MIPS 32 programs Reads and executes assembly language programs You can use PCSpim or Qt. Spim 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] :

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 ( mastaks@korea. ac. kr ) 3

MIPS Programming: Merge Sort Grade Management Program Implement grade management system Each entry has

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 Algorithm Divide and conquer algorithm Average and worst case performance

MIPS Programming: Merge Sort Algorithm Divide and conquer algorithm Average and worst case performance : Θ(nlogn) T(n) = 2 T(n/2) + Θ(n) 5

MIPS Programming: Merge Sort If you don’t understand about this project, You can use

MIPS Programming: Merge Sort If you don’t understand about this project, You can use E-mail ( mastaks@korea. ac. kr ) or Use the board in our laboratory homepage ( http: //it. korea. ac. kr ) Don’t use register number 15($t 7), and 16($s 0) How to use PCSpim (or Qt. Spim)? 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-chapter 9 http: //blog. naver. com/Post. View. nhn? blog. Id=cakel&log. No=80030778445 6