Git Product home page Git Product logo

cache_simulator's Introduction

cache_simulator

cache simulator with C language


How to make trace file

make 'sample.trc' file in same directory with C file

- trace file format : <Address> <R/W> <data>

ex)
22292218 W 32
2229221C W 31
00010000 R
00010004 R
00010008 R


Compile

gcc cache_sim.c -o cache_sim  
./cache_sim -a=<cache size> -s=<block size> -b=<set size>

Cache Policy

  • Write Policy : Write-back
  • The size of the cache, block and set must be an exponential multiplier of 2.

Result Example

0: 00001571 0000156f v:1 d:0 
   00001571 0000156f v:1 d:0 

1: 000003e9 000003e8 v:1 d:0 
   0001ab9f 00002706 v:1 d:0 

2: 00000401 00000400 v:1 d:0 
   00000401 00000400 v:1 d:0 

3: 0000001f 00000020 v:1 d:0 
   0000001f 00000020 v:1 d:0 

total number of hits: 21
total number of misses: 91
miss rate: 81.2%
total number of dirty blocks: 0
average memory access cycle: 311.7% 

cache_simulator's People

Contributors

lee-ji-an avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.