# ECE369, Project Phase II, Part A # 100Pts # Demonstrate the functionality of your code to the TA # by 02/26/10 # # This template is given only as a reference. You are responsible for testing your # code with different data sets and verifying its functionality # # # # Insert your name here along with workload # distribution if you are working with a partner. # # Team Members: # % Effort : # # TA will keep a soft copy after the demo # # # main.s .data # test input # asize : dimensions of the frame [i,j] and window [k,l] # i: number of rows, j: number of cols # k: number of rows, l: number of cols # frame : frame data with i*j number of pixel values # window: search window with k*l number of pixel values # test 1 For the 16X16 frame size and 4X4 window size, ANSWER: 12, 12 asize1: .word 16,16,4,4 #i,j,k,l frame1: .word 0,1,2,3,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,4,5,6,7,8,9,10,11,12,13,14,15,2,3,32,1,2,3,12,14,16,18,20,22,24,26,28,30,3,4,1,2,3,4,18,21,24,27,30,33,36,39,42,45,0,4,2,3,4,5,24,28,32,36,40,44,48,52,56,60,0,5,3,4,5,6,30,35,40,45,50,55,60,65,70,75,0,6,12,18,24,30,36,42,48,54,60,66,72,78,84,90,0,4,14,21,28,35,42,49,56,63,70,77,84,91,98,105,0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120,0,9,18,27,36,45,54,63,72,81,90,99,108,117,126,135,0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,0,11,22,33,44,55,66,77,88,99,110,121,132,143,154,165,0,12,24,36,48,60,72,84,96,108,120,132,0,1,2,3,0,13,26,39,52,65,78,91,104,114,130,143,1,2,3,4,0,14,28,42,56,70,84,98,112,126,140,154,2,3,4,5,0,15,30,45,60,75,90,105,120,135,150,165,3,4,5,6 window1: .word 0,1,2,3,1,2,3,4,2,3,4,5,3,4,5,6 # test 2 ANSWER: 8, 12 #asize2: .word 16,16,8,4 #i,j,k,l #frame2: .word 0,1,2,3,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,4,5,6,7,8,9,10,11,12,13,14,15,2,3,32,1,2,3,12,14,16,18,20,22,24,26,28,30,3,4,1,2,3,4,18,21,24,27,30,33,36,39,42,45,0,4,2,3,4,5,24,28,32,36,40,44,48,52,56,60,0,5,3,4,5,6,30,35,40,45,50,55,60,65,70,75,0,6,12,18,24,30,36,42,48,54,60,66,72,78,84,90,0,4,14,21,28,35,42,49,56,63,70,77,84,91,98,105,0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120,0,9,18,27,36,45,54,63,72,81,90,99,108,117,126,135,0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,0,11,22,33,44,55,66,77,88,99,110,121,132,143,154,165,0,12,24,36,48,60,72,84,96,108,120,132,0,1,2,3,0,13,26,39,52,65,78,91,104,114,130,143,1,2,3,4,0,14,28,42,56,70,84,98,112,126,140,154,2,3,4,5,0,15,30,45,60,75,90,105,120,135,150,165,3,4,5,6 #window2: .word 96,104,112,120,108,117,126,135,120,130,140,150,132,143,154,165,0,1,2,3,1,2,3,4,2,3,4,5,3,4,5,6 #For the 8X4 window case # test 3 ANSWER: 12, 8 #asize3: .word 16,16,4,8 #i,j,k,l #frame3: .word 0,1,2,3,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,4,5,6,7,8,9,10,11,12,13,14,15,2,3,32,1,2,3,12,14,16,18,20,22,24,26,28,30,3,4,1,2,3,4,18,21,24,27,30,33,36,39,42,45,0,4,2,3,4,5,24,28,32,36,40,44,48,52,56,60,0,5,3,4,5,6,30,35,40,45,50,55,60,65,70,75,0,6,12,18,24,30,36,42,48,54,60,66,72,78,84,90,0,4,14,21,28,35,42,49,56,63,70,77,84,91,98,105,0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120,0,9,18,27,36,45,54,63,72,81,90,99,108,117,126,135,0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,0,11,22,33,44,55,66,77,88,99,110,121,132,143,154,165,0,12,24,36,48,60,72,84,96,108,120,132,0,1,2,3,0,13,26,39,52,65,78,91,104,114,130,143,1,2,3,4,0,14,28,42,56,70,84,98,112,126,140,154,2,3,4,5,0,15,30,45,60,75,90,105,120,135,150,165,3,4,5,6 #window3: .word 96,108,120,132,0,1,2,3,104,114,130,143,1,2,3,4,112,126,140,154,2,3,4,5,120,135,150,165,3,4,5,6 #For the 4X8 window case # test 4 ANSWER: 8, 8 #asize4: .word 16,16,8,8 #i,j,k,l #frame4: .word 0,1,2,3,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,4,5,6,7,8,9,10,11,12,13,14,15,2,3,32,1,2,3,12,14,16,18,20,22,24,26,28,30,3,4,1,2,3,4,18,21,24,27,30,33,36,39,42,45,0,4,2,3,4,5,24,28,32,36,40,44,48,52,56,60,0,5,3,4,5,6,30,35,40,45,50,55,60,65,70,75,0,6,12,18,24,30,36,42,48,54,60,66,72,78,84,90,0,4,14,21,28,35,42,49,56,63,70,77,84,91,98,105,0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120,0,9,18,27,36,45,54,63,72,81,90,99,108,117,126,135,0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,0,11,22,33,44,55,66,77,88,99,110,121,132,143,154,165,0,12,24,36,48,60,72,84,96,108,120,132,0,1,2,3,0,13,26,39,52,65,78,91,104,114,130,143,1,2,3,4,0,14,28,42,56,70,84,98,112,126,140,154,2,3,4,5,0,15,30,45,60,75,90,105,120,135,150,165,3,4,5,6 #window4: .word 64,72,80,88,96,104,112,120,72,81,90,99,108,117,126,135,80,90,100,110,120,130,140,150,88,99,110,121,132,143,154,165,96,108,120,132,0,1,2,3,104,114,130,143,1,2,3,4,112,126,140,154,2,3,4,5,120,135,150,165,3,4,5,6 # For the 8X8 case # test 5 # # test 6 # # newline: .asciiz "\n" .text .globl main main: addi $sp, $sp, -4 # Make space on stack sw $ra, 0($sp) # Save return address # start test 1 16x16 frame and 4x4 window la $a0, asize1 # 1st parameter: address of asize1[0] la $a1, frame1 # 2nd parameter: address of frame1[0] la $a2, window1 # 3rd parameter: address of window1[0] jal vbsme # call function # insert code here to print $v0 # insert code here to print $v1 # test 1 completed # start test 2 16x16 frame and 4x8 window la $a0, asize2 # 1st parameter: address of asize2[0] la $a1, frame2 # 2nd parameter: address of frame2[0] la $a2, window2 # 3rd parameter: address of window2[0] jal vbsme # call function # insert code here to print $v0 # insert code here to print $v1 # test 2 completed # add more tests lw $ra, 0($sp) # Restore return address addi $sp, $sp, 4 # Restore stack pointer jr $ra # Return