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...
-
On January 1, 2011, the Montgomery Company agreed to purchase a building by making six payments. The first three are to be $25,000 each, and will be paid on December 31, 2011, 2012, and 2013. The...
-
Do items reported as a credit memorandum on the bank statement represent (a) additions made by the bank to the company's balance or (b) deductions made by the bank from the company's balance? Explain.
-
The adjusted trial balance for Spruce Up Catering, Inc., is presented next. Prepare the income statement, statement of retained earnings, and balance sheet for Spruce Up Catering, Inc., for the month...
-
A highway department is studying the relationship between traffic flow and speed. The following model has been hypothesized. y = 0 + 1x + Where y = traffic flow in vehicles per hour x = vehicle...
-
Rover Company is analyzing a special investment project. The project will require the purchase of two machines for $35,000 and $9,000 (both machines are required). The total residual value at the end...
-
James Silva is a management accountant at Kleebler - Olson, where he is in charge of their investment portfolio. James worked with a data scientist to develop a model that predicts how a given loan...
-
Describe the management plan for the project. This deals with how resources and various aspects of the project are managed. For example, are they managed by the source organization or the bidding...
-
You have been provided the following data on BCE stock options for January 3, 2021. JAN 3, 2021: BCE stock price = $36.0 Exercise Price 32.5 35.0 37.5 40.0 JAN BID ASK CALLS FEB BID - 1.80 1.95 2.25...
-
This course is UNDC201, it includes concepts, definitions, legal provisions, different types and methods as well as markets for organized criminal activities of organized criminal groups....
-
What are the four cultural structures in health care organizations? How does each impact organizational behavior? How do they apply to your organization? How effectively does your organization...
-
Use the current year's audit information to calculate the sampling interval and the sample size. Enter in the table below the proper amounts as given or calculated. 1. Confidence factor Factor 2....
-
Hooke's Law: Suppose we have a spring with an unknown spring constant k. We are inter- ested in finding the specific value of k for our spring. Recall that Hooke's Law stated that the force needed to...
-
The atomic number of isotopes 150 and 190 is 8. the half-life of radioactive element 15, is 122.2 seconds. The half-life of the radioactive element 190 is also 26.9 seconds.since these two elements...
-
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?
-
A system of masses rotating in different parallel planes is in dynamic balance if the resultant. (a) force is equal to zero (b) couple is equal to zero (c) force and the resultant couple are both...
-
When the mass of a critically damped single degree of freedom system is deflected from its equilibrium position and released, it will (a) return to equilibrium position without oscillation (b)...
-
The equation of motion for a single degree of freedom system with viscous damping is \(4 \ddot{x}+9 \dot{x}+16 x=0\). The damping ratio of the system is (a) \(\frac{9}{128}\) (b) \(\frac{9}{16}\) (c)...
Study smarter with the SolutionInn App