项目作者: niksram

项目描述 :
The following program here helps in simulating how blocks from main memory can get mapped to cache based on strategies: Direct-Mapping, Fully-Associative, Set-Associative
高级语言: C++
项目地址: git://github.com/niksram/Cache-Mapping-Simulator.git
创建时间: 2020-03-12T10:12:33Z
项目社区:https://github.com/niksram/Cache-Mapping-Simulator

开源协议:

下载


Features

  1. The above program simulates:-
  2. a) 1) Set-Associative Cache Mapping
  3. 2) Direct Cache Mapping
  4. 3) Associative Cache Mapping
  5. b) Least-Recently-Used as well as FIFO based hierarchy
  6. c) Cache main-frame to find Hits and Misses on a given input address
  7. d) Dirty-Bit changes based on load and store operation

CLASS cache_mock

  1. cache_size: size of cache frame
  2. block_size: size of each block
  3. mem_size: size of the main memory
  4. set_size: size of the set, 1 in Direct-Map, cache_size in Fully-Associative
  5. lru: 1 for Least-Recently-Used and 0 for First-In-First-Out hierarchy
  6. no_sets: total number of sets in the cache
  7. container: Vector matrix which simulates the functioning of cache

Functions

  1. loader: used to simulate loading data to processor from cache
  2. storer: used to simulate storing data to cache from processor
  3. display: displays the container frame
  4. container_init: initialises the container frame
  5. refresh_dirty: sets all dirty-bits to 0

Client

  1. self-explanatory