Find Jobs
Hire Freelancers

C Programming —Cache Memory -- 2

$10-30 USD

Скасований
Опублікований about 7 years ago

$10-30 USD

Оплачується при отриманні
Objective: To simulate reading and writing to a custom-sized direct-mapped cache, involving a custom-sized main memory. Inputs: The total size of accessible main memory (in words) The total size of the cache (in words) The block size (words/block) A signal to read (0) or write (1) to the cache The main memory address to read from/write to The contents of the address for writing to the cache Outputs: The corresponding cache tag, block, and word for a main memory address The contents of the address resulting from reading/writing to the cache A message indicating either a hit or a miss to the cache Specification: The program simulates reading from and writing to a cache based on choosing from a menu of choices, where each choice calls the appropriate procedure, where the choices are: 1) Enter parameters 2) Access cache for reading/writing and transfer data 3) Quit program Notes:  Use a structure (struct) to represent a cache line consisting of a tag (integer) and a block (integer pointer). Define the cache to be a pointer to the struct.  Upon entering the parameters, the main memory and cache are to be dynamically allocated based on their respective total sizes. Each word i of main memory is initialized with the value M–i, where M is the size of main memory in words. Reading/writing from/to a new block in the cache results in dynamically allocating the block based on the block size. Output: Cache memory allocation and mapping: ------------------------------------ 1) Enter parameters 2) Access cache for reading/writing and transfer data 3) Quit Enter selection: 1 Enter main memory size (words): 65536 Enter cache size (words): 1024 Enter block size (words/block): 16 Cache memory allocation and mapping: ------------------------------------ 1) Enter parameters 2) Access cache for reading/writing and transfer data 3) Quit Enter selection: 2 Select read (0) or write (1): 1 Enter main memory address to write to: 65535 Enter value to write: 14 Write miss! ----------------------------------------------------- | Tag: 63 | Block: 63 | Word: 15 (14) | ----------------------------------------------------- Cache memory allocation and mapping: ------------------------------------ 1) Enter parameters 2) Access cache for reading/writing and transfer data 3) Quit Enter selection: 2 Select read (0) or write (1): 0 Enter main memory address to read from: 65535 Read hit! ----------------------------------------------------- | Tag: 63 | Block: 63 | Word: 15 (14) | ----------------------------------------------------- Cache memory allocation and mapping: ------------------------------------ 1) Enter parameters 2) Access cache for reading/writing and transfer data 3) Quit Enter selection: 2 Select read (0) or write (1): 1 Enter main memory address to write to: 65534 Enter value to write: 512 Write hit! ----------------------------------------------------- | Tag: 63 | Block: 63 | Word: 14 (512) | ----------------------------------------------------- Cache memory allocation and mapping: ------------------------------------ 1) Enter parameters 2) Access cache for reading/writing and transfer data 3) Quit Enter selection: 2 Select read (0) or write (1): 0 Enter main memory address to read from: 1023 Read miss! ----------------------------------------------------- | Tag: 0 | Block: 63 | Word: 15 (64513) | ----------------------------------------------------- Cache memory allocation and mapping: ------------------------------------ 1) Enter parameters 2) Access cache for reading/writing and transfer data 3) Quit Enter selection: 3
ID проекту: 13313976

Про проект

4 пропозицій(-ї)
Дистанційний проект
Активність 7 yrs ago

Хочете заробити?

Переваги подання заявок на Freelancer

Вкажіть свій бюджет та терміни
Отримайте гроші за свою роботу
Опишіть свою пропозицію
Реєстрація та подання заявок у проекти є безкоштовними
4 фрілансерів(-и) готові виконати цю роботу у середньому за $67 USD
Аватарка користувача
Hello, I have 30 years experience programming in C. I will create the cache simulation as described in your posting. A milestone payment for the full budget for this project must be deposited with this site before your offer can be accepted. Alan Idler Chief Software Architect Idleswell Software Creations
$126 USD за 3 дні(-в)
4,9 (176 відгуки(-ів))
6,0
6,0
Аватарка користувача
Hello. How are you. I have read and understood the project. I have strong knowledge in Data structures and Algorithms. And I'm expert in Java ,C/C++, Python ,PHP etc. I'm interested this project. So, firstly I want to discuss with you about this project. Then I'll be happy. I wait for your good reply. Thanks.
$60 USD за 2 дні(-в)
5,0 (67 відгуки(-ів))
5,5
5,5
Аватарка користувача
Hello! Please check my reviews to know a bit about me and my work. Thank you!
$50 USD за 1 день
5,0 (17 відгуки(-ів))
4,0
4,0
Аватарка користувача
Hi I am a relatively new computer engineer here in FL, you can tell from my profile. I could help with this, if you are interested I can chat for more details
$32 USD за 1 день
5,0 (8 відгуки(-ів))
3,0
3,0

Про клієнта

Прапор UNITED STATES
northridge, United States
4,6
3
Спосіб оплати верифіковано
На сайті з лист. 6, 2015

Верифікація клієнта

Дякуємо! Ми надіслали на вашу електронну пошту посилання для отримання безкоштовного кредиту.
Під час надсилання електронного листа сталася помилка. Будь ласка, спробуйте ще раз.
Зареєстрованих користувачів Загальна кількість опублікованих робіт
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Завантажуємо для перегляду
Дозвіл на визначення геолокації надано.
Ваш сеанс входу закінчився, і сеанс було закрито. Будь ласка, увійдіть знову.