Programs for embedded devices are often written in assembly language. Some embedded processors have limited instructions,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Programs for embedded devices are often written in assembly language. Some embedded processors have limited instructions, like MARIE. Create a MARIE program which determines whether a given address is a cache hit or not. For this assignment, the cache is 2-way set associative, addresses are 8 bits, blocks are 8 bytes, and the cache has 8 blocks. Requirements 1. The program must be written in MARIE. 2. The input is a hex address (2 hex digits), the output is 1 for a cache hit and 0 for a cache miss. 3. The cache table is Set 0 Set 1 Set 2 Set 3 1 2 3 6 5 4 2 0 Tags 4. Unlike a real memory system, for this assignment, the cache table won't change on a cache miss. Hints: 1. You have already written a multiply subroutine for MARIE. You could use a similar integer divide subroutine for this. It could return both a quotient and a remainder. Input: 85, Output: 0 Input: A5, Output: 1 Input: 6C, Output: 0 Input: 7D, Output: 0 Input: 8B, Output: 1 2. I recommend writing this in Java or C++ first to test your algorithm. Write the divide method using repeated subtraction as you will in MARIE. 3. The textbook describes the Loadl instruction, but the MARIE simulator does not recognize that. You can accomplish the same thing using Clear and Addl. Upload: Your MARIE source file (.mas) Sample Output Programs for embedded devices are often written in assembly language. Some embedded processors have limited instructions, like MARIE. Create a MARIE program which determines whether a given address is a cache hit or not. For this assignment, the cache is 2-way set associative, addresses are 8 bits, blocks are 8 bytes, and the cache has 8 blocks. Requirements 1. The program must be written in MARIE. 2. The input is a hex address (2 hex digits), the output is 1 for a cache hit and 0 for a cache miss. 3. The cache table is Set 0 Set 1 Set 2 Set 3 1 2 3 6 5 4 2 0 Tags 4. Unlike a real memory system, for this assignment, the cache table won't change on a cache miss. Hints: 1. You have already written a multiply subroutine for MARIE. You could use a similar integer divide subroutine for this. It could return both a quotient and a remainder. Input: 85, Output: 0 Input: A5, Output: 1 Input: 6C, Output: 0 Input: 7D, Output: 0 Input: 8B, Output: 1 2. I recommend writing this in Java or C++ first to test your algorithm. Write the divide method using repeated subtraction as you will in MARIE. 3. The textbook describes the Loadl instruction, but the MARIE simulator does not recognize that. You can accomplish the same thing using Clear and Addl. Upload: Your MARIE source file (.mas) Sample Output
Expert Answer:
Answer rating: 100% (QA)
SOLUTION Its a 2way set associative cache The address can be splitted as TagSet numberOffset Since t... View the full answer
Related Book For
Organizational Behaviour Concepts Controversies Applications
ISBN: 978-0132310314
6th Canadian Edition
Authors: Nancy Langton, Stephen P. Robbins, Timothy A. Judge, Katherine Breward
Posted Date:
Students also viewed these accounting questions
-
Create a java program which allows the user to enter two values (Using JOptionPane) to be divided. The application catches an exception if either of the entered values is not an integer. Declare...
-
Are input requirements or output requirements examined to determine the attributes of tables? Should all of these attributes physically be in the data file? Why or why not?
-
Multiply Choice 1. Which of the following requirements must be met to create a bailment? I. Delivery of personal property to the intended bailee II. Possession by the intended bailee (a) I only (b)...
-
The people on Coral Island buy only juice and cloth. The CPI market basket contains the quantities bought in 2016. The average household spent $60 on juice and $30 on cloth in 2016 when the price of...
-
What is purchasing? Why is it important for the small business owner to develop a purchasing plan?
-
Vintage Auto Company manufactures parts to order for antique cars. Vintage Auto makes everything from fenders to engine blocks. Each customer order is treated as a job. Vintage Auto currently has two...
-
4. Question: Hey, Paula," a pop hit that spent months on the music charts, was back on the radio 30 years later, but in a form the song's author never intended. Talk-show host Rush Limbaugh played a...
-
Carole Dahl is chief financial officer of the Phoenix Division of Dahl Corporation, a multinational company with three operating divisions. As part of the budgeting process, Dahl's staff is...
-
BCE has 6.90% (semiannual paying) coupon bonds outstanding, par value $1,000 each. The bonds have 6 years to maturity and sell for 95% of par and BCE's tax rate is 22%. What is the after-tax cost of...
-
Devon Bishop, age 45, is single. He lives at 1507 Rose Lane, Albuquerque, NM 87131. His Social Security number is 111-11-1117. Devon does not want $3 to go to the Presidential Election Campaign Fund....
-
Eva is a librarian and keeps track of how many books each patron checks out. The distribution is not symmetrical. Most patrons get a few/handful of books. Nobody leaves with none. However, a few...
-
List two ways in which monitoring by the Joint Monitoring Unit and the ACCA monitoring unit differ and give reasons to explain these differences.
-
Briefly describe the key features of a Control Risk Self Assessment (CRSA) system.
-
Distinguish between a financial statement audit, performed by external auditors, and a financial audit, performed by internal auditors.
-
Outline the various forms in which a company may report its environ- mental performance and distinguish between an "environmental report' and a 'sustainability report'.
-
Explain briefly how the scope of internal environmental audits has developed over the past 20 or so years.
-
11.28 Market-based pricing, customer preferences * Transrapid is a new magnetically levitated train being developed to run between major cities in Germany at a speed of 300 miles per hour. Engineers...
-
Banner Company acquires an 80% interest in Roller Company for $640,000 cash on January 1, 2013. The NCI has a fair value of $160,000. Any excess of cost over book value is attributed to goodwill. To...
-
What are some of the challenges and opportunities that managers face in todays workplace?
-
What are the factors that lead organizations to resist change?
-
Why do subcultures develop in an organization?
-
Question: An aunt saw her eight-year-old nephew enter the room, remarked what a nice boy he was, and said, "I would like to take care of him now." She promptly wrote a note, promising to pay the boy...
-
Question: Rick is selling his espresso coffee maker. He sends Tamara an e-mail, offering to sell the machine for $350. Tamara promptly e-mails back, offering to buy the item for $300. She hears...
-
1. Interactive Data Corp. hired Daniel Foley as an assistant product manager at a starting salary of $18,500. Over the next six years, Interactive steadily promoted Foley until he became Los Angeles...
Study smarter with the SolutionInn App