Find Jobs
Hire Freelancers

Creating a Cache Class for TLB entry in C#

$25-50 USD / hour

Zamknięte
Opublikowano około 6 lat temu

$25-50 USD / hour

. Program 2 builds and tests a Cache class which is used for modeling the two levels of Cache needed for Program 3. The cache is composed of a number of “lines” or “blocks”. A cache line includes a valid flag, a tag and LRU data. In the real world, it would also include a data block, but for this simulation, the data blocks don’t need to be modeled. To simplify code, we’ll leave it out. For the ARM Cortex-A53 processor, there are two levels of cache. Level 1 is 32KB with 64-byte blocks and is organized as 40way set-associative. Level 2 cache is 1MB with 64-byte blocks but is 16-way. The Cache class should have a constructor which is defined as public Cache(int CacheSize, int BlockSize, int Associativity) The cache itself would be an array of structs containing three parameters: a valid variable, a tag variable and an LRU number. The actual data in the cache is not represented because it’s not need for this program to run. The number of entries in the cache array depends on the size of cache and the number of bytes per block. There is a method which is used to obtain information from the cache. The function prototype is public bool Get(uint uAddress, uint uCycle) The method returns true if there was a tag match (data was found in cache), or false if there was a miss. Since we’re not modeling data transfers in cache, just hits and misses, the interaction between cache levels is much simpler. On your first access to L1 Get, you’ll have a compulsory miss. Make the assumption that you’ll eventually get the data from L2 so before you return “false”, update the cache as if you got data from L2. That means set the valid bit, write the tag and the LRU information. Your method returns false (because there wasn’t a tag match) and you then call the L2 Get method. If it’s the first call of the program to L2, it too will miss and return a false, but like L1, you pretend you got the data from a lower-level store (main memory in this case) and set the appropriate valid flag, the LRU info and the tag. Thus, if you go back into L1 again with an address that’s similar to the first address you sent to L1, you’ll get a hit. The L1 Get method returns true, and then you don’t go ask L2 about the data. You will also need a method to print the valid contents of cache. An example from the L1 cache is All blocks in a set are printed on the same line, although only sets with valid entries are printed. A set whose entries are all invalid will not appear. The above image is for the L1 cache which has 4 cache blocks per set. For the L2 cache, the print output would be much wider because there are 16 blocks per set. Here is what the L2 cache print would look like, although the blocks are truncated because of the width of the image: As in the first assignment you will incorporate some test code into your application. Here is the C# code for the L1 cache construction and testing: //L1 cache is 32k 64B, 4 way Cache L1Cache = new Cache(32768, 64, 4); [login to view URL](0xABCDEF02, uCycle++); [login to view URL](0xABCEEF12, uCycle++); [login to view URL](0xABCFEF22, uCycle++); [login to view URL](0xABC0EF32, uCycle++); [login to view URL](0xABC1EF32, uCycle++); [login to view URL]("[login to view URL]"); [login to view URL]("[login to view URL]", "[login to view URL]"); For L2, it’s
Identyfikator projektu: 16545266

Informację o projekcie

8 ofert
Zdalny projekt
Aktywny 6 lat temu

Szukasz sposobu na zarobienie pieniędzy?

Korzyści ze składania ofert na Freelancer.com

Ustal budżet i ramy czasowe
Otrzymuj wynagrodzenie za swoją pracę
Przedstaw swoją propozycję
Rejestracja i składanie ofert jest bezpłatne
8 freelancerzy składają oferty o średniej wysokości $31 USD/godz. dla tej pracy
Awatar Użytkownika
Dear Employer Hope you are doing well Coming to your project scope you can hire our exp C# programmer for building program for building and tests a Cache class which is used for modeling the two levels of Cache needed for Program 3. Ping us via freelancer chat box so that we can discuss all details with you and take this project to development stage I will be eagerly waiting for your reply Warm Regards Sam
$28 USD w 40 dni
4,0 (14 opinii)
6,6
6,6
Awatar Użytkownika
Hello, your descriptions here and in the doc with cs4200/spring2018 looks enough clear to start to make the c# cache classes...
$30 USD w 40 dni
4,9 (4 opinii)
4,9
4,9
Awatar Użytkownika
Welcome!!! KINDLY CONTACT ME BEFORE ORDERING. 100% BUYER SATISFACTION IS GUARANTEED, I have master in computer science in 2001, I have almost 15 years experience in software development with C# and JAVA (AZURE,AWS). I have architecting, designing, coding and unit testing high quality web and server side applications within an agile development environment I can design and implement low-latency, high availability, and performance applications with serverless architecture. I look forward to be your best programmer. Thanks, Mallesh
$33 USD w 5 dni
0,0 (0 opinii)
0,0
0,0
Awatar Użytkownika
We are Ukrainian software development company that employs several passionate engineers. Our main direction is the engineering, development and implementation of custom software with a deep scientific focus that requires strong skills in mathematics, physics and other exact and natural scientific disciplines. Technical leadership of the company is held by two keen scientists with Ph.D. degrees in physics, mathematics and technical sciences. During the last 5 years we have been involved in several projects related to cloud computations, math libraries, machine learning, parallel computing, CAD/CAE, engineering drawing, production costing, computer vision, remote device control, brain physics modeling, natural language processing, satellite imaginary and others. We would be happy to take care of your bold and complicated project!
$41 USD w 40 dni
0,0 (0 opinii)
0,0
0,0
Awatar Użytkownika
Hello! I’m an experienced computer Architecture programmer and should be able to help you out with your work. Thank you!
$27 USD w 5 dni
0,0 (0 opinii)
0,0
0,0
Awatar Użytkownika
Hi I am postgrad from India's top engineering institute and have more than 15 years of overall development experience. Even though I have newly joined on this portal, I have multiple years of professional experience on VB 6.0 and .NET technology. I have worked on multiple languages including C, C++, C#, Java. Also worked on low level device drivers on both Linux and Windows. I have more than 5 years of experience on ARM firmware. In the recent past, I have independently designed and implemented FTL (Flash Translation Layer) for SSD. Also did an R&D project in Linux kernel for tweaking the memory management subsystem for optimizing the TLB accesses. With this background, I believe I can better understand your use case for the given project as well as the future ones that you would like to have in similar area. I would like to have following milestones - 1) Finalizing the Cache class interfaces and printable output formats. Also including some additional simple output information if required e.g. number of cache hits/miss. 2) Working print functionality for the class. This will enable testing as we implement later functionality 3) Implementing the main Cache class along with the unit testing using print functionality Feel free to get back for more details and discussion. Looking forward to hear from you. Thanks & Regards, Kailas Joshi
$25 USD w 40 dni
0,0 (0 opinii)
0,0
0,0

O kliencie

Flaga UNITED STATES
United States
0,0
0
Członek od mar 11, 2018

Weryfikacja Klienta

Dziękujemy! Przesłaliśmy Ci e-mailem link do odebrania darmowego bonusu.
Coś poszło nie tak podczas wysyłania wiadomości e-mail. Proszę spróbować ponownie.
Zarejestrowani Użytkownicy Całkowita Liczba Opublikowanych Projektów
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Wczytywanie podglądu
Udzielono pozwolenia na Geolokalizację.
Twoja sesja logowania wygasła i zostałeś wylogowany. Proszę, zalogować się ponownie.