Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

1.1 A Few Notes:

1. Please test your program with various inputs prior to submission.

2. All group members must understand the entire project for interactive grading. Equal grades are not guaranteed.

3. Get started early! This will take a surprising amount of time.

2 Cache Design

Both caches take as input a filename from the command line. The file specified by the filename will be an ASCII file with each line in the following 7-byte format;

Byte(s) Function

1 - 2 16 bit address

3 Read/Write indicator

4 - 7 32 bits of data to be stored in the cache.

This byte will be all 0's in the case of a read, and all 1's in the case of a write.

Upon a read operation the data segment of the 7-byte format will be ignored. However when a write occurs the data will be written into the specified byte and the dirty bit may or may not be set. Input files will be an ASCII file with each line in the above 7 byte format and each entry given on separate lines. For ease of creation the input file will be in hex, for example:

Which would appear in the input file as:

002C FF FD23D83F

0080 FF 4E42732A

Address Read/Write Data

002C FF FD23D83F

0080 FF 4E42732A

002C 00 28E5732C

002C 00 28E5732C

Where the first two lines in this example would write data to the designated addresses, and the third line would tell cause your cache to be read and the data bytes would be ignored at this point. The cache produces as output a file named out.txt, which will contain the addressed data for a read operation, a HIT output indicating whether the requested item was found in the cache, and the dirty-bit. These pieces of information should be separated by a space, and for each of the read inputs there should be a line in the output file Thus for the example above we will have a one line output file that would appear as follows:

FD23D83F 1 1

2.1 Direct Mapped Cache

To begin this project you are to implement a 512 byte Direct-mapped cache with a line size of 8 bytes and word size of 4 bytes. Your cache is to be byte addressable. The cache must support a read operation (reading a byte from the cache) and a load operation (loading new bytes of data into the cache). In the case of a failure to read you will report a miss, for a success a hit is reported.

2.2 Set Associative Cache

After implementing the Direct-mapped cache you will alter it (in a separate _le) in order to implement an 256-byte, 4-way set associative cache. Additionally the cache must have a replacement policy; you will implement a least recently used (LRU) replacement policy for blocks. The other specifications will remain the same, you must support read and load operations, and a LRU replacement policy for blocks.

2.3 Additional Specifications

_ The cache will not be implemented in Quartus!! Instead you will implement it in C/C++ or python.

If you choose to implement in C or C++ you must provide a Make file and your code must compile on the CSIF machines.

_ the Direct Mapped file will be named DMcache (with the appropriate extension).

_ the Set Associative Cache will be named SAcache (with the appropriate extension).

_ There will be NO interactive grading, each portion of the project is pass or fail and worth 50% of the project grade.

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M9525290

Have any Question?


Related Questions in C/C++

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As