Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ECE 366: Computer Organization- Fall 2018 Program #2 write a MIPS assembly programs and verify that they run correctly with the simulator MARS that does

image text in transcribed
ECE 366: Computer Organization- Fall 2018 Program #2 write a MIPS assembly programs and verify that they run correctly with the simulator MARS that does the following Count how many "best matches" exist in an array of 20 patterns, to a given target pattern (T). Input/ Output: (assuming the "compact" memory configuration from MARS >Setting) The target pattern of T should be a 32-bit value in data memory location Ox2000 The array of 20 patterns (Pattern_Array) should be given in data memory, starting from location 0x200C, containing 20 words. The results (best match score, best_match_count) should be written back in memory at location 0x2004, and 0x2008, respectively (see below for an example). data T: word 12 best matching-score.word-1 # best score ? within [0, 32] best-matching-count: 'word-1 # how many patterns achieve the best score? Pattern Array: .word 0,1, 2, 3, 4, 5, 6, 7,8,9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20 . . .text # Your code goes here About Matching The highest possible matching score is 32, meaning the two 32-bit patterns are exactly the same (i.e., Hamming Distance-0). . A matching score of x means there are a total of x matching bits over the total of 32 bits: ox (32-Hamming Distance) o For example, both 0xABCDEF01 and 0x6BCD2FD3 have matching score 27 with the target pattern 0x6BCDEF81, because both have 5 mismatching bits (for example, in OxABCDEF01 vs. Ox6BCDEF81, A and 6 differ in 4 bits, O and 8 differ in 1 bit). Your program should store back the highest matching score among the Pattern Array for pattern T, and the count of how many of them exist. For the above example, ECE 366: Computer Organization- Fall 2018 Program #2 write a MIPS assembly programs and verify that they run correctly with the simulator MARS that does the following Count how many "best matches" exist in an array of 20 patterns, to a given target pattern (T). Input/ Output: (assuming the "compact" memory configuration from MARS >Setting) The target pattern of T should be a 32-bit value in data memory location Ox2000 The array of 20 patterns (Pattern_Array) should be given in data memory, starting from location 0x200C, containing 20 words. The results (best match score, best_match_count) should be written back in memory at location 0x2004, and 0x2008, respectively (see below for an example). data T: word 12 best matching-score.word-1 # best score ? within [0, 32] best-matching-count: 'word-1 # how many patterns achieve the best score? Pattern Array: .word 0,1, 2, 3, 4, 5, 6, 7,8,9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20 . . .text # Your code goes here About Matching The highest possible matching score is 32, meaning the two 32-bit patterns are exactly the same (i.e., Hamming Distance-0). . A matching score of x means there are a total of x matching bits over the total of 32 bits: ox (32-Hamming Distance) o For example, both 0xABCDEF01 and 0x6BCD2FD3 have matching score 27 with the target pattern 0x6BCDEF81, because both have 5 mismatching bits (for example, in OxABCDEF01 vs. Ox6BCDEF81, A and 6 differ in 4 bits, O and 8 differ in 1 bit). Your program should store back the highest matching score among the Pattern Array for pattern T, and the count of how many of them exist. For the above example

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The New Profit Frontier

Authors: Ed Burnett

1st Edition

0964535629, 978-0964535626

More Books

Students also viewed these Databases questions

Question

What was Josh's major error in the implementation process?

Answered: 1 week ago

Question

2 The main characteristics of the market system.

Answered: 1 week ago